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

Unified Diff: content/renderer/render_view_impl.cc

Issue 17830003: Reset page scale factor to 1.0f on new page navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move page scale override call to RenderViewImpl::ProcessViewLayoutFlags() Created 7 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 | « 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 e55fb8a94b1fbe3c877de83315d94ef5f1f5af49..852f8561762bcb2aa0e689c7db67c76d3a52f5de 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3520,6 +3520,9 @@ void RenderViewImpl::ProcessViewLayoutFlags(const CommandLine& command_line) {
if (enable_viewport)
return;
+ // When navigating to a new page, reset the page scale factor to be 1.0.
+ webview()->setInitialPageScaleOverride(1.f);
+
if (enable_fixed_layout) {
std::string str =
command_line.GetSwitchValueASCII(switches::kEnableFixedLayout);
« 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