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

Issue 2699883002: Add 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, devtools-reviews_chromium.org, caseq+blink_chromium.org, blink-reviews-style_chromium.org, pfeldman+blink_chromium.org, blink-reviews-css, sof, eae+blinkwatch, lushnikov+blink_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, darktears, blink-reviews, kozyatinskiy+blink_chromium.org, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add type selector invalidation set for ruleset invalidations. We currently look at RuleSet::tagRules() to figure out if an element needs a style recalc when adding a stylesheet. This recalculates too much for rules like "#id span" which ends up in the tagRules bucket, causing style recalcs for every span. The plan is to use an m_typeRuleInvalidationSet which contains the tag names for rules which don't contain other simple selectors which have associated invalidation sets. For instance, "#id span" will not add span to m_typeRuleInvalidationSet since we can rely on the invalidation set for #id to invalidate spans. However, "span" or "div span" will add span to that set. This CL prepares for this by introducing the set and a way to collect it. This new set will be scheduled on the root node of the TreeScope when adding/removing a stylesheet. We did not support scheduling invalidation sets on the document node, so this CL adds that possibility as well. BUG=680549 Review-Url: https://codereview.chromium.org/2699883002 Cr-Commit-Position: refs/heads/master@{#451170} Committed: https://chromium.googlesource.com/chromium/src/+/47ac662b73ab95e33844fe6e6a9ce06104708ebb

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+107 lines, -7 lines) Patch
M third_party/WebKit/Source/core/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.h View 4 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.cpp View 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/invalidation/StyleInvalidatorTest.cpp View 1 chunk +63 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h View 3 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp View 3 chunks +14 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 12 (8 generated)
rune
ptal
3 years, 10 months ago (2017-02-16 23:30:34 UTC) #6
Eric Willigers
lgtm
3 years, 10 months ago (2017-02-17 00:29:00 UTC) #7
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/2699883002/1
3 years, 10 months ago (2017-02-17 00:37:55 UTC) #9
commit-bot: I haz the power
3 years, 10 months ago (2017-02-17 01:56:09 UTC) #12
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/47ac662b73ab95e33844fe6e6a9c...

Powered by Google App Engine
This is Rietveld 408576698