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

Issue 1119423003: Refactors away method implementations in ui::EventTargeter (Closed)

Created:
5 years, 7 months ago by varkha
Modified:
5 years, 6 months ago
CC:
chromium-reviews, kalyank, jdduke+watch_chromium.org, tfarina, tdresser+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactors away method implementations in ui::EventTargeter ui::EventTargeter is now a pure virtual interface with only two methods: FindTargetForEvent FindNextBestTarget. Following methods are removed from ui::EventTargeter and got added (with implementations) to aura::WindowTargeter: FindTargetForLocatedEvent SubtreeCanAcceptEvent EventLocationInsideBounds SubtreeShouldBeExploredForEvent Method implementations in aura::WindowTargeter that perform LocatedEvent targeting now take Window* instead of EventTarget*. Tests moved out of EventProcessorTest into WindowTargeterTest: + Bounds + TargeterChecksOwningEventTarget Those tests now require a bit less plumbing since a aura::Window implements coordinates based targeting. EventProcessorTest tests now use TestEventTarget that provides bubbling behavior optionally and can have an event target changed at runtime with set_target(). BUG=395388 TEST=EventProcessorTest, WindowTargeterTest TBR=sky@chromium.org Committed: https://crrev.com/9c6bcf714a44413a5bf00a4cd346197d854464e6 Cr-Commit-Position: refs/heads/master@{#333993}

Patch Set 1 : Refactors away method implementations in ui::EventTargeter #

Total comments: 4

Patch Set 2 : Refactors away method implementations in ui::EventTargeter (comment) #

Patch Set 3 : Refactors away method implementations in ui::EventTargeter (moves tests to aura) #

Total comments: 9

Patch Set 4 : Refactors ui::EventTargeter (makes ui::EventTargeter pure virtual) #

Total comments: 24

Patch Set 5 : Refactors ui::EventTargeter (comments) #

Total comments: 8

Patch Set 6 : Refactors ui::EventTargeter (nits) #

