Index: webkit/glue/webpreferences.cc |
diff --git a/webkit/glue/webpreferences.cc b/webkit/glue/webpreferences.cc |
index 3b5ba70ae8f00147b3df42cee789ccf03018d9aa..ac8d245c77f6fabd9e7739b7f8fde6599191b5e9 100644 |
--- a/webkit/glue/webpreferences.cc |
+++ b/webkit/glue/webpreferences.cc |
@@ -142,6 +142,7 @@ WebPreferences::WebPreferences() |
#endif |
supports_multiple_windows(true), |
viewport_enabled(false), |
+ viewport_scale_content_to_fit(true), |
record_rendering_stats(false), |
cookie_enabled(true) |
#if defined(OS_ANDROID) |
@@ -483,6 +484,10 @@ void WebPreferences::Apply(WebView* web_view) const { |
settings->setSupportsMultipleWindows(supports_multiple_windows); |
settings->setViewportEnabled(viewport_enabled); |
+ if (settings->viewportScaleContentToFit() != viewport_scale_content_to_fit) { |
+ settings->setViewportScaleContentToFit(viewport_scale_content_to_fit); |
+ web_view->resetScrollAndScaleState(); |
+ } |
#if defined(OS_ANDROID) |
settings->setAllowCustomScrollbarInMainFrame(false); |