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

Issue 286903024: Skip child ShadowRoots when invalidation does not have boundary crossing rules (Closed)

Created:
6 years, 7 months ago by esprehn
Modified:
6 years, 6 months ago
Reviewers:
chrishtr, rune, ojan
CC:
blink-reviews, blink-reviews-css, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis
Visibility:
Public.

Description

Skip child ShadowRoots when invalidation does not have boundary crossing rules When the only things that changed are not tree boundary crossing rules we can skip invalidation in descendant ShadowRoots. This means that if you have lots of nested components with duplicate class names then using a descendant selector in an enclosing component won't invalidate style in nested ShadowRoots. I also packed the booleans on DescendantInvalidationSet since we keep growing it with new flags. In the future we can make this tree boundary crossing logic even smarter so that if you have both tree boundary and not tree boundary crossing invalidation sets on the same subtree we can skip running the non-tree boundary crossing rules when recursing into a ShadowRoot. I also took this as an opportunity to clean up the addFeaturesToInvalidationSets logic and merged the new treeBoundaryCrossing flag and the wholeSubtreeInvalid flag into the InvalidationSetFeatures. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175171

Patch Set 1 #

Patch Set 2 : Add a test #

Patch Set 3 : fix the test #

Patch Set 4 : fix set merging #

Total comments: 10

Patch Set 5 : Move checks per review #

Total comments: 1

Patch Set 6 : Use switches and fall through #

Patch Set 7 : no really #

Total comments: 3

Patch Set 8 : fix typo #

Patch Set 9 : fix build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -38 lines) Patch
A LayoutTests/fast/css/invalidation/shadow-boundary-crossing.html View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/invalidation/shadow-boundary-crossing-expected.txt View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/css/RuleFeature.h View 1 2 3 1 chunk +8 lines, -2 lines 0 comments Download
M Source/core/css/RuleFeature.cpp View 1 2 3 4 5 6 7 8 2 chunks +38 lines, -28 lines 0 comments Download
M Source/core/css/invalidation/DescendantInvalidationSet.h View 2 chunks +12 lines, -6 lines 0 comments Download
M Source/core/css/invalidation/DescendantInvalidationSet.cpp View 1 2 3 3 chunks +5 lines, -0 lines 0 comments Download
M Source/core/css/invalidation/StyleInvalidator.h View 3 chunks +9 lines, -0 lines 0 comments Download
M Source/core/css/invalidation/StyleInvalidator.cpp View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
esprehn
6 years, 6 months ago (2014-05-29 20:27:28 UTC) #1
chrishtr
https://codereview.chromium.org/286903024/diff/50001/Source/core/css/RuleFeature.cpp File Source/core/css/RuleFeature.cpp (right): https://codereview.chromium.org/286903024/diff/50001/Source/core/css/RuleFeature.cpp#newcode273 Source/core/css/RuleFeature.cpp:273: features.wholeSubtree = false; Why this change? https://codereview.chromium.org/286903024/diff/50001/Source/core/css/RuleFeature.cpp#newcode278 Source/core/css/RuleFeature.cpp:278: features.wholeSubtree ...
6 years, 6 months ago (2014-05-29 20:54:07 UTC) #2
esprehn
https://codereview.chromium.org/286903024/diff/50001/Source/core/css/RuleFeature.cpp File Source/core/css/RuleFeature.cpp (right): https://codereview.chromium.org/286903024/diff/50001/Source/core/css/RuleFeature.cpp#newcode273 Source/core/css/RuleFeature.cpp:273: features.wholeSubtree = false; On 2014/05/29 20:54:07, chrishtr wrote: > ...
6 years, 6 months ago (2014-05-29 21:07:30 UTC) #3
chrishtr
lgtm https://codereview.chromium.org/286903024/diff/50001/Source/core/css/RuleFeature.cpp File Source/core/css/RuleFeature.cpp (right): https://codereview.chromium.org/286903024/diff/50001/Source/core/css/RuleFeature.cpp#newcode273 Source/core/css/RuleFeature.cpp:273: features.wholeSubtree = false; On 2014/05/29 21:07:30, esprehn wrote: ...
6 years, 6 months ago (2014-05-29 21:43:43 UTC) #4
esprehn
The CQ bit was checked by esprehn@chromium.org
6 years, 6 months ago (2014-05-30 20:49:03 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/esprehn@chromium.org/286903024/140001
6 years, 6 months ago (2014-05-30 20:51:20 UTC) #6
rune
lgtm https://codereview.chromium.org/286903024/diff/50001/Source/core/css/RuleFeature.cpp File Source/core/css/RuleFeature.cpp (right): https://codereview.chromium.org/286903024/diff/50001/Source/core/css/RuleFeature.cpp#newcode278 Source/core/css/RuleFeature.cpp:278: features.wholeSubtree = false; On 2014/05/29 21:07:30, esprehn wrote: ...
6 years, 6 months ago (2014-05-30 21:02:44 UTC) #7
commit-bot: I haz the power
6 years, 6 months ago (2014-05-30 23:20:20 UTC) #8
Message was sent while issue was closed.
Change committed as 175171

Powered by Google App Engine
This is Rietveld 408576698