Implement proper handling of events with a related target in regard to shadow DOM...
authorhayato@chromium.org <hayato@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 05:18:28 +0000 (05:18 +0000)
committerhayato@chromium.org <hayato@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 05:18:28 +0000 (05:18 +0000)
commita68e52e45ede3be68e60e34058da25cf1010c1d3
tree8e20f68bb0f56a2ef1265d166be69a0c15881462
parent7650ed4de31f708c2f37bceff4bd6e71b84d5412
Implement proper handling of events with a related target in regard to shadow DOM boundaries.
https://bugs.webkit.org/show_bug.cgi?id=65899

Reviewed by Dimitri Glazkov.

Fixes issues in the following corner cases:
1. When both a target node and a relatedTarget node are immediate children of
the same shadow root, an event is not dispatched.
2. If a target node is an ancestor of a relatedTarget node, crossing
shadow boundaries, or vice verse, an event is not dispatched or wrongly
dispatched.

Source/WebCore:

Test: fast/dom/shadow/shadow-boundary-events.html

* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::adjustToShadowBoundaries):

LayoutTests:

* fast/dom/shadow/shadow-boundary-crossing-expected.txt: Renamed from LayoutTests/fast/events/shadow-boundary-crossing-expected.txt.
* fast/dom/shadow/shadow-boundary-crossing.html: Renamed from LayoutTests/fast/events/shadow-boundary-crossing.html.
* fast/dom/shadow/shadow-boundary-events-expected.txt: Added.
* fast/dom/shadow/shadow-boundary-events.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/shadow/shadow-boundary-crossing-expected.txt [moved from LayoutTests/fast/events/shadow-boundary-crossing-expected.txt with 100% similarity]
LayoutTests/fast/dom/shadow/shadow-boundary-crossing.html [moved from LayoutTests/fast/events/shadow-boundary-crossing.html with 100% similarity]
LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/shadow/shadow-boundary-events.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/EventDispatcher.cpp