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

Issue 2249663002: Fixed & refactored mouse event firing at gesture context menu (Closed)

Created:
4 years, 4 months ago by mustaq
Modified:
4 years, 3 months ago
CC:
blink-reviews, chromium-reviews, dtapuska+blinkwatch_chromium.org, nzolghadr+blinkwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/f8139269d2dab360ec45b10c9f3fbcee67f504e7 Cr-Commit-Position: refs/heads/master@{#414773}

Patch Set 1 #

Patch Set 2 : Removed mousemoves from long-press, refactored. #

Patch Set 3 : Fixed tests, removed one overfitting #

Total comments: 2

Patch Set 4 : Rebased #

Patch Set 5 : Brought back mousedown firing :( #

Patch Set 6 : Realigned test outcomes. #

Total comments: 8

Messages

Total messages: 35 (19 generated)
mustaq
ptal
4 years, 4 months ago (2016-08-17 15:27:55 UTC) #4
mustaq
dtapuska@: ptal, this is ready for review now. varunjain@: I tested my patch on CrOS, ...
4 years, 4 months ago (2016-08-19 16:58:11 UTC) #7
dtapuska
lgtm https://codereview.chromium.org/2249663002/diff/60001/third_party/WebKit/Source/core/input/GestureManager.h File third_party/WebKit/Source/core/input/GestureManager.h (right): https://codereview.chromium.org/2249663002/diff/60001/third_party/WebKit/Source/core/input/GestureManager.h#newcode17 third_party/WebKit/Source/core/input/GestureManager.h:17: class HitTestResult; Its unclear why this change is ...
4 years, 4 months ago (2016-08-19 19:07:12 UTC) #8
mustaq
https://codereview.chromium.org/2249663002/diff/60001/third_party/WebKit/Source/core/input/GestureManager.h File third_party/WebKit/Source/core/input/GestureManager.h (right): https://codereview.chromium.org/2249663002/diff/60001/third_party/WebKit/Source/core/input/GestureManager.h#newcode17 third_party/WebKit/Source/core/input/GestureManager.h:17: class HitTestResult; On 2016/08/19 19:07:12, dtapuska wrote: > Its ...
4 years, 4 months ago (2016-08-19 19:38:36 UTC) #9
mustaq
mohsen@: Any clue why the test is timing out at Wait()? https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/284221/steps/browser_side_navigation_content_browsertests%20%28with%20patch%29%20on%20Ubuntu-12.04/logs/stdio
4 years, 4 months ago (2016-08-22 20:27:14 UTC) #11
mustaq
bokan@chromium.org: Please review changes in Source/core.
4 years, 3 months ago (2016-08-26 14:56:22 UTC) #17
mustaq
On 2016/08/22 20:27:14, mustaq wrote: > mohsen@: Any clue why the test is timing out ...
4 years, 3 months ago (2016-08-26 15:30:54 UTC) #18
bokan
Just some clarification questions. Also, could you elaborate in the description of exactly what changes ...
4 years, 3 months ago (2016-08-26 16:55:15 UTC) #21
mustaq
https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Source/core/input/EventHandler.cpp File third_party/WebKit/Source/core/input/EventHandler.cpp (left): https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Source/core/input/EventHandler.cpp#oldcode1521 third_party/WebKit/Source/core/input/EventHandler.cpp:1521: if (mouseEvent.getSyntheticEventType() == PlatformMouseEvent::FromTouch) On 2016/08/26 16:55:14, bokan wrote: ...
4 years, 3 months ago (2016-08-26 17:19:03 UTC) #23
bokan
https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Source/core/input/EventHandler.cpp File third_party/WebKit/Source/core/input/EventHandler.cpp (left): https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Source/core/input/EventHandler.cpp#oldcode1521 third_party/WebKit/Source/core/input/EventHandler.cpp:1521: if (mouseEvent.getSyntheticEventType() == PlatformMouseEvent::FromTouch) On 2016/08/26 17:19:03, mustaq wrote: ...
4 years, 3 months ago (2016-08-26 17:31:54 UTC) #24
mustaq
https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Source/core/input/EventHandler.cpp File third_party/WebKit/Source/core/input/EventHandler.cpp (left): https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Source/core/input/EventHandler.cpp#oldcode1521 third_party/WebKit/Source/core/input/EventHandler.cpp:1521: if (mouseEvent.getSyntheticEventType() == PlatformMouseEvent::FromTouch) On 2016/08/26 17:31:53, bokan wrote: ...
4 years, 3 months ago (2016-08-26 19:02:06 UTC) #25
bokan
On 2016/08/26 19:02:06, mustaq wrote: > https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Source/core/input/EventHandler.cpp > File third_party/WebKit/Source/core/input/EventHandler.cpp (left): > > https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Source/core/input/EventHandler.cpp#oldcode1521 > ...
4 years, 3 months ago (2016-08-26 19:03:14 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2249663002/140001
4 years, 3 months ago (2016-08-26 19:05:22 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:140001)
4 years, 3 months ago (2016-08-26 19:10:28 UTC) #31
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/f8139269d2dab360ec45b10c9f3fbcee67f504e7 Cr-Commit-Position: refs/heads/master@{#414773}
4 years, 3 months ago (2016-08-26 19:16:46 UTC) #33
Navid Zolghadr
4 years, 3 months ago (2016-08-29 15:19:51 UTC) #35
Message was sent while issue was closed.
https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/input/GestureManager.cpp (right):

https://codereview.chromium.org/2249663002/diff/140001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/input/GestureManager.cpp:322:
m_frame->eventHandler().handleMousePressEvent(mev);
It seems we have changed the flow quite a bit here. For example previously that
we were calling handleMousePressEvent(PlatformMouseEvent) at first we were doing
some bookkeeping of m_mousePressNode or selection related stuff here
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/input/Eve...

But now we are not doing any of that. Wouldn't that make any problem? Here is
one scenario which might have changed after this CL.

m_mousePressNode is used as the scrolling node when it is set and no other
element has the focus in scrollManager from the call here. So if we have no
scrollable element on a page except a small div somewhere. Now if you tap the
div. Then try to scroll with mouse wheel or keyboard. Before this change I
believe that div would scroll and after this change nothing would scroll I
believe.

Powered by Google App Engine
This is Rietveld 408576698