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

Issue 1317533002: Sibling invalidation sets (Closed)

Created:
5 years, 4 months ago by Eric Willigers
Modified:
5 years, 1 month ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-style_chromium.org, dglazkov+blink, eae+blinkwatch, rwlbuis, sof, webcomponents-bugzilla_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Sibling invalidation sets Design doc: https://goo.gl/z0Z9gn See also Rune's document https://goo.gl/KzlKHN BUG=378135 Committed: https://crrev.com/6f611157e71e74e53568b7a96f73000f0f8187f8 Cr-Commit-Position: refs/heads/master@{#356121}

Patch Set 1 : CORE_EXPORT #

Total comments: 1

Patch Set 2 : sibling descendant #

Patch Set 3 : sibling-inserted #

Total comments: 1

Patch Set 4 : Minimise sibling SubtreeStyleChange #

Patch Set 5 : Invalidate descendants only #

Total comments: 1

Patch Set 6 : InvalidationSet #

Patch Set 7 : Rebase #

Total comments: 52

Patch Set 8 : review feedback #

Total comments: 7

Patch Set 9 : Small unit tests, no appliesDirectly #

Patch Set 10 : Rebase #

Total comments: 17

Patch Set 11 : Rebase #

Patch Set 12 : requested changes #

Patch Set 13 : inheritance #

Patch Set 14 : unittest #

Patch Set 15 : Rebase, invalidation sets off Oilpan heap after #352829 #

Total comments: 2

Patch Set 16 : Oilpan #

