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

Issue 2255323004: Create MouseEventManager and EventHandlingUtil (Closed)

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

Description

The first step of separating mouse code from EventHandler. There will be follow up CLs to refactor more code and address the TODOs added in this CL. Creating MouseEventManager to encapsule mouse related bookkeeping and dispatching. Creating abstract BoundaryEventDispatcher to keep the boundary node elements calculation so PEM and MEM can make subclasses from it and send their own boundary events. Creating EventHandlingUtil to share the common functions used in different EventHandling path instead of putting them all as static in EventHandler. BUG=625843 Committed: https://crrev.com/2c6e050f06efedae49f77dd91baa016dbd2e8fe9 Cr-Commit-Position: refs/heads/master@{#416984}

Patch Set 1 #

Total comments: 7

Patch Set 2 : More refactoring #

Patch Set 3 : Rebasing #

Total comments: 14

Patch Set 4 : Add TODOs #

Patch Set 5 : Rebasing #

Total comments: 13

Patch Set 6 : Applying comments #

Total comments: 10

Patch Set 7 : Make all *Manager classes GarbageCollected #

Total comments: 8

Patch Set 8 : Rebasing and comments #

Patch Set 9 : Rebasing and comments #

Patch Set 10 : Rebasing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+678 lines, -372 lines) Patch
M third_party/WebKit/Source/core/events/MouseEvent.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLLabelElement.cpp View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/input/BoundaryEventDispatcher.h View 1 2 3 4 5 6 7 1 chunk +36 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp View 1 2 3 4 5 6 7 8 1 chunk +134 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.h View 1 2 3 4 5 6 6 chunks +7 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 2 3 4 5 6 7 36 chunks +72 lines, -117 lines 0 comments Download
A third_party/WebKit/Source/core/input/EventHandlingUtil.h View 1 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/input/EventHandlingUtil.cpp View 1 1 chunk +62 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/GestureManager.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/input/GestureManager.cpp View 1 2 3 4 5 6 7 7 chunks +7 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/input/KeyboardEventManager.h View 1 2 3 4 5 6 7 3 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/input/KeyboardEventManager.cpp View 1 2 3 4 5 6 7 6 chunks +6 lines, -8 lines 0 comments Download
A third_party/WebKit/Source/core/input/MouseEventManager.h View 1 2 3 4 5 6 7 1 chunk +78 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/input/MouseEventManager.cpp View 1 2 3 4 5 6 7 1 chunk +134 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/PointerEventManager.h View 1 2 3 4 5 6 7 5 chunks +27 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/core/input/PointerEventManager.cpp View 1 2 3 4 5 6 7 11 chunks +64 lines, -191 lines 0 comments Download
M third_party/WebKit/Source/core/input/ScrollManager.h View 1 2 3 4 5 6 7 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/input/ScrollManager.cpp View 1 2 3 4 5 6 7 3 chunks +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/input/TouchEventManager.h View 1 2 3 4 5 6 7 2 chunks +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/input/TouchEventManager.cpp View 1 2 3 4 5 6 7 4 chunks +4 lines, -8 lines 0 comments Download

Messages

