Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Issue 2418363002: Fix case for event dispatch mutiple after stopPropagation (Closed)

Created:
4 years, 2 months ago by xing.xu
Modified:
3 years, 9 months ago
Reviewers:
foolip
CC:
chromium-reviews, blink-reviews, tfarina, blink-reviews-w3ctests_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix case for event dispatch mutiple after stopPropagation https://www.w3.org/TR/DOM-Level-2-Events/events.html says: "Once an event's stopPropagation method has been called, further calls to that method have no additional effect". But it doesn't define if stopped event should be resumed when being dispatched again. While this works on firefox. Case is from http://w3c-test.org/dom/events/Event-dispatch-multiple-stopPropagation.html BUG=656839

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M third_party/WebKit/LayoutTests/imported/wpt/dom/events/Event-dispatch-multiple-stopPropagation.html View 1 chunk +4 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/imported/wpt/dom/events/Event-dispatch-multiple-stopPropagation-expected.txt View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 10 (7 generated)
xing.xu
PTAL.
4 years, 2 months ago (2016-10-15 10:58:29 UTC) #7
foolip
The currently maintained DOM spec is https://dom.spec.whatwg.org/, please check what it says is the right ...
4 years, 2 months ago (2016-10-15 20:28:55 UTC) #8
foolip
4 years, 2 months ago (2016-10-15 20:41:26 UTC) #9
On 2016/10/15 20:28:55, foolip wrote:
> The currently maintained DOM spec is https://dom.spec.whatwg.org/, please
check
> what it says is the right behavior here and update the description.
> 
> If the test is indeed wrong, it's unfortunately not yet possible to change
> web-platform-tests by changing the imported copy in the Chromium tree.
Instead,
> you'll have to create a pull request on
> https://github.com/w3c/web-platform-tests, I am @foolip on GitHub if you want
me
> to have a look.
> 
>
https://docs.google.com/document/d/1JgPTyIWmjlXyhyatiZ9A6fSbUQPjCyM26budEY90V...
> is a plan for how it might become possible to edit these tests in-place, we'll
> announce on blink-dev when we're ready for testing, you might want to be an
> early adopter if you tend to work on test failures and spec compliance issues
:)

Took a look, I'm pretty sure the failure is legit and Blink needs to change. At
the end of https://dom.spec.whatwg.org/#concept-event-dispatch it says "Unset
event’s dispatch flag, stop propagation flag, and stop immediate propagation
flag" which doesn't seem to happen. Right before "event->setEventPhase(0)"
(should use Event::kNone) in EventTarget::dispatchEventInternal would be the
place, and similar for IDBEventDispatcher::dispatch.

Powered by Google App Engine
This is Rietveld 408576698