New issue
Advanced search Search tips

Issue 680377 link

Starred by 4 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

Blocking:
issue 679779



Sign in to add a comment

pointerover/pointerout relatedTarget/fromElement properties drill down into shadow DOM

Project Member Reported by rbyers@chromium.org, Jan 12 2017

Issue description

Chrome Version: 57.0.2950.4
OS: Linux

What steps will reproduce the problem?
(1) Load http://output.jsbin.com/kofasob
(2) Drag onto the input field and then off

What is the expected result?
Expect to pointerover/out and mouseover/out events to refer only to nodes in the main document.

What happens instead?
pointerover/out events have a relatedTarget/fromElement that is within the shadowDom for <input> (DIV#inner-editor):

pointerout: target=BODY relatedTarget=DIV#inner-editor fromElement=DIV#inner-editor toElement=BODY
pointerover: target=INPUT relatedTarget=BODY fromElement=BODY toElement=INPUT
mouseout: target=BODY relatedTarget=INPUT fromElement=BODY toElement=INPUT
mouseover: target=INPUT relatedTarget=BODY fromElement=BODY toElement=INPUT
pointerout: target=INPUT relatedTarget=BODY fromElement=BODY toElement=INPUT
pointerover: target=BODY relatedTarget=DIV#inner-editor fromElement=DIV#inner-editor toElement=BODY
mouseout: target=INPUT relatedTarget=BODY fromElement=INPUT toElement=BODY
mouseover: target=BODY relatedTarget=INPUT fromElement=INPUT toElement=BODY

Reported by jQuery here: https://github.com/jquery/jquery/issues/3490#issuecomment-271920001

I guess this helps answer the question we were discussing the other day about whether we're missing any pointer events shadowDom test cases ;-)

 

Comment 1 by mustaq@chromium.org, Jan 12 2017

Labels: Hotlist-Input-Dev PointerEvent
Owner: mustaq@chromium.org
Status: Assigned (was: Untriaged)

Comment 2 by mustaq@chromium.org, Jan 12 2017

Looks like we are missing a call to FlatTreeTraversal::parent in/before PointerEventManager::setNodeUnderPointer()?

Comment 3 by mustaq@chromium.org, Jan 18 2017

Status: Started (was: Assigned)
I originally suspected a crack in finding the node under pointer but a long debugging reveals that EventTarget::dispatchEvent() gets the same relatedTarget for both pointerout and mouseout. The field gets modified somewhere in/after this dispatch call but only for mouseout.

Comment 4 by mustaq@chromium.org, Jan 19 2017

Blocking: 679779

Comment 5 by mustaq@chromium.org, Jan 19 2017

Looks like a bad assumption in event-path about the events that need adjustments in relatedTarget.
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 23 2017

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

commit 8faf57e342f36ad4edb0a99b260f81889a2b6f77
Author: mustaq <mustaq@chromium.org>
Date: Mon Jan 23 18:26:37 2017

Event-path fix-up for PointerEvents in shadow dom.

This CL fixes the bug that fired PointerEvents can have |relatedEvent|
pointing to shodow dom nodes.

BUG= 680377 

Review-Url: https://codereview.chromium.org/2640413002
Cr-Commit-Position: refs/heads/master@{#445414}

[add] https://crrev.com/8faf57e342f36ad4edb0a99b260f81889a2b6f77/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-boundary-events-for-shadowdom.html
[modify] https://crrev.com/8faf57e342f36ad4edb0a99b260f81889a2b6f77/third_party/WebKit/Source/core/events/NodeEventContext.cpp

Comment 7 by mustaq@chromium.org, Jan 23 2017

Labels: Merge-Request-57
Status: Fixed (was: Started)

Comment 8 by mustaq@chromium.org, Jan 23 2017

Labels: -Merge-Request-57
I will verify in a Canary/Dev build before merge request.

Comment 9 by mustaq@chromium.org, Jan 25 2017

Labels: ReleaseBlock-Beta Merge-Request-57
Status: Verified (was: Fixed)
Verified the fix in Windows Canary (58.0.2992.0).
Project Member

Comment 10 by sheriffbot@chromium.org, Jan 25 2017

Labels: -Merge-Request-57 Hotlist-Merge-Approved Merge-Approved-57
Your change meets the bar and is auto-approved for M57. Please go ahead and merge the CL to branch 2987 manually. Please contact milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 25 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e1077806cb434e27c2036e985a2416ac690eaa8e

commit e1077806cb434e27c2036e985a2416ac690eaa8e
Author: Mustaq Ahmed <mustaq@google.com>
Date: Wed Jan 25 18:58:45 2017

Event-path fix-up for PointerEvents in shadow dom.

This CL fixes the bug that fired PointerEvents can have |relatedEvent|
pointing to shodow dom nodes.

BUG= 680377 

Review-Url: https://codereview.chromium.org/2640413002
Cr-Commit-Position: refs/heads/master@{#445414}
(cherry picked from commit 8faf57e342f36ad4edb0a99b260f81889a2b6f77)

Review-Url: https://codereview.chromium.org/2656613007 .
Cr-Commit-Position: refs/branch-heads/2987@{#93}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[add] https://crrev.com/e1077806cb434e27c2036e985a2416ac690eaa8e/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-boundary-events-for-shadowdom.html
[modify] https://crrev.com/e1077806cb434e27c2036e985a2416ac690eaa8e/third_party/WebKit/Source/core/events/NodeEventContext.cpp

Sign in to add a comment