Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Issue 1961173003: Corrected assert for cacheable stylesheets. (Closed)

Created:
4 years, 7 months ago by rune
Modified:
4 years, 7 months ago
Reviewers:
Timothy Loh
CC:
chromium-reviews, tyoshino+watch_chromium.org, blink-reviews-html_chromium.org, gavinp+prerender_chromium.org, blink-reviews-style_chromium.org, blink-reviews-css, sof, eae+blinkwatch, Yoav Weiss, blink-reviews-dom_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, gavinp+loader_chromium.org, darktears, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Corrected 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -28 lines) Patch
A third_party/WebKit/LayoutTests/fast/css/cached-sheet-assert.html View 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/cached-sheet-assert-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleSheet.cpp View 2 chunks +11 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/StyleSheetContents.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/StyleSheetContents.cpp View 5 chunks +19 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.cpp View 2 chunks +2 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/CSSStyleSheetResource.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLLinkElement.cpp View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1961173003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1961173003/1
4 years, 7 months ago (2016-05-10 12:13:43 UTC) #2
rune
ptal
4 years, 7 months ago (2016-05-10 12:13:46 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-10 15:59:09 UTC) #5
Timothy Loh
On 2016/05/10 12:13:46, rune wrote: > ptal lgtm
4 years, 7 months ago (2016-05-11 04:37:36 UTC) #6
Timothy Loh
On 2016/05/10 12:13:46, rune wrote: > ptal lgtm
4 years, 7 months ago (2016-05-11 04:37:37 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1961173003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1961173003/1
4 years, 7 months ago (2016-05-11 05:12:24 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-11 05:15:55 UTC) #10
commit-bot: I haz the power
4 years, 7 months ago (2016-05-11 05:17:09 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/4bdb01c415930156cb26eb368fff57de4b3ee250
Cr-Commit-Position: refs/heads/master@{#392859}

Powered by Google App Engine
This is Rietveld 408576698