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

Unified Diff: ui/views/widget/root_view.cc

Issue 10790019: Add gesture target fuzzing to views (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fuzzing performed on ET_GESTURE_BEGIN Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/views/view.cc ('K') | « ui/views/view_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/root_view.cc
diff --git a/ui/views/widget/root_view.cc b/ui/views/widget/root_view.cc
index 2e799a8f2324b16b68e29a426cbc8beb5646d2c9..b176dec81b35ced8020d548e6de0ca8bb9e0922b 100644
--- a/ui/views/widget/root_view.cc
+++ b/ui/views/widget/root_view.cc
@@ -455,6 +455,17 @@ ui::GestureStatus RootView::OnGestureEvent(const GestureEvent& event) {
GestureEvent e(event, this);
ui::GestureStatus status = ui::GESTURE_STATUS_UNKNOWN;
+ if (!gesture_handler_) {
sadrul 2012/07/26 18:41:28 This is not the right place. The event will not bu
tdanderson 2012/07/27 15:27:04 Done.
+ gfx::Rect bounding_box(event.details().bounding_box());
+ gfx::Point bounding_box_location(bounding_box.x(), bounding_box.y());
+ ConvertPointToScreen(this, &bounding_box_location);
+ gfx::Rect touch_rect(bounding_box_location.x(),
+ bounding_box_location.y(),
+ bounding_box.width(),
+ bounding_box.height());
+ gesture_handler_ = GetEventHandlerForRect(touch_rect);
sadrul 2012/07/26 18:41:28 You could perhaps use bounding_box.set_origin here
tdanderson 2012/07/27 15:27:04 Done.
+ }
+
if (gesture_handler_) {
// |gesture_handler_| (or |scroll_gesture_handler_|) can be deleted during
// processing.
« ui/views/view.cc ('K') | « ui/views/view_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698