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

Issue 1298173004: Implement proposed shadow tree cascade order. (Closed)

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

Description

Implement proposed shadow tree cascade order. This CL implements the shadow tree cascade order proposed in [1]. Previously, in Blink, specificity would win over scope origin, even if the scopes had an inner/outer scope relationship, and the order-of-appearance was governed by the CascadeOrder type. Also, !important rules did not apply in the reverse scope order, as the current spec says for inner/outer scopes, and the proposal in [1] says apply between all shadow scopes. What has been done is: 1. CascadeOrder is not used, as it represents order-of-appearance (Removal of CascadeOrder is not done here to make the CL smaller. Will be removed in a follow-up CL). 2. When collecting rules, sort after each scope instead of just after UA and Author since we had: UA important Author important Author UA and now we have (with A(n) appearing before A(n+1) in the tree-of-trees order): UA important Author scope A(n) important ... Author scope A(1) important Author scope A(1) ... Author scope A(n) UA The applyProperties code is hot, and I have made performance runs for the micro-benchmarks in Layout and CSS without consistent regressions. 3. Since the cascading order between scopes are just the inner/outer relationship in the composed tree (direction decided by !important), which is the same as the tree-of-trees order of the shadow trees, we can just traverse the DocumentOrderedList of scopes in the reverse order instead of doing calculation tricks for CascadeOrder values. Because of this, TreeBoundaryCrossingRules is now reduced to a DocumentOrderedList of scoping nodes, so the TreeBoundaryCrossingRules class is removed. [1] https://lists.w3.org/Archives/Public/www-style/2015Jun/0303.html BUG=452542, 455148, 487125 NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200994

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed review issues #

Total comments: 6

Patch Set 3 : Fixed review issues #

Patch Set 4 : Fixed expected results and added another TODO. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+274 lines, -200 lines) Patch
M LayoutTests/fast/css/content-distributed-nodes.html View 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/css/content-distributed-nodes-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/fast/css/deep-cascade-order.html View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/deep-cascade-order-expected.txt View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M LayoutTests/fast/css/getComputedStyle/computed-style-redistribution.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/dom/shadow/cascade-of-treeboundary-crossing-rules.html View 2 chunks +19 lines, -3 lines 0 comments Download
M LayoutTests/fast/dom/shadow/cascade-of-treeboundary-crossing-rules-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/inner-scope-important-wins.html View 1 chunk +21 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/inner-scope-important-wins-expected.txt View 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/outer-scope-lower-specificity-wins.html View 1 chunk +21 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/outer-scope-lower-specificity-wins-expected.txt View 1 chunk +10 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/outer-scope-wins.html View 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/outer-scope-wins-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M LayoutTests/fast/dom/shadow/style-with-shadow-pseudo-element.html View 5 chunks +6 lines, -7 lines 0 comments Download
M LayoutTests/fast/dom/shadow/style-with-shadow-pseudo-element-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/core.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
D Source/core/css/TreeBoundaryCrossingRules.h View 1 chunk +0 lines, -55 lines 0 comments Download
D Source/core/css/TreeBoundaryCrossingRules.cpp View 1 chunk +0 lines, -82 lines 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.cpp View 1 chunk +8 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.h View 1 2 3 chunks +6 lines, -3 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 9 chunks +101 lines, -41 lines 0 comments Download
M Source/core/dom/DocumentOrderedList.h View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (16 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1298173004/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1298173004/1
5 years, 4 months ago (2015-08-18 13:17:32 UTC) #2
rune
Split out from https://codereview.chromium.org/1224673002/
5 years, 4 months ago (2015-08-18 13:31:27 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-18 14:23:28 UTC) #6
kochi
Hi Rune, I'm still understanding the change here. Could you answer my queries? https://codereview.chromium.org/1298173004/diff/1/Source/core/css/resolver/StyleResolver.cpp File ...
5 years, 4 months ago (2015-08-19 10:29:25 UTC) #7
rune
https://codereview.chromium.org/1298173004/diff/1/Source/core/css/resolver/StyleResolver.cpp File Source/core/css/resolver/StyleResolver.cpp (right): https://codereview.chromium.org/1298173004/diff/1/Source/core/css/resolver/StyleResolver.cpp#newcode370 Source/core/css/resolver/StyleResolver.cpp:370: // Adding scoped resolvers for active shadow roots for ...
5 years, 4 months ago (2015-08-19 16:37:22 UTC) #8
kochi
.cpp / .h code mostly look good. I'm still reviewing the layout tests. Sorry for ...
5 years, 4 months ago (2015-08-20 13:10:02 UTC) #9
kochi
lgtm if the previous comments are addressed. Reviewed all the layout tests here.
5 years, 4 months ago (2015-08-21 02:07:27 UTC) #10
rune
https://codereview.chromium.org/1298173004/diff/20001/LayoutTests/fast/css/deep-cascade-order.html File LayoutTests/fast/css/deep-cascade-order.html (right): https://codereview.chromium.org/1298173004/diff/20001/LayoutTests/fast/css/deep-cascade-order.html#newcode22 LayoutTests/fast/css/deep-cascade-order.html:22: debug("Currently fails because style attributes are added to the ...
5 years, 4 months ago (2015-08-21 07:37:46 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1298173004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1298173004/40001
5 years, 4 months ago (2015-08-21 07:38:59 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/101743)
5 years, 4 months ago (2015-08-21 08:54:57 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1298173004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1298173004/40001
5 years, 4 months ago (2015-08-21 08:55:33 UTC) #18
rune
On 2015/08/21 08:54:57, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 4 months ago (2015-08-21 09:00:26 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1298173004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1298173004/60001
5 years, 4 months ago (2015-08-21 09:08:45 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/101767)
5 years, 4 months ago (2015-08-21 11:08:05 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1298173004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1298173004/60001
5 years, 4 months ago (2015-08-21 11:15:07 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/101803)
5 years, 4 months ago (2015-08-21 13:18:13 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1298173004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1298173004/60001
5 years, 4 months ago (2015-08-21 14:03:11 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/101855)
5 years, 4 months ago (2015-08-21 16:14:14 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1298173004/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1298173004/60001
5 years, 4 months ago (2015-08-21 17:20:08 UTC) #35
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=200994
5 years, 4 months ago (2015-08-21 17:25:20 UTC) #36
rune
5 years, 4 months ago (2015-08-21 17:26:32 UTC) #37
Message was sent while issue was closed.
On 2015/08/21 17:25:20, commit-bot: I haz the power wrote:
> Committed patchset #4 (id:60001) as
> https://src.chromium.org/viewvc/blink?view=rev&revision=200994

Landed with notry=true due to crbug.com/523229

Powered by Google App Engine
This is Rietveld 408576698