RESOLVED FIXED 154770
Focusing a shadow host places the slot content after the shadow DOM content
https://bugs.webkit.org/show_bug.cgi?id=154770
Summary Focusing a shadow host places the slot content after the shadow DOM content
Ryosuke Niwa
Reported 2016-02-26 19:30:20 PST
Created attachment 272392 [details] Test case When a shadow host's focus state changes and outline is drawn, slots' assigned contents show up at the bottom of the shadow DOM. See the attached test case.
Attachments
Test case (1.10 KB, text/html)
2016-02-26 19:30 PST, Ryosuke Niwa
no flags
Add a test (2.76 KB, patch)
2016-05-09 10:32 PDT, Ryosuke Niwa
no flags
Ryosuke Niwa
Comment 1 2016-02-26 21:16:08 PST
Antti, is RenderTreePosition's next sibling supposed to refer to a render node after a slot when we're at a node assigned to the slot? There appears to be a serious inconsistency in the way TreeResolver and RenderTreePosition traverse the composed tree.
Radar WebKit Bug Importer
Comment 2 2016-02-26 21:16:33 PST
Ryosuke Niwa
Comment 3 2016-02-26 21:20:56 PST
More specifically, when TreeResolver::createRenderer is called on an assigned element, renderTreePosition's m_nextSibling is null so we end up inserting to the end of the shadow root. Either RenderTreePosition's nextSiblingRenderer or ComposedTreeIterator ought to find the render object after the slot to which the element is assigned. This could be recursive because the slot (A) can then be assigned to another slot (B) when (A)'s parent has a shadow root that contains (B).
Ryosuke Niwa
Comment 4 2016-05-06 19:24:34 PDT
It looks like this is fixed now :D We just need to land a test.
Ryosuke Niwa
Comment 5 2016-05-09 10:32:06 PDT
Created attachment 278408 [details] Add a test
Ryosuke Niwa
Comment 6 2016-05-09 10:48:01 PDT
Comment on attachment 278408 [details] Add a test Clearing flags on attachment: 278408 Committed r200581: <http://trac.webkit.org/changeset/200581>
Ryosuke Niwa
Comment 7 2016-05-09 10:48:06 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.