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

Issue 198783003: Recalc sibling styles for forward positional rules on mutations only. (Closed)

Created:
6 years, 9 months ago by rune
Modified:
6 years, 9 months ago
Reviewers:
esprehn, ojan
CC:
blink-reviews, webcomponents-bugzilla_chromium.org, sof, eae+blinkwatch, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, adamk+blink_chromium.org, darktears, rune+blink, Inactive, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Recalc sibling styles for forward positional rules on mutations only. Forward positional rules only affect selector matching of siblings when nodes are added to or removed from the DOM. However, selectors with indirect adjacent combinators may affect sibling evaluation without node addition or removal. For instance if a class selector left of an indirect adjacent combinator is set on an element. Since the indirect adjacent combinator was considered as a forward positional rule, we were recalculating sibling styles in the presence of an nth-selector. We now split indirect adjacent selector matching as a separate flag to be able to optimize recalc in the presence if nth-selectors and skip sibling recalc for forward positional rules if no mutations happened. ElementRareData and ShadowRootRareData do not increase in size since they were already padded in the relevant parts. R=ojan BUG=160212 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=169471

Patch Set 1 #

Patch Set 2 : Rebased. #

Total comments: 2

Patch Set 3 : Rebase. #

Patch Set 4 : Fixed review issue. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -8 lines) Patch
A LayoutTests/fast/css/nth-child-no-mutations.html View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/nth-child-no-mutations-expected.txt View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/css/SelectorChecker.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Element.h View 1 2 3 chunks +7 lines, -2 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M Source/core/dom/ElementRareData.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/SiblingRuleHelper.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/dom/SiblingRuleHelper.cpp View 3 chunks +14 lines, -1 line 0 comments Download
M Source/core/dom/shadow/ShadowRoot.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/shadow/ShadowRoot.cpp View 1 2 3 chunks +11 lines, -0 lines 0 comments Download
M Source/core/dom/shadow/ShadowRootRareData.h View 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
rune
6 years, 9 months ago (2014-03-13 12:03:25 UTC) #1
rune
This needs another rebase now after https://codereview.chromium.org/202633006/
6 years, 9 months ago (2014-03-18 08:45:39 UTC) #2
esprehn
lgtm, one nit to fix before landing. This is a great patch (once you rebase ...
6 years, 9 months ago (2014-03-18 09:31:36 UTC) #3
rune
https://codereview.chromium.org/198783003/diff/20001/LayoutTests/fast/css/nth-child-no-mutations.html File LayoutTests/fast/css/nth-child-no-mutations.html (right): https://codereview.chromium.org/198783003/diff/20001/LayoutTests/fast/css/nth-child-no-mutations.html#newcode21 LayoutTests/fast/css/nth-child-no-mutations.html:21: internals.updateStyleAndReturnAffectedElementCount(); On 2014/03/18 09:31:37, esprehn wrote: > Just do ...
6 years, 9 months ago (2014-03-18 11:01:47 UTC) #4
rune
The CQ bit was checked by rune@opera.com
6 years, 9 months ago (2014-03-18 11:02:14 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rune@opera.com/198783003/60001
6 years, 9 months ago (2014-03-18 11:02:17 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-18 11:09:01 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on mac_blink_compile_dbg
6 years, 9 months ago (2014-03-18 11:09:03 UTC) #8
rune
The CQ bit was checked by rune@opera.com
6 years, 9 months ago (2014-03-18 19:56:02 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rune@opera.com/198783003/60001
6 years, 9 months ago (2014-03-18 19:56:06 UTC) #10
commit-bot: I haz the power
6 years, 9 months ago (2014-03-18 20:29:48 UTC) #11
Message was sent while issue was closed.
Change committed as 169471

Powered by Google App Engine
This is Rietveld 408576698