Avoid reparsing stylesheets that contain media queries.
When we fill in the RuleSet for a StyleSheetContents object, a rule in a media query would only be added if the media query evaluate to true. Hence, a StyleSheetContents may have different RuleSets depending on the current media. This is why we do not cache StyleSheetContents that contain media queries, since the RuleSet needs to be different. This patch enables (hidden behind a flag) caching of StyleSheetContents with media queries, but when they are retrieved from that cache, they are cloned. Design doc: https://docs.google.com/document/d/1IpyqChzXDJczfsxnbv0kh-gAx6HBGGfIpSu4P6nKI1s/edit?usp=sharing Bug: 472923 Change-Id: I61778a9e50fc11881a3cb5f5ddfe358876c43fc6 Reviewed-on: https://chromium-review.googlesource.com/704474Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Rune Lillesveen <rune@opera.com> Commit-Queue: Darren Shen <shend@chromium.org> Cr-Commit-Position: refs/heads/master@{#509291}
Showing
Please register or sign in to comment