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

Issue 2703643003: Schedule a type selector invalidation set for RuleSet invalidations. (Closed)

Created:
3 years, 10 months ago by rune
Modified:
3 years, 10 months ago
Reviewers:
sashab, Eric Willigers
CC:
chromium-reviews, blink-reviews-style_chromium.org, blink-reviews-css, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Schedule a type selector invalidation set for RuleSet invalidations. We marked all elements which had a selector in the tagRules bucket for style recalc for RuleSet invalidations. That means we would recalculate style for all spans if we added a stylesheet containing a rule with an "#id span" selector (but not for "#id span.class" as that ends up in the classRules bucket). Instead, use an invalidation set containing only tag names for the selectors where there are no ids, classes, or attribute selectors, and which have a type selector in the rightmost compound. This means that "#id span" will not add "span" to that set, but "span" and "div span" will. "div span" will not add "div", and "div *" will cause a full scope recalc. In order to support invalidation for those, we would have had to have one invalidation set for each tag name instead of a single descendant invalidation set for all. RuleSet invalidations schedule this typeRuleInvalidationSet on the root of the TreeScope When doing ruleset invalidations. BUG=680549 Review-Url: https://codereview.chromium.org/2703643003 Cr-Commit-Position: refs/heads/master@{#451488} Committed: https://chromium.googlesource.com/chromium/src/+/a04a994fb4146b480a2fb4c0505679fc1e1d857a

Patch Set 1 #

Patch Set 2 : Rebased #

Patch Set 3 : Added layout tests #

Patch Set 4 : Corrected expectation text. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -25 lines) Patch
M third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html View 1 2 3 1 chunk +30 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.h View 1 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.cpp View 5 chunks +22 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.cpp View 1 2 chunks +12 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngineTest.cpp View 1 chunk +23 lines, -8 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 23 (16 generated)
rune
ptal
3 years, 10 months ago (2017-02-16 23:31:10 UTC) #4
Eric Willigers
Do we have layout tests that cover the relevant invalidations when the set of style ...
3 years, 10 months ago (2017-02-17 00:26:12 UTC) #7
rune
On 2017/02/17 00:26:12, Eric Willigers wrote: > Do we have layout tests that cover the ...
3 years, 10 months ago (2017-02-17 00:48:01 UTC) #8
rune
On 2017/02/17 00:48:01, rune wrote: > On 2017/02/17 00:26:12, Eric Willigers wrote: > > Do ...
3 years, 10 months ago (2017-02-17 10:52:18 UTC) #11
Eric Willigers
lgtm
3 years, 10 months ago (2017-02-17 20:54:37 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2703643003/60001
3 years, 10 months ago (2017-02-18 18:22:37 UTC) #20
commit-bot: I haz the power
3 years, 10 months ago (2017-02-18 19:53:59 UTC) #23
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/a04a994fb4146b480a2fb4c05056...

Powered by Google App Engine
This is Rietveld 408576698