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

Unified Diff: content/renderer/render_view_impl.cc

Issue 2938393003: Convert the preferred size from Viewport coordinates to Window coordinates (Closed)
Patch Set: Convert the preferred size from Viewport coordinates to Window coordinates Created 3 years, 6 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 | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 9aa953a0ee82829276c7f222a84244e65504a0e5..50d6749b139a644e5db4d6cd5512549954529876 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1880,8 +1880,10 @@ void RenderViewImpl::CheckPreferredSize() {
// message.
if (!send_preferred_size_changes_ || !webview())
return;
-
- gfx::Size size = webview()->ContentsPreferredMinimumSize();
+ blink::WebSize tmp_size = webview()->ContentsPreferredMinimumSize();
+ blink::WebRect tmp_rect(0, 0, tmp_size.width, tmp_size.height);
+ ConvertViewportToWindow(&tmp_rect);
+ gfx::Size size(tmp_rect.width, tmp_rect.height);
if (size == preferred_size_)
return;
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698