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

Issue 426443002: Do not call into EventTargeter methods from ViewTargeter (Closed)

Created:
6 years, 5 months ago by tdanderson
Modified:
6 years, 4 months ago
Reviewers:
sadrul
CC:
chromium-reviews, tfarina
Project:
chromium
Visibility:
Public.

Description

Do not call into EventTargeter methods from ViewTargeter Now that hit-testing for views (crbug.com/388838) and event-targeting for views (crbug.com/391845) use ViewTargeterDelegate to define custom behaviour for these operations (instead of the now-obsolete approach of subclassing ViewTargeter itself), we should not be calling into EventTargeter for this purpose. Changes in this CL: * Finding the target of a scroll event is now performed correctly by using the logic in ViewTargeterDelegate and its overrides. * The dead code ViewTargeter::SubtreeCanAcceptEvent(), ViewTargeter::EventLocationInsideBounds(), and ViewTargeter::BoundsForEvent() have been removed along with their corresponding tests. * The class-level documentation for ViewTargeter and ViewTargeterDelegate has been updated to clarify the purpose of these classes. BUG=395387, 370579 TEST=ViewTargeterTest.* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287620

Patch Set 1 #

Total comments: 9

Patch Set 2 : sadrul feedback #

Patch Set 3 : don't call into view #

Total comments: 2

Patch Set 4 : added DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -199 lines) Patch
M ui/views/view.h View 1 2 3 chunks +7 lines, -7 lines 0 comments Download
M ui/views/view.cc View 1 2 3 2 chunks +9 lines, -8 lines 0 comments Download
M ui/views/view_targeter.h View 1 3 chunks +4 lines, -13 lines 0 comments Download
M ui/views/view_targeter.cc View 1 2 2 chunks +20 lines, -34 lines 0 comments Download
M ui/views/view_targeter_delegate.h View 1 1 chunk +5 lines, -3 lines 0 comments Download
M ui/views/view_targeter_unittest.cc View 1 chunk +0 lines, -134 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
tdanderson
Sadrul, can you please take a look?
6 years, 5 months ago (2014-07-26 18:08:29 UTC) #1
sadrul
https://codereview.chromium.org/426443002/diff/1/ui/views/view_targeter.cc File ui/views/view_targeter.cc (right): https://codereview.chromium.org/426443002/diff/1/ui/views/view_targeter.cc#newcode60 ui/views/view_targeter.cc:60: return root->GetEventHandlerForPoint(scroll.location()); This should directly call into the delegate, ...
6 years, 4 months ago (2014-07-29 18:06:50 UTC) #2
tdanderson
Hi Sadrul, please take another look. https://codereview.chromium.org/426443002/diff/1/ui/views/view_targeter.cc File ui/views/view_targeter.cc (right): https://codereview.chromium.org/426443002/diff/1/ui/views/view_targeter.cc#newcode60 ui/views/view_targeter.cc:60: return root->GetEventHandlerForPoint(scroll.location()); On ...
6 years, 4 months ago (2014-07-29 19:40:45 UTC) #3
tdanderson
Sadrul, please see my question below: https://codereview.chromium.org/426443002/diff/1/ui/views/view_targeter.cc File ui/views/view_targeter.cc (right): https://codereview.chromium.org/426443002/diff/1/ui/views/view_targeter.cc#newcode60 ui/views/view_targeter.cc:60: return root->GetEventHandlerForPoint(scroll.location()); On ...
6 years, 4 months ago (2014-08-01 15:53:07 UTC) #4
sadrul
On 2014/08/01 15:53:07, tdanderson wrote: > Sadrul, please see my question below: > > https://codereview.chromium.org/426443002/diff/1/ui/views/view_targeter.cc ...
6 years, 4 months ago (2014-08-01 15:58:45 UTC) #5
tdanderson
Sadrul, comments have been addressed. Can you please take another look?
6 years, 4 months ago (2014-08-01 17:04:05 UTC) #6
sadrul
LGTM https://codereview.chromium.org/426443002/diff/40001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/426443002/diff/40001/ui/views/view.cc#newcode1034 ui/views/view.cc:1034: ViewTargeter* view_targeter = targeter(); Do a DCHECK() here ...
6 years, 4 months ago (2014-08-05 16:41:17 UTC) #7
tdanderson
https://codereview.chromium.org/426443002/diff/40001/ui/views/view.cc File ui/views/view.cc (right): https://codereview.chromium.org/426443002/diff/40001/ui/views/view.cc#newcode1034 ui/views/view.cc:1034: ViewTargeter* view_targeter = targeter(); On 2014/08/05 16:41:17, sadrul wrote: ...
6 years, 4 months ago (2014-08-05 17:18:09 UTC) #8
tdanderson
The CQ bit was checked by tdanderson@chromium.org
6 years, 4 months ago (2014-08-05 17:18:13 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdanderson@chromium.org/426443002/60001
6 years, 4 months ago (2014-08-05 17:19:50 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-05 20:56:44 UTC) #11
tdanderson
The CQ bit was unchecked by tdanderson@chromium.org
6 years, 4 months ago (2014-08-05 22:00:35 UTC) #12
tdanderson
The CQ bit was checked by tdanderson@chromium.org
6 years, 4 months ago (2014-08-05 22:00:37 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tdanderson@chromium.org/426443002/60001
6 years, 4 months ago (2014-08-05 22:03:26 UTC) #14
commit-bot: I haz the power
6 years, 4 months ago (2014-08-05 22:28:52 UTC) #15
Message was sent while issue was closed.
Change committed as 287620

Powered by Google App Engine
This is Rietveld 408576698