Total comments: 16
Unified diffs Side-by-side diffs Delta from patch set Stats (+936 lines, -264 lines) Patch
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-recalc.html View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-recalc-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/class-sibling-universal.html View 1 2 3 4 5 6 7 8 9 10 5 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/compound.html View 1 2 3 4 5 6 7 8 9 10 5 chunks +5 lines, -5 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/css/invalidation/compound-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -16 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/empty-pseudo-sibling.html View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/empty-pseudo-sibling-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-not.html View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 2 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 2 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/recalc-direct-adjacent-001.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/recalc-direct-adjacent-001-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/recalc-direct-adjacent-002.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/recalc-direct-adjacent-002-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/scrollbar-pseudo.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/scrollbar-pseudo-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -7 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/sub-selector-adjacent-cancellation.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/sub-selector-adjacent-cancellation-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/targeted-class-any-pseudo.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/invalidation/targeted-class-any-pseudo-expected.txt View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +25 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleFeature.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 19 chunks +161 lines, -91 lines 6 comments Download
A third_party/WebKit/Source/core/css/RuleFeatureSetTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +319 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/RuleSet.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/StyleRule.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
A third_party/WebKit/Source/core/css/invalidation/InvalidationData.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/css/invalidation/InvalidationData.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +43 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +78 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/css/invalidation/InvalidationSet.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +14 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/invalidation/InvalidationSetTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +8 lines, -8 lines 0 comments Download
A third_party/WebKit/Source/core/css/invalidation/PendingInvalidations.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +29 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +40 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +109 lines, -35 lines 6 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/StyleEngine.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +18 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/dom/shadow/SelectRuleFeatureSet.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 49 (22 generated)
Eric Willigers
https://codereview.chromium.org/1317533002/diff/60001/Source/core/input/EventHandler.cpp File Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1317533002/diff/60001/Source/core/input/EventHandler.cpp#newcode2123 Source/core/input/EventHandler.cpp:2123: styleChanged = documentElement->childNeedsStyleInvalidation(); WebViewTest.ShowUnhandledTapUIIfNeededWithMutateStyle was failing with mouseup and ...
5 years, 3 months ago (2015-08-31 06:40:43 UTC) #7
rune
https://codereview.chromium.org/1317533002/diff/260001/Source/core/css/invalidation/DescendantInvalidationSet.h File Source/core/css/invalidation/DescendantInvalidationSet.h (right): https://codereview.chromium.org/1317533002/diff/260001/Source/core/css/invalidation/DescendantInvalidationSet.h#newcode119 Source/core/css/invalidation/DescendantInvalidationSet.h:119: RefPtrWillBeMember<DescendantInvalidationSet> m_descendantInvalidationSet; Does this mean that if this is ...
5 years, 3 months ago (2015-09-01 15:56:46 UTC) #10
Eric Willigers
On 2015/09/01 15:56:46, rune wrote: > https://codereview.chromium.org/1317533002/diff/260001/Source/core/css/invalidation/DescendantInvalidationSet.h > File Source/core/css/invalidation/DescendantInvalidationSet.h (right): > > https://codereview.chromium.org/1317533002/diff/260001/Source/core/css/invalidation/DescendantInvalidationSet.h#newcode119 > ...
5 years, 3 months ago (2015-09-01 22:09:38 UTC) #11
rune
On 2015/09/01 22:09:38, Eric Willigers wrote: > On 2015/09/01 15:56:46, rune wrote: > > > ...
5 years, 3 months ago (2015-09-02 07:03:44 UTC) #12
Timothy Loh
Looks pretty good https://codereview.chromium.org/1317533002/diff/340001/Source/core/input/EventHandler.cpp File Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1317533002/diff/340001/Source/core/input/EventHandler.cpp#newcode2127 Source/core/input/EventHandler.cpp:2127: if (!styleChanged) { Why did this ...
5 years, 3 months ago (2015-09-10 06:09:40 UTC) #14
esprehn
https://codereview.chromium.org/1317533002/diff/380001/Source/core/css/RuleFeature.cpp File Source/core/css/RuleFeature.cpp (right): https://codereview.chromium.org/1317533002/diff/380001/Source/core/css/RuleFeature.cpp#newcode241 Source/core/css/RuleFeature.cpp:241: InvalidationSet* RuleFeatureSet::invalidationSetForSelector(const CSSSelector& selector, InvalidateType type) InvalidateType is a ...
5 years, 3 months ago (2015-09-10 08:54:53 UTC) #15
rune
I think this CL needs to be split up to make it easier to review ...
5 years, 3 months ago (2015-09-10 13:54:50 UTC) #16
Eric Willigers
The following comments have not yet been addressed: RuleFeatureSetTest.cpp should have small tests. InvalidationData.cpp - ...
5 years, 3 months ago (2015-09-14 07:20:24 UTC) #17
rune
I've dived into all the details yet. Can we split out appliesDirectly first? https://codereview.chromium.org/1317533002/diff/420001/Source/core/css/invalidation/InvalidationData.h File ...
5 years, 3 months ago (2015-09-14 23:06:51 UTC) #19
Eric Willigers
https://codereview.chromium.org/1317533002/diff/380001/Source/core/css/RuleFeatureSetTest.cpp File Source/core/css/RuleFeatureSetTest.cpp (right): https://codereview.chromium.org/1317533002/diff/380001/Source/core/css/RuleFeatureSetTest.cpp#newcode127 Source/core/css/RuleFeatureSetTest.cpp:127: expectClassInvalidation("p", descendant); On 2015/09/10 08:54:53, esprehn wrote: > I ...
5 years, 3 months ago (2015-09-15 05:39:18 UTC) #20
esprehn
On 2015/09/15 at 05:39:18, ericwilligers wrote: > ... > > https://codereview.chromium.org/1317533002/diff/420001/Source/core/css/invalidation/StyleInvalidator.cpp > File Source/core/css/invalidation/StyleInvalidator.cpp (right): ...
5 years, 3 months ago (2015-09-15 05:45:13 UTC) #21
Eric Willigers
On 2015/09/15 05:45:13, esprehn wrote: > On 2015/09/15 at 05:39:18, ericwilligers wrote: > > ...
5 years, 3 months ago (2015-09-17 07:38:59 UTC) #22
Eric Willigers
Rebased to use invalidatesSelf.
5 years, 3 months ago (2015-09-22 03:15:22 UTC) #23
rune
I've reviewed the process of building the invalidation sets now. With comments below. I have ...
5 years, 2 months ago (2015-10-02 13:17:59 UTC) #24
rune
https://codereview.chromium.org/1317533002/diff/500001/Source/core/css/RuleFeature.cpp File Source/core/css/RuleFeature.cpp (right): https://codereview.chromium.org/1317533002/diff/500001/Source/core/css/RuleFeature.cpp#newcode461 Source/core/css/RuleFeature.cpp:461: auto result = extractInvalidationSetFeatures(*selector, localFeatures, false); Note: extractInvalidationSetFeatures with ...
5 years, 2 months ago (2015-10-02 13:57:56 UTC) #25
Eric Willigers
https://codereview.chromium.org/1317533002/diff/500001/Source/core/css/RuleFeature.cpp File Source/core/css/RuleFeature.cpp (right): https://codereview.chromium.org/1317533002/diff/500001/Source/core/css/RuleFeature.cpp#newcode408 Source/core/css/RuleFeature.cpp:408: // selector is the selector immediately to the left ...
5 years, 2 months ago (2015-10-14 00:25:40 UTC) #31
rune
Great work! LGTM with a couple of notes: See oilpan note (I see you're already ...
5 years, 2 months ago (2015-10-20 18:39:24 UTC) #36
Eric Willigers
> Also, did you confirm that this actually fixes the html spec slowness > (crbug.com/376847)? ...
5 years, 1 month ago (2015-10-26 06:43:07 UTC) #39
Eric Willigers
https://codereview.chromium.org/1317533002/diff/650001/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.h File third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.h (right): https://codereview.chromium.org/1317533002/diff/650001/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.h#newcode116 third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.h:116: using PendingInvalidationMap = HashMap<Element*, RefPtr<PendingInvalidations>>; On 2015/10/20 18:39:24, rune ...
5 years, 1 month ago (2015-10-26 06:43:23 UTC) #40
rune
Still lgtm
5 years, 1 month ago (2015-10-26 10:27:06 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1317533002/690001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1317533002/690001
5 years, 1 month ago (2015-10-26 20:00:05 UTC) #43
commit-bot: I haz the power
Committed patchset #16 (id:690001)
5 years, 1 month ago (2015-10-26 21:06:44 UTC) #44
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/6f611157e71e74e53568b7a96f73000f0f8187f8 Cr-Commit-Position: refs/heads/master@{#356121}
5 years, 1 month ago (2015-10-26 21:08:25 UTC) #45
esprehn
https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators-expected.txt File third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators-expected.txt (right): https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators-expected.txt#newcode9 third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators-expected.txt:9: PASS internals.updateStyleAndReturnAffectedElementCount() is 2 why did this one go ...
5 years, 1 month ago (2015-10-26 21:20:14 UTC) #46
Eric Willigers
On 2015/10/26 21:20:14, esprehn wrote: > ... I'll address the various comments individually. The invalidation-set-with-adjacent-combinators.html ...
5 years, 1 month ago (2015-10-27 07:24:55 UTC) #47
rune
https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp File third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp (right): https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp#newcode168 third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp:168: // Avoid directly setting SubtreeStyleChange on element, or ContainerNode::checkForChildrenAdjacentRuleChanges() ...
5 years, 1 month ago (2015-10-27 09:50:03 UTC) #48
Eric Willigers
5 years, 1 month ago (2015-10-28 23:09:08 UTC) #49
Message was sent while issue was closed.
https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Lay...
File
third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators-expected.txt
(right):

https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Lay...
third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators-expected.txt:9:
PASS internals.updateStyleAndReturnAffectedElementCount() is 2
On 2015/10/26 21:20:14, esprehn wrote:
> why did this one go up?

Addressed in https://codereview.chromium.org/1418133013/
Done.

https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Lay...
File
third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators.html
(right):

https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Lay...
third_party/WebKit/LayoutTests/fast/css/invalidation/invalidation-set-with-adjacent-combinators.html:59:
shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
On 2015/10/26 21:20:14, esprehn wrote:
> why did it go up?

Addressed in https://codereview.chromium.org/1418133013/
Done.

https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/css/RuleFeature.cpp (right):

https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/css/RuleFeature.cpp:496:
siblingFeatures->maxDirectAdjacentSelectors =
std::numeric_limits<unsigned>::max();
On 2015/10/26 21:20:14, esprehn wrote:
> I'd just use UINT_MAX for all of these, this std::numeric_limits thing is so
> verbose...

Done. https://codereview.chromium.org/1424783003/

https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
(right):

https://codereview.chromium.org/1317533002/diff/690001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp:159:
m_invalidationEntries.removeLast();
On 2015/10/26 21:20:14, esprehn wrote:
> What is this doing? Can you add a comment explaining why you're removing
entries
> inside the match function, that doesn't seem right... match should be const.

A rule like
.a + *
only affects the next sibling, and is then retired from SiblingData.

I've moved this retirement out to advance(), and added a comment, in
https://codereview.chromium.org/1418333004/

Powered by Google App Engine
This is Rietveld 408576698