Implement multiple AT_TARGET event dispatching in regard to shadow tree.
authorhayato@chromium.org <hayato@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jan 2012 03:56:16 +0000 (03:56 +0000)
committerhayato@chromium.org <hayato@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jan 2012 03:56:16 +0000 (03:56 +0000)
commitc6fa24ff07b892160a5dc366354145e6c9860cd9
treee53fdd1cdc38ebc515f546845bce9fd47d033b53
parent9ebef6a9bd02c6e05f9c6b81456d6e9005aabd48
Implement multiple AT_TARGET event dispatching in regard to shadow tree.
https://bugs.webkit.org/show_bug.cgi?id=76217

Reviewed by Dimitri Glazkov.

The original motivation is to fix the regression: Event.eventPhase is not set to 2
(at target) when handling dblclick event in <input> element.
Since the issue is not specific to <input> element, but general one, this patch fixes
the regression by adapting a living draft spec of shadow DOM.
This won't break a compatibility if there is no shadow boundaries in event dispatching.
See the following shadow dom spec how multiple AT_TARGET events work.
http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#event-dispatch

Source/WebCore:

* dom/EventContext.cpp:
(WebCore::EventContext::handleLocalEvents):

LayoutTests:

* fast/dom/shadow/shadow-boundary-events-expected.txt:
* fast/dom/shadow/shadow-boundary-events.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/shadow/shadow-boundary-events-expected.txt
LayoutTests/fast/dom/shadow/shadow-boundary-events.html
Source/WebCore/ChangeLog
Source/WebCore/dom/EventContext.cpp