Supports traversing nodes in an orphaned shadow subtree in ComposedShadowTreeParentWa...
authorhayato@chromium.org <hayato@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Jun 2012 22:35:42 +0000 (22:35 +0000)
committerhayato@chromium.org <hayato@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Jun 2012 22:35:42 +0000 (22:35 +0000)
commit63a526201ed03545528454c49e6162bdd402d244
tree4c028a600ceaf3a1fad0c0825a18ae7ecb951c83
parent02dec62d75b1b8623c6a3d6c13cfae6cddd1ef0b
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
LayoutTests/ChangeLog
LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching-expected.txt
LayoutTests/fast/dom/shadow/shadow-dom-event-dispatching.html
Source/WebCore/ChangeLog
Source/WebCore/dom/ComposedShadowTreeWalker.cpp