Index: ui/gfx/display.cc |
diff --git a/ui/gfx/display.cc b/ui/gfx/display.cc |
index 0125440e3bc11e501e892b0394fb1b2d4c9c701a..59e28a537e84f57d3bb7620eb82f5e602ef8223d 100644 |
--- a/ui/gfx/display.cc |
+++ b/ui/gfx/display.cc |
@@ -159,10 +159,18 @@ void Display::SetScaleAndBounds( |
device_scale_factor_ = device_scale_factor; |
} |
device_scale_factor_ = std::max(1.0f, device_scale_factor_); |
- bounds_ = gfx::Rect(gfx::ScaleToFlooredPoint(bounds_in_pixel.origin(), |
- 1.0f / device_scale_factor_), |
- gfx::ScaleToFlooredSize(bounds_in_pixel.size(), |
- 1.0f / device_scale_factor_)); |
+ bounds_ = |
+#if defined(OS_WIN) |
+ // Origins are fixed in Windows in both Screen and DIP. |
+ gfx::Rect(bounds_in_pixel.origin(), |
+ gfx::ScaleToFlooredSize(bounds_in_pixel.size(), |
+ 1.0f / device_scale_factor_)); |
+#else |
+ gfx::Rect(gfx::ScaleToFlooredPoint(bounds_in_pixel.origin(), |
+ 1.0f / device_scale_factor_), |
+ gfx::ScaleToFlooredSize(bounds_in_pixel.size(), |
+ 1.0f / device_scale_factor_)); |
+#endif // defined(OS_WIN) |
UpdateWorkAreaFromInsets(insets); |
} |