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

Issue 77863002: Update styleRecalc so that it traverses shadow insertion points in 2 pass algorithms (Closed)

Created:
7 years, 1 month ago by hayato
Modified:
6 years, 11 months ago
Reviewers:
esprehn, dglazkov
CC:
blink-reviews, webcomponents-bugzilla_chromium.org, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Visibility:
Public.

Description

According to the new distribution algorithms, a child node of a shadow insertion point can be a descendant of (a parent of) a content insertion point in the render tree. Therefore, when recalculating style, we must traverse shadow trees in the following order: 1. Traverse shadow trees from the youngest to the oldest as usual, but we must skip a shadow insertion point in each shadow tree. 2. After that, traverse each subtree rooted by a shadow insertion point in each shadow tree, from the oldest to the youngest. This order guarantees that a child node of shadow insertion point in the younger shadow root is visited after a content insertion point in the older shadow root. (*1) http://w3c.github.io/webcomponents/spec/shadow/#distribution-algorithms BUG=317895

Patch Set 1 #

Total comments: 1

Patch Set 2 : Make styleRecalc traverse shadow trees in 2 pass algorithm #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -10 lines) Patch
A LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html View 1 1 chunk +31 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically-expected.html View 1 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/dom/Element.h View 1 4 chunks +4 lines, -2 lines 1 comment Download
M Source/core/dom/Element.cpp View 1 5 chunks +17 lines, -7 lines 3 comments Download
M Source/core/dom/shadow/ElementShadow.h View 1 2 chunks +8 lines, -0 lines 0 comments Download
M Source/core/dom/shadow/ShadowRoot.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/shadow/ShadowRoot.cpp View 1 2 chunks +10 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
hayato
PTAL.
7 years, 1 month ago (2013-11-20 08:36:08 UTC) #1
esprehn
This doesn't appear correct, if you don't set that then if I change the parent ...
7 years, 1 month ago (2013-11-20 09:21:09 UTC) #2
esprehn
https://codereview.chromium.org/77863002/diff/1/LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html File LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html (right): https://codereview.chromium.org/77863002/diff/1/LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html#newcode25 LayoutTests/fast/dom/shadow/shadow-element-add-child-dynamically.html:25: setTimeout(addChild, 0); Why setTimeout? Are you assuming that a ...
7 years, 1 month ago (2013-11-20 09:22:23 UTC) #3
hayato
On 2013/11/20 09:21:09, esprehn wrote: > This doesn't appear correct, if you don't set that ...
7 years, 1 month ago (2013-11-20 11:09:42 UTC) #4
hayato
Let me tackle this issue in the next week (Dec 1 - ).
7 years ago (2013-11-25 04:47:18 UTC) #5
hayato
I've updated styleRecalc so that it traverses shadow trees in 2 pass algorithm. Could you ...
7 years ago (2013-12-10 06:54:06 UTC) #6
esprehn
This doesn't handle ::attach properly, you need the same two pass stuff there too. :( ...
7 years ago (2013-12-11 09:53:27 UTC) #7
hayato
7 years ago (2013-12-11 11:16:10 UTC) #8
On 2013/12/11 09:53:27, esprehn wrote:
> This doesn't handle ::attach properly, you need the same two pass stuff there
> too. :(
> 
> I sent an email to parkour@ about this also btw.

Ops. I didn't notice the email. Let me re-think again tomorrow.

Powered by Google App Engine
This is Rietveld 408576698