Total messages: 67 (40 generated)
Navid Zolghadr
There is a few more things I wanted to do for this CL. But I ...
4 years, 4 months ago (2016-08-19 18:09:59 UTC) #2
mustaq
EventHandlingUtil::BoundaryEventDispatcher looks a good separation of boundary event specific tasks, thanks. I think a templated ...
4 years, 4 months ago (2016-08-23 15:20:48 UTC) #3
Navid Zolghadr
https://codereview.chromium.org/2255323004/diff/1/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp File third_party/WebKit/Source/core/input/EventHandlingUtil.cpp (right): https://codereview.chromium.org/2255323004/diff/1/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp#newcode112 third_party/WebKit/Source/core/input/EventHandlingUtil.cpp:112: void sendBoundaryEvents( On 2016/08/23 15:20:48, mustaq wrote: > Make ...
4 years, 3 months ago (2016-08-24 16:07:28 UTC) #4
mustaq
https://codereview.chromium.org/2255323004/diff/1/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp File third_party/WebKit/Source/core/input/EventHandlingUtil.cpp (right): https://codereview.chromium.org/2255323004/diff/1/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp#newcode112 third_party/WebKit/Source/core/input/EventHandlingUtil.cpp:112: void sendBoundaryEvents( On 2016/08/24 16:07:28, Navid Zolghadr wrote: > ...
4 years, 3 months ago (2016-08-26 19:31:45 UTC) #5
Navid Zolghadr
ptal. https://codereview.chromium.org/2255323004/diff/1/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp File third_party/WebKit/Source/core/input/EventHandlingUtil.cpp (right): https://codereview.chromium.org/2255323004/diff/1/third_party/WebKit/Source/core/input/EventHandlingUtil.cpp#newcode112 third_party/WebKit/Source/core/input/EventHandlingUtil.cpp:112: void sendBoundaryEvents( On 2016/08/26 19:31:44, mustaq wrote: > ...
4 years, 3 months ago (2016-08-30 18:46:26 UTC) #12
mustaq
Yes, the boundary events class looks better. I will ask you to check one more ...
4 years, 3 months ago (2016-08-30 21:49:23 UTC) #15
Navid Zolghadr
There are still quite a bit of code to move out of EventHandler. However, the ...
4 years, 3 months ago (2016-08-31 14:23:48 UTC) #16
mustaq
LGTM on the incremental plan... - Add TODOs at least for the mouse states I ...
4 years, 3 months ago (2016-08-31 14:39:37 UTC) #17
Navid Zolghadr
bokan@chromium.org: Please review changes in Webkit/Source/core/*
4 years, 3 months ago (2016-08-31 15:19:03 UTC) #26
bokan
+haraken@ for Oilpan question. https://codereview.chromium.org/2255323004/diff/80001/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp File third_party/WebKit/Source/core/html/HTMLLabelElement.cpp (right): https://codereview.chromium.org/2255323004/diff/80001/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp#newcode175 third_party/WebKit/Source/core/html/HTMLLabelElement.cpp:175: if (isLabelTextSelected && toMouseEvent(evt)->detail() == ...
4 years, 3 months ago (2016-09-01 13:50:13 UTC) #30
Navid Zolghadr
https://codereview.chromium.org/2255323004/diff/80001/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp File third_party/WebKit/Source/core/html/HTMLLabelElement.cpp (right): https://codereview.chromium.org/2255323004/diff/80001/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp#newcode175 third_party/WebKit/Source/core/html/HTMLLabelElement.cpp:175: if (isLabelTextSelected && toMouseEvent(evt)->detail() == 1) On 2016/09/01 13:50:13, ...
4 years, 3 months ago (2016-09-01 14:30:41 UTC) #31
bokan
Also, nit in description: "make subclasses from is and send their own boundary events." ^ ...
4 years, 3 months ago (2016-09-01 16:00:54 UTC) #32
Navid Zolghadr
ptal https://codereview.chromium.org/2255323004/diff/80001/third_party/WebKit/Source/core/input/MouseEventManager.h File third_party/WebKit/Source/core/input/MouseEventManager.h (right): https://codereview.chromium.org/2255323004/diff/80001/third_party/WebKit/Source/core/input/MouseEventManager.h#newcode20 third_party/WebKit/Source/core/input/MouseEventManager.h:20: // properties of active pointer events. On 2016/09/01 ...
4 years, 3 months ago (2016-09-01 17:07:28 UTC) #36
haraken
https://codereview.chromium.org/2255323004/diff/80001/third_party/WebKit/Source/core/input/EventHandler.h File third_party/WebKit/Source/core/input/EventHandler.h (right): https://codereview.chromium.org/2255323004/diff/80001/third_party/WebKit/Source/core/input/EventHandler.h#newcode394 third_party/WebKit/Source/core/input/EventHandler.h:394: ScrollManager m_scrollManager; On 2016/09/01 13:50:13, bokan wrote: > I ...
4 years, 3 months ago (2016-09-01 17:12:47 UTC) #37
haraken
https://codereview.chromium.org/2255323004/diff/100001/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp File third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp (right): https://codereview.chromium.org/2255323004/diff/100001/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp#newcode14 third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp:14: bool isInDocument(EventTarget* n) n => target https://codereview.chromium.org/2255323004/diff/100001/third_party/WebKit/Source/core/input/MouseEventManager.h File third_party/WebKit/Source/core/input/MouseEventManager.h ...
4 years, 3 months ago (2016-09-01 17:21:59 UTC) #38
mustaq
Just a nit... https://codereview.chromium.org/2255323004/diff/100001/third_party/WebKit/Source/core/input/MouseEventManager.h File third_party/WebKit/Source/core/input/MouseEventManager.h (right): https://codereview.chromium.org/2255323004/diff/100001/third_party/WebKit/Source/core/input/MouseEventManager.h#newcode20 third_party/WebKit/Source/core/input/MouseEventManager.h:20: // position and related states mouse ...
4 years, 3 months ago (2016-09-01 19:21:27 UTC) #39
Navid Zolghadr
ptal. https://codereview.chromium.org/2255323004/diff/100001/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp File third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp (right): https://codereview.chromium.org/2255323004/diff/100001/third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp#newcode14 third_party/WebKit/Source/core/input/BoundaryEventDispatcher.cpp:14: bool isInDocument(EventTarget* n) On 2016/09/01 17:21:58, haraken wrote: ...
4 years, 3 months ago (2016-09-01 19:31:54 UTC) #41
haraken
In terms of Oilpan, LGTM. https://codereview.chromium.org/2255323004/diff/120001/third_party/WebKit/Source/core/input/GestureManager.h File third_party/WebKit/Source/core/input/GestureManager.h (right): https://codereview.chromium.org/2255323004/diff/120001/third_party/WebKit/Source/core/input/GestureManager.h#newcode23 third_party/WebKit/Source/core/input/GestureManager.h:23: class CORE_EXPORT GestureManager final ...
4 years, 3 months ago (2016-09-01 23:31:16 UTC) #45
dtapuska
publishing my drafts I had been sitting on.. I know it is from a few ...
4 years, 3 months ago (2016-09-02 03:26:27 UTC) #46
Navid Zolghadr
ptal. https://codereview.chromium.org/2255323004/diff/40001/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp File third_party/WebKit/Source/core/html/HTMLLabelElement.cpp (right): https://codereview.chromium.org/2255323004/diff/40001/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp#newcode175 third_party/WebKit/Source/core/html/HTMLLabelElement.cpp:175: if (isLabelTextSelected && toMouseEvent(evt)->detail() == 1) On 2016/09/02 ...
4 years, 3 months ago (2016-09-02 16:36:46 UTC) #51
Navid Zolghadr
On 2016/09/02 16:36:46, Navid Zolghadr wrote: > ptal. > > https://codereview.chromium.org/2255323004/diff/40001/third_party/WebKit/Source/core/html/HTMLLabelElement.cpp > File third_party/WebKit/Source/core/html/HTMLLabelElement.cpp (right): ...
4 years, 3 months ago (2016-09-07 14:37:25 UTC) #54
bokan
lgtm
4 years, 3 months ago (2016-09-07 14:52:39 UTC) #55
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/2255323004/160001
4 years, 3 months ago (2016-09-07 15:09:12 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/64939) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 3 months ago (2016-09-07 15:10:58 UTC) #60
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/2255323004/180001
4 years, 3 months ago (2016-09-07 16:08:27 UTC) #63
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 3 months ago (2016-09-07 17:41:12 UTC) #65
commit-bot: I haz the power
4 years, 3 months ago (2016-09-07 17:43:23 UTC) #67
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/2c6e050f06efedae49f77dd91baa016dbd2e8fe9
Cr-Commit-Position: refs/heads/master@{#416984}

Powered by Google App Engine
This is Rietveld 408576698