Chromium Code Reviews| Index: chrome/browser/ui/views/tabs/tab_drag_controller.cc |
| diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller.cc b/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
| index f36b867be741d7e209535f2fa7a647e0f98f77a7..192d4d8c156ee4be5806c46a69b736dc31e2b72d 100644 |
| --- a/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
| +++ b/chrome/browser/ui/views/tabs/tab_drag_controller.cc |
| @@ -56,6 +56,10 @@ |
| #include "ui/base/gestures/gesture_recognizer.h" |
| #endif |
| +#if defined(OS_WIN) |
| +#include "ui/base/win/dpi.h" |
| +#endif |
| + |
| using content::OpenURLParams; |
| using content::UserMetricsAction; |
| using content::WebContents; |
| @@ -216,8 +220,13 @@ bool DoesRectContainVerticalPointExpanded( |
| const gfx::Rect& bounds, |
| int vertical_adjustment, |
| int y) { |
| - int upper_threshold = bounds.bottom() + vertical_adjustment; |
| - int lower_threshold = bounds.y() - vertical_adjustment; |
| +#if defined(OS_WIN) |
|
kevers
2013/06/03 17:28:50
Looks like we're mixing pixels and DIP in argument
|
| + static float scale = ui::win::GetDeviceScaleFactor(); |
| +#else |
| + static float scale = 1.0; |
| +#endif |
| + int upper_threshold = bounds.bottom() + scale * vertical_adjustment; |
| + int lower_threshold = bounds.y() - scale * vertical_adjustment; |
| return y >= lower_threshold && y <= upper_threshold; |
| } |