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

Unified Diff: chrome/browser/ui/views/tabs/tab_drag_controller.cc

Issue 14348033: NOT FOR SUBMIT - Windows Views HiDPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Revert spurious changes, plus some corrections. Created 7 years, 7 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
« no previous file with comments | « chrome/browser/ui/views/tabs/dragged_tab_view.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
+ 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;
}
« no previous file with comments | « chrome/browser/ui/views/tabs/dragged_tab_view.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698