Supports traversing nodes in an orphaned shadow subtree in ComposedShadowTreeParentWalker.
https://bugs.webkit.org/show_bug.cgi?id=87924
Reviewed by Dimitri Glazkov.
Source/WebCore:
Some events, such as a 'click' event, can be dispatched on nodes in an orphaned shadow subtree.
When resolving a parent node of a shadow root which is not assigned to any shadow insertion point,
we have to return its shadow host as a parent node.
The related shadow DOM spec section is:
https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events
Test: fast/dom/shadow/shadow-dom-event-dispatching.html
* dom/ComposedShadowTreeWalker.cpp:
(WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot):
LayoutTests:
* fast/dom/shadow/shadow-dom-event-dispatching-expected.txt:
* fast/dom/shadow/shadow-dom-event-dispatching.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119365
268f45cc-cd09-0410-ab3c-
d52691b4dbfc