New issue
Advanced search Search tips

Issue 692000 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Fallback to legacy type only when event is trusted

Project Member Reported by foolip@chromium.org, Feb 14 2017

Issue description

When dispatching e.g. an "animationstart" event, we fall back to "webkitanimationstart" if there were no listeners for "animationstart". This happens in EventTarget::fireEventListeners.

This behavior has made its way into DOM, and was tweaked to only apply to trusted events:
https://github.com/whatwg/dom/issues/404
https://github.com/whatwg/dom/pull/406
https://github.com/w3c/web-platform-tests/pull/4687

Blink needs to be updated to align with this change.

Adding Hotlist-Interop, because the source of this change was breakage in Firefox due to not doing this:
https://bugzilla.mozilla.org/show_bug.cgi?id=1332699

If we keep our behavior for a long time but Gecko changes, it's likely content will somehow come to depend on our behavior, and leave Gecko with a choice between which sites to break.
 
Owner: hayato@chromium.org
Cc: dominicc@chromium.org
Owner: foolip@chromium.org
Status: Assigned (was: Untriaged)
foolip, can you investigate? We appear to have imported and be passing that test despite not checking whether the event is trusted.

Please assign it back to me when you're done.
Cc: -dominicc@chromium.org foolip@chromium.org
Owner: dominicc@chromium.org
Oops, I see we have FAIL expectations for it.

Note to self, the test in the web-platform-tests PR is dom/events/EventListener-invoke-legacy.html.

Comment 4 by foolip@chromium.org, Feb 22 2017

The WebKit fix was in https://trac.webkit.org/changeset/212321 and can perhaps be ported directly.

Comment 5 by tkent@chromium.org, Mar 15 2017

Components: -Blink>DOM>Events Blink>DOM
Remove Blink>DOM>Events
Owner: ----
Status: Untriaged (was: Assigned)
DOM, events, maybe I'm not the best person to work on this.

Comment 7 by tkent@chromium.org, Jun 23 2017

 Issue 733872  has been merged into this issue.

Comment 8 by tkent@chromium.org, Jun 23 2017

Labels: Hotlist-GoodFirstBug
Status: Available (was: Untriaged)
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/557d70331a61f3cffa61c4ba52026f4fd7cd9912

commit 557d70331a61f3cffa61c4ba52026f4fd7cd9912
Author: Sunny <ratsunny@gmail.com>
Date: Tue Jun 27 00:20:15 2017

Fallback to legacy type only when event is trusted

According to the spec[1], |isTrusted| should be tested before
fallback to the legacy event type.

4 failed tests will be passed after this change.

[1] https://dom.spec.whatwg.org/#concept-event-listener-invoke

Bug:  692000 
Change-Id: I6f890f738d96b179e404f6db90f7ebe5041c351c
Reviewed-on: https://chromium-review.googlesource.com/547448
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482482}
[delete] https://crrev.com/a8e8222c1c77c9234b3ee203d0e5e6a491c7e80f/third_party/WebKit/LayoutTests/external/wpt/dom/events/EventListener-invoke-legacy-expected.txt
[modify] https://crrev.com/557d70331a61f3cffa61c4ba52026f4fd7cd9912/third_party/WebKit/Source/core/events/EventTarget.cpp

Comment 10 by tkent@chromium.org, Jun 27 2017

Labels: M-61
Status: Fixed (was: Available)

Sign in to add a comment