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

Issue 2683373003: RuleSet invalidations on single feature only, including tags. (Closed)

Created:
3 years, 10 months ago by rune
Modified:
3 years, 10 months ago
Reviewers:
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

RuleSet invalidations on single feature only, including tags. If we add a stylesheet with selector "#x span", we would invalidate both #x and span elements regardless of whether the span elements were descendants of #x. Instead introduce a bit on invalidation sets saying if it should be scheduled for ruleset invalidations or not, and mark only a single invalidation set per selector. Consider ".x #y". We will walk from right to left and remember one simple selector for which we use invalidation sets. We choose more specific selectors over less specific and choose the leftmost simple selector for selectors with the same specificity. So in this case, we will mark the invalidation set for "#y" to be used for ruleset invalidation. For ".x .y", we will mark the invalidation set for ".x". Additionally we create a singleton invalidation set to be scheduled on the root node for element type invalidations. That is, for selectors which contain a type selector in the rightmost compound, but do not contain id, class, or attribute, we add that type selector to the type invalidation set and schedule it on the root node for ruleset invalidations. BUG=680549

Patch Set 1 #

Patch Set 2 : Expected result for experimental invalidation tracking. #

Total comments: 1

Patch Set 3 : Trace type ruleset invalidation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -65 lines) Patch
M third_party/WebKit/Source/core/css/RuleFeature.h View 1 2 7 chunks +49 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.cpp View 1 2 17 chunks +119 lines, -36 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeatureSetTest.cpp View 2 chunks +5 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h View 3 chunks +13 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp View 3 chunks +7 lines, -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
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 2 1 chunk +1 line, -1 line 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 2 chunks +25 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngineTest.cpp View 1 2 2 chunks +44 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorTraceEvents.h View 1 2 3 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp View 1 2 3 chunks +13 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (9 generated)
rune
3 years, 10 months ago (2017-02-15 00:21:44 UTC) #7
https://codereview.chromium.org/2683373003/diff/20001/third_party/WebKit/Layo...
File
third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/parse-author-style-sheet-expected.txt
(right):

https://codereview.chromium.org/2683373003/diff/20001/third_party/WebKit/Layo...
third_party/WebKit/LayoutTests/inspector/tracing/timeline-style/parse-author-style-sheet-expected.txt:3:
error: Failed to lookup the event that scheduled a style invalidator
invalidation.
This is because the introduced type rule invalidation set is not traced. It's
easy to trigger this error for existing invalidations as well, even if we
generate a trace event for the invalidation set scheduling. Asked for the status
of the invalidation tracing and reported issue 692283.

Powered by Google App Engine
This is Rietveld 408576698