DescriptionCorrected assert for cacheable stylesheets.
We have two different caches for StyleSheetContents. One process-wide
for resources, and one document-wide for parsed text of style elements.
The cacheability differ between the two caches since for instance
sheets with @media rules may be shared between elements in the same
document as the media query evaluation will be the same, while we can't
do that for sheets cached across documents as they may have different
viewports.
The assert in CSSStyleSheet::willMutateRules triggered because we
checked for the resource cacheability of a style element sheet which
was shared even though it had a media query. Renamed the cacheability
method to make clear which cache we're referring to.
Removed the ASSERT in StyleSheetContents::copy(), as that really didn't
have anything to do with copy, only the fact that it is only called
from where cached stylesheets are cloned for rule mutation. The ASSERT
in willMutateRules right before we copy() should suffice.
R=timloh@chromium.org
BUG=551674
Committed: https://crrev.com/4bdb01c415930156cb26eb368fff57de4b3ee250
Cr-Commit-Position: refs/heads/master@{#392859}
Patch Set 1 #Messages
Total messages: 12 (4 generated)
|