fix(browser): warm only the font sources the renderer will consider
prepare_screenshot_resources collected its work with css_resource_urls, which returns every url() in the stylesheet text. A @font-face src list is a priority order, not a set, so the common IE8 form produced six downloads for one font. The renderer already resolves that list correctly. font_face_declaration in obscura-render ends in .last(), so a rule with several src descriptors uses the final one, and font_source_may_be_supported drops .eot and .svg after stripping the query and fragment. The warmup went through neither, so it fetched bytes the renderer had already ruled out. css_font_face_rule applies both rules and reports the block as consumed, the same shape as the existing @import skip in the same scanner. On the reported fixture that is six fetches down to three. The url recording moves into push_css_url so the generic scan and the font path cannot disagree about quoting, fragments, data: or var(). An unterminated block returns None and is left to the generic scanner, matching css_import_rule_len: warming too much is better than dropping the rest of the stylesheet. Fixes #667.
N
Nguyen Thanh Dat committed
b7a084af82305abfb9a671be511db93ddceccfa5
Parent: c138019