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

Unified Diff: ui/views/view.cc

Issue 94003003: Make extensions icons easier to target with gestures (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove newline Created 7 years 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
« no previous file with comments | « ui/views/view.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index a00b6eccedfb7dfde005c032910b06801c4f4c15..425baade9b90a1f097d9fb07ad51b53821699967 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -875,8 +875,8 @@ View* View::GetEventHandlerForRect(const gfx::Rect& rect) {
// |cur_view| is a suitable candidate for rect-based targeting.
// Check to see if it is the closest suitable candidate so far.
gfx::Point touch_center(rect.CenterPoint());
- int cur_dist = views::DistanceSquaredFromCenterLineToPoint(
- touch_center, cur_view_bounds);
+ int cur_dist = views::DistanceSquaredFromCenterToPoint(touch_center,
+ cur_view_bounds);
if (!rect_view || cur_dist < rect_view_distance) {
rect_view = cur_view;
rect_view_distance = cur_dist;
@@ -898,8 +898,8 @@ View* View::GetEventHandlerForRect(const gfx::Rect& rect) {
gfx::Rect local_bounds(GetLocalBounds());
if (views::PercentCoveredBy(local_bounds, rect) >= kRectTargetOverlap) {
gfx::Point touch_center(rect.CenterPoint());
- int cur_dist = views::DistanceSquaredFromCenterLineToPoint(touch_center,
- local_bounds);
+ int cur_dist = views::DistanceSquaredFromCenterToPoint(touch_center,
+ local_bounds);
if (!rect_view || cur_dist < rect_view_distance)
rect_view = this;
}
« no previous file with comments | « ui/views/view.h ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698