Index: content/browser/renderer_host/legacy_render_widget_host_win.cc |
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc |
index 84d95aced8ba6c667138154caec7a8c9a6e2a6e5..b893e0808157e9ff27450d881eea0ff950e65559 100644 |
--- a/content/browser/renderer_host/legacy_render_widget_host_win.cc |
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc |
@@ -16,6 +16,7 @@ |
#include "ui/base/win/internal_constants.h" |
#include "ui/base/win/window_event_target.h" |
#include "ui/gfx/geometry/rect.h" |
+#include "ui/gfx/win/dpi.h" |
namespace content { |
@@ -79,8 +80,9 @@ void LegacyRenderWidgetHostHWND::Hide() { |
} |
void LegacyRenderWidgetHostHWND::SetBounds(const gfx::Rect& bounds) { |
- ::SetWindowPos(hwnd(), NULL, bounds.x(), bounds.y(), bounds.width(), |
- bounds.height(), 0); |
+ gfx::Rect bounds_in_pixel = gfx::win::DIPToScreenRect(bounds); |
+ ::SetWindowPos(hwnd(), NULL, bounds_in_pixel.x(), bounds_in_pixel.y(), |
+ bounds_in_pixel.width(), bounds_in_pixel.height(), 0); |
} |
void LegacyRenderWidgetHostHWND::OnFinalMessage(HWND hwnd) { |