Patch Set 7 : Refactors ui::EventTargeter (rebased) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+447 lines, -413 lines) Patch
M ash/accelerators/magnifier_key_scroller.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ash/accelerators/magnifier_key_scroller_unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ash/accelerators/spoken_feedback_toggler.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ash/display/mouse_cursor_event_filter.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ash/utility/partial_screenshot_controller.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ash/wm/cursor_manager_chromeos.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ash/wm/resize_handle_window_targeter.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M ash/wm/resize_handle_window_targeter.cc View 1 2 3 4 3 chunks +12 lines, -10 lines 0 comments Download
M chrome/browser/ui/views/apps/app_window_easy_resize_window_targeter.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/apps/app_window_easy_resize_window_targeter.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/aura/overscroll_window_delegate.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/window_targeter.h View 1 2 3 4 2 chunks +42 lines, -8 lines 0 comments Download
M ui/aura/window_targeter.cc View 1 2 3 4 4 chunks +90 lines, -52 lines 0 comments Download
M ui/aura/window_targeter_unittest.cc View 1 2 3 2 chunks +121 lines, -4 lines 0 comments Download
M ui/events/BUILD.gn View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M ui/events/event_processor_unittest.cc View 1 2 3 4 5 11 chunks +30 lines, -183 lines 0 comments Download
M ui/events/event_targeter.h View 1 2 3 4 3 chunks +3 lines, -41 lines 0 comments Download
M ui/events/event_targeter.cc View 1 2 3 1 chunk +0 lines, -73 lines 0 comments Download
M ui/events/events.gyp View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M ui/events/null_event_targeter.h View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M ui/events/null_event_targeter.cc View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M ui/events/test/test_event_target.h View 1 2 3 4 2 chunks +3 lines, -1 line 0 comments Download
A ui/events/test/test_event_targeter.h View 1 2 3 4 5 1 chunk +44 lines, -0 lines 0 comments Download
A ui/events/test/test_event_targeter.cc View 1 2 3 4 5 1 chunk +37 lines, -0 lines 0 comments Download
M ui/views/test/event_generator_delegate_mac.mm View 1 2 3 4 4 chunks +14 lines, -4 lines 0 comments Download
M ui/views/view_targeter.h View 1 2 3 2 chunks +11 lines, -4 lines 0 comments Download
M ui/views/view_targeter.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M ui/wm/core/easy_resize_window_targeter.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ui/wm/core/easy_resize_window_targeter.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M ui/wm/core/masked_window_targeter.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M ui/wm/core/masked_window_targeter.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 92 (44 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/40001
5 years, 7 months ago (2015-05-04 20:59:26 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/33888) linux_chromium_gn_dbg on ...
5 years, 7 months ago (2015-05-04 21:09:19 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/100001
5 years, 7 months ago (2015-05-05 16:50:10 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/68568)
5 years, 7 months ago (2015-05-05 17:02:20 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/120001
5 years, 7 months ago (2015-05-05 19:55:02 UTC) #18
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/14556)
5 years, 7 months ago (2015-05-05 21:08:51 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/140001
5 years, 7 months ago (2015-05-05 22:41:19 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-06 00:37:57 UTC) #25
varkha
tdanderson@, sadrul@, I have simplified the EventTargeter interface a bit but I found that some ...
5 years, 7 months ago (2015-05-06 18:39:09 UTC) #27
tdanderson
Thanks for putting up this CL! With respect to your question, my preference would be ...
5 years, 7 months ago (2015-05-07 01:01:26 UTC) #28
varkha
Thanks for the insights, that matches my understanding so far. I will try to get ...
5 years, 7 months ago (2015-05-07 01:15:30 UTC) #29
varkha
PTAL. I have moved two tests into aura. Those tests needed very little change but ...
5 years, 7 months ago (2015-05-11 19:50:31 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/180001
5 years, 7 months ago (2015-05-11 19:50:55 UTC) #32
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/70668) linux_chromium_gn_rel on ...
5 years, 7 months ago (2015-05-11 19:58:23 UTC) #34
tdanderson
Hi Valery, looks good so far, please see my comments inline. Regarding your question "With ...
5 years, 7 months ago (2015-05-13 18:38:25 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/200001
5 years, 7 months ago (2015-05-20 21:08:32 UTC) #37
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/68315)
5 years, 7 months ago (2015-05-20 23:22:59 UTC) #39
varkha
https://codereview.chromium.org/1119423003/diff/180001/ui/aura/window_targeter.cc File ui/aura/window_targeter.cc (right): https://codereview.chromium.org/1119423003/diff/180001/ui/aura/window_targeter.cc#newcode184 ui/aura/window_targeter.cc:184: targeter->FindTargetForEvent(child, event); On 2015/05/13 18:38:25, tdanderson wrote: > Recursively? ...
5 years, 7 months ago (2015-05-21 19:11:04 UTC) #46
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/280001
5 years, 7 months ago (2015-05-21 19:38:21 UTC) #47
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-21 21:28:13 UTC) #49
varkha
tdanderson@, ping?
5 years, 7 months ago (2015-05-22 16:06:54 UTC) #50
tdanderson
Hi Valery, please see my latest comments below: https://codereview.chromium.org/1119423003/diff/180001/ui/aura/window_targeter.cc File ui/aura/window_targeter.cc (right): https://codereview.chromium.org/1119423003/diff/180001/ui/aura/window_targeter.cc#newcode184 ui/aura/window_targeter.cc:184: targeter->FindTargetForEvent(child, ...
5 years, 7 months ago (2015-05-22 18:29:56 UTC) #51
varkha
PTAL, thanks for the suggestions! https://codereview.chromium.org/1119423003/diff/180001/ui/aura/window_targeter.cc File ui/aura/window_targeter.cc (right): https://codereview.chromium.org/1119423003/diff/180001/ui/aura/window_targeter.cc#newcode184 ui/aura/window_targeter.cc:184: targeter->FindTargetForEvent(child, event); On 2015/05/22 ...
5 years, 7 months ago (2015-05-22 22:18:34 UTC) #53
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/320001
5 years, 7 months ago (2015-05-22 22:23:02 UTC) #55
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 7 months ago (2015-05-23 00:34:00 UTC) #57
tdanderson
LGTM with the inline nits and: * It would be nice to perform a manual ...
5 years, 7 months ago (2015-05-25 15:00:08 UTC) #58
varkha
sadrul@, PTAL with nits ACQed. +oshima for ash/, +benwells for chrome/browser/ui/views/apps/
5 years, 7 months ago (2015-05-25 15:19:41 UTC) #60
varkha
https://codereview.chromium.org/1119423003/diff/320001/ui/events/event_processor_unittest.cc File ui/events/event_processor_unittest.cc (right): https://codereview.chromium.org/1119423003/diff/320001/ui/events/event_processor_unittest.cc#newcode247 ui/events/event_processor_unittest.cc:247: // When the root has a TestEventTargeter installed, events ...
5 years, 7 months ago (2015-05-25 15:53:30 UTC) #62
varkha
https://codereview.chromium.org/1119423003/diff/320001/ui/events/event_processor_unittest.cc File ui/events/event_processor_unittest.cc (right): https://codereview.chromium.org/1119423003/diff/320001/ui/events/event_processor_unittest.cc#newcode247 ui/events/event_processor_unittest.cc:247: // When the root has a TestEventTargeter installed, events ...
5 years, 7 months ago (2015-05-25 15:53:31 UTC) #63
benwells
c/b/ui/views/apps lgtm
5 years, 7 months ago (2015-05-25 23:12:51 UTC) #64
oshima
ash/ lgtm
5 years, 7 months ago (2015-05-26 20:22:16 UTC) #65
varkha
sadrul@, ping?
5 years, 7 months ago (2015-05-27 14:37:15 UTC) #66
varkha
sadrul@, ping?
5 years, 7 months ago (2015-05-27 14:37:16 UTC) #67
sadrul
On 2015/05/27 14:37:16, varkha wrote: > sadrul@, ping?
5 years, 6 months ago (2015-05-28 04:37:41 UTC) #68
sadrul
On 2015/05/27 14:37:16, varkha wrote: > sadrul@, ping?
5 years, 6 months ago (2015-05-28 04:37:42 UTC) #69
sadrul
On 2015/05/28 04:37:42, sadrul wrote: > On 2015/05/27 14:37:16, varkha wrote: > > sadrul@, ping? ...
5 years, 6 months ago (2015-05-28 04:48:38 UTC) #70
varkha
sadrul@, ping?
5 years, 6 months ago (2015-06-03 14:38:16 UTC) #71
sadrul
On 2015/06/03 14:38:16, varkha wrote: > sadrul@, ping? lgtm. Sorry about the delay :(
5 years, 6 months ago (2015-06-11 03:55:43 UTC) #72
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/360001
5 years, 6 months ago (2015-06-11 04:25:27 UTC) #75
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/81011)
5 years, 6 months ago (2015-06-11 04:48:53 UTC) #77
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/380001
5 years, 6 months ago (2015-06-11 16:34:39 UTC) #80
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-11 17:36:58 UTC) #82
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/380001
5 years, 6 months ago (2015-06-11 17:49:57 UTC) #84
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/70221)
5 years, 6 months ago (2015-06-11 18:01:18 UTC) #86
varkha
+TBR:sky for a trivial change in chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc thta had to be made after rebase to ...
5 years, 6 months ago (2015-06-11 18:17:13 UTC) #88
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1119423003/380001
5 years, 6 months ago (2015-06-11 18:19:31 UTC) #90
commit-bot: I haz the power
Committed patchset #7 (id:380001)
5 years, 6 months ago (2015-06-11 18:33:11 UTC) #91
commit-bot: I haz the power
5 years, 6 months ago (2015-06-11 18:34:01 UTC) #92
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/9c6bcf714a44413a5bf00a4cd346197d854464e6
Cr-Commit-Position: refs/heads/master@{#333993}

Powered by Google App Engine
This is Rietveld 408576698