Index: ui/views/view.cc |
diff --git a/ui/views/view.cc b/ui/views/view.cc |
index 2961ed786613ab3101e7d63bbc3954f18aa13977..ef43e348c1b85fbb3b04a6a25a9e3f726839e851 100644 |
--- a/ui/views/view.cc |
+++ b/ui/views/view.cc |
@@ -28,7 +28,7 @@ |
#include "ui/gfx/path.h" |
#include "ui/gfx/point3_f.h" |
#include "ui/gfx/point_conversions.h" |
-#include "ui/gfx/rect_conversions.h" |
+//#include "ui/gfx/rect_conversions.h" |
#include "ui/gfx/scoped_canvas.h" |
#include "ui/gfx/screen.h" |
#include "ui/gfx/skia_util.h" |
@@ -41,7 +41,7 @@ |
#include "ui/views/drag_controller.h" |
#include "ui/views/focus/view_storage.h" |
#include "ui/views/layout/layout_manager.h" |
-#include "ui/views/rect_based_targeting_utils.h" |
+//#include "ui/views/rect_based_targeting_utils.h" |
#include "ui/views/views_delegate.h" |
#include "ui/views/widget/native_widget_private.h" |
#include "ui/views/widget/root_view.h" |
@@ -60,11 +60,6 @@ const bool kContextMenuOnMousePress = false; |
const bool kContextMenuOnMousePress = true; |
#endif |
-// The minimum percentage of a view's area that needs to be covered by a rect |
-// representing a touch region in order for that view to be considered by the |
-// rect-based targeting algorithm. |
-static const float kRectTargetOverlap = 0.6f; |
- |
// Default horizontal drag threshold in pixels. |
// Same as what gtk uses. |
const int kDefaultHorizontalDragThreshold = 8; |
@@ -835,6 +830,14 @@ View* View::GetEventHandlerForPoint(const gfx::Point& point) { |
} |
View* View::GetEventHandlerForRect(const gfx::Rect& rect) { |
+ // Terry - make a helper for this logic |
+ ViewTargeter* view_targeter = targeter(); |
+ if (!view_targeter) |
+ view_targeter = GetWidget()->GetRootView()->targeter(); |
+ CHECK(view_targeter); |
+ return view_targeter->TargetForRect(this, rect); |
+ |
+ /* |
// |rect_view| represents the current best candidate to return |
// if rect-based targeting (i.e., fuzzing) is used. |
// |rect_view_distance| is used to keep track of the distance |
@@ -906,6 +909,7 @@ View* View::GetEventHandlerForRect(const gfx::Rect& rect) { |
} |
return rect_view ? rect_view : point_view; |
+ */ |
} |
bool View::CanProcessEventsWithinSubtree() const { |