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

Unified Diff: content/renderer/render_view_impl.cc

Issue 10386160: Set deviceScaleFactor on the renderer WebView to enable scaling when not in fixed-layout mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | 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 841f41c6d1d1c1a6f5dbfbc66325f7ad63d443eb..5d7e7f7158e96cd9092febc1a59aa2cb005520ff 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -2723,6 +2723,10 @@ void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) {
base::StringToInt(tokens[1], &height))
webview()->setFixedLayoutSize(WebSize(width,height));
}
+ } else {
+ int device_scale = webkit_preferences_.default_device_scale_factor;
+ webview()->setDeviceScaleFactor(device_scale);
+ webview()->setPageScaleFactorLimits(1, WebKit::WebView::maxPageScaleFactor);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698