RESOLVED INVALID 93753
Nested shadow root distributes node to insertion point that is not its child
https://bugs.webkit.org/show_bug.cgi?id=93753
Summary Nested shadow root distributes node to insertion point that is not its child
Steve Orvell
Reported 2012-08-10 16:44:30 PDT
Created attachment 157835 [details] Reduction showing actual and expected output. 1. construct a shadowRoot on an element with a selection point that distributes inside another element (B) in the shadowRoot. 2. on B, construct a shadowRoot with a selection point which distributes all content (e.g. <content></content>) Children of the host containing B are selected into it. This appears to violate Section 5.3 number 1 of the spec (https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#matching-insertion-points). Note however, the spec may change on this point: https://www.w3.org/Bugs/Public/show_bug.cgi?id=18513
Attachments
Reduction showing actual and expected output. (1.34 KB, text/html)
2012-08-10 16:44 PDT, Steve Orvell
no flags
Dominic Cooney
Comment 1 2012-08-12 21:40:16 PDT
I think the implemented behavior is correct, per Section 5.7 [1], step 2. (second bullet). 1. 2 "If CHILD is itself an insertion point, and the tree being rendered is nested, render them using insertion point rendering steps." You mentioned Section 5.3, I think you are confusing selection and rendering. First consider selection: (A) <content select="*"></content> is selecting (B) <content select=".foo"></content> That in turn is selecting (C) <div class="foo">I am a foo.</div> Next consider rendering: With reference to Section 5.7, when step 2. (second bullet). 1 is processing (A), CHILD is B. At step 2. (second bullet). 1. 2. the insertion point rendering recurses to process (B) (ie back to step 2. (second bullet.)). At step 2. (second bullet). 1. 1. (C) is rendered. [1] <https://dvcs.w3.org/hg/webcomponents/raw-file/7a24eae26c59/spec/shadow/index.html#rendering-shadow-subtrees>
Dimitri Glazkov (Google)
Comment 2 2012-08-13 11:36:57 PDT
Dominic is right! I completely missed the point that the actual <content> element is the one being selected into the insertion point.
Note You need to log in before you can comment on or make changes to this bug.