See http://jsbin.com/qinaxo/edit?html,output This shows a link in a Shadow DOM subtree. Half the content is directly inside the anchor element, the other half of the content is assigned via a `<slot>` element. Expect: The entire link should be clickable. Actual: The content assigned to the `<slot>` element is not clickable.
<rdar://problem/28383300>
Created attachment 290153 [details] Fixes the bug
Created attachment 290159 [details] Fixes the bug
Comment on attachment 290159 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=290159&action=review > Source/WebCore/dom/Node.cpp:1845 > - for (Node* node = this; node; node = node->parentOrShadowHostNode()) { > + for (Node* node = this; node; node = node->parentInComposedTree()) { It would be more stylish to use ComposedTreeAncestorIterator. The current composedTreeAncestors() starts from the parent though so dealing with the OrSelf part here would require refactoring a bit (or adding new composedTreeLineage() helper that starts from the current node). I think we should eventually get rid of all these random helpers. On the other hand just switching parentOrShadowHostNode->parentInComposedTree is a good way to make progress fast.
Comment on attachment 290159 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=290159&action=review >> Source/WebCore/dom/Node.cpp:1845 >> + for (Node* node = this; node; node = node->parentInComposedTree()) { > > It would be more stylish to use ComposedTreeAncestorIterator. The current composedTreeAncestors() starts from the parent though so dealing with the OrSelf part here would require refactoring a bit (or adding new composedTreeLineage() helper that starts from the current node). > > I think we should eventually get rid of all these random helpers. On the other hand just switching parentOrShadowHostNode->parentInComposedTree is a good way to make progress fast. I'd keep parentInComposedTree for now, and we can do this in a separate patch if we'd so wished.
Committed r206605: <http://trac.webkit.org/changeset/206605>