New issue
Advanced search Search tips

Issue 629876 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

sendContextMenuEventForGesture should send DOM events only

Project Member Reported by mustaq@chromium.org, Jul 20 2016

Issue description

... instead of handleMousePressEvent call.

We had the fix in https://codereview.chromium.org/2141993003/#ps100001: replaced the call to handleMousePressEvent from sendContextMenuEventForGesture with a minimal DOM event firing code.

Since sendContextMenuEventForGesture is used in handlers for GestureLongPress, GestureLongTap & GestureTwoFingerTap events, we thought we caused regression in CrOS: long-press context menu doesn't appear until touch release.

We discovered later on that the CL was NOT causing this, even CrOS dev channel device showed the same behavior today. We still decided to go for a simpler change for the above CL to hit the tree quickly before the MS hackathon.

We would commit the cleaner fix later on.
 

Comment 1 by mustaq@chromium.org, Aug 15 2016

Labels: Hotlist-Fixit
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Aug 26 2016

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

commit f8139269d2dab360ec45b10c9f3fbcee67f504e7
Author: mustaq <mustaq@chromium.org>
Date: Fri Aug 26 19:10:07 2016

Fixed & refactored mouse event firing at gesture context menu

The context menu code for gesture long-press used to fire mousedown &
contextmenu events with wrong button/buttons attributes (w.r.t. both
the spec & other browsers). This CL fixes those attribute values.

Moreover, the existing code achieved the desired outcome of a
long-press (setting focus before context menu) through calling the raw
PlatformMouseEvent entrypoint. This CL cherry-picks the needed steps,
thus provides a cleaner alternative to double-pointer-event firing
(minimally fixed through part of crrev.com/2141993003). We don't expect
any change in behavior for this part of the CL.

BUG= 579564 , 629876 

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

[modify] https://crrev.com/f8139269d2dab360ec45b10c9f3fbcee67f504e7/third_party/WebKit/LayoutTests/fast/events/mouse-event-buttons-attribute-expected.txt
[modify] https://crrev.com/f8139269d2dab360ec45b10c9f3fbcee67f504e7/third_party/WebKit/LayoutTests/fast/events/pointerevents/mouse-pointer-chorded-buttons.html
[modify] https://crrev.com/f8139269d2dab360ec45b10c9f3fbcee67f504e7/third_party/WebKit/LayoutTests/fast/events/pointerevents/touch-pointer-long-press.html
[modify] https://crrev.com/f8139269d2dab360ec45b10c9f3fbcee67f504e7/third_party/WebKit/Source/core/events/MouseEvent.cpp
[modify] https://crrev.com/f8139269d2dab360ec45b10c9f3fbcee67f504e7/third_party/WebKit/Source/core/input/EventHandler.cpp
[modify] https://crrev.com/f8139269d2dab360ec45b10c9f3fbcee67f504e7/third_party/WebKit/Source/core/input/EventHandler.h
[modify] https://crrev.com/f8139269d2dab360ec45b10c9f3fbcee67f504e7/third_party/WebKit/Source/core/input/GestureManager.cpp

Comment 3 by mustaq@chromium.org, Aug 26 2016

Status: Fixed (was: Started)

Sign in to add a comment