summaryrefslogtreecommitdiffstats
path: root/content/renderer/render_view_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/renderer/render_view_impl.cc')
-rw-r--r--content/renderer/render_view_impl.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index c2aeec4..a09574d 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3709,11 +3709,6 @@ void RenderViewImpl::ZoomFactorHelper(content::PageZoom zoom,
}
void RenderViewImpl::OnSetZoomLevel(double zoom_level) {
- // Don't set zoom level for full-page plugin since they don't use the same
- // zoom settings.
- if (webview()->mainFrame()->document().isPluginDocument())
- return;
-
webview()->hidePopups();
webview()->setZoomLevel(false, zoom_level);
zoomLevelChanged();
@@ -3923,6 +3918,7 @@ void RenderViewImpl::OnDisableScrollbarsForSmallWindows(
void RenderViewImpl::OnSetRendererPrefs(
const content::RendererPreferences& renderer_prefs) {
+ double old_zoom_level = renderer_preferences_.default_zoom_level;
renderer_preferences_ = renderer_prefs;
UpdateFontRenderingFromRendererPrefs();
#if defined(TOOLKIT_USES_GTK)
@@ -3947,6 +3943,13 @@ void RenderViewImpl::OnSetRendererPrefs(
webview()->themeChanged();
}
#endif
+ // If the zoom level for this page matches the old zoom default, and this
+ // is not a plugin, update the zoom level to match the new default.
+ if (webview() && !webview()->mainFrame()->document().isPluginDocument() &&
+ content::ZoomValuesEqual(webview()->zoomLevel(), old_zoom_level)) {
+ webview()->setZoomLevel(false, renderer_preferences_.default_zoom_level);
+ zoomLevelChanged();
+ }
}
void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location,