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

Unified Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 14643011: Reset page scale factor to 1.0 on navigation to a new page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reset scale via layoutUpdated() instead. Created 7 years, 8 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: Source/WebKit/chromium/src/WebViewImpl.cpp
diff --git a/Source/WebKit/chromium/src/WebViewImpl.cpp b/Source/WebKit/chromium/src/WebViewImpl.cpp
index 73aaf97d0864969a9a4c5ef4abe069e83211c8b6..7ccf33fcdf108a6d1be9ae868a0903a4f805d0c1 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -3663,24 +3663,22 @@ void WebViewImpl::layoutUpdated(WebFrameImpl* webframe)
}
}
- if (settings()->viewportEnabled()) {
- if (!isPageScaleFactorSet()) {
- // If the viewport tag failed to be processed earlier, we need
- // to recompute it now.
- ViewportArguments viewportArguments = mainFrameImpl()->frame()->document()->viewportArguments();
- m_page->chrome()->client()->dispatchViewportPropertiesDidChange(viewportArguments);
- }
+ if (settings()->viewportEnabled() && !isPageScaleFactorSet()) {
+ // If the viewport tag failed to be processed earlier, we need
+ // to recompute it now.
+ ViewportArguments viewportArguments = mainFrameImpl()->frame()->document()->viewportArguments();
+ m_page->chrome()->client()->dispatchViewportPropertiesDidChange(viewportArguments);
+ }
- // Contents size is an input to the page scale limits, so a good time to
- // recalculate is after layout has occurred.
- computePageScaleFactorLimits();
+ // Contents size is an input to the page scale limits, so a good time to
+ // recalculate is after layout has occurred.
+ computePageScaleFactorLimits();
- // Relayout immediately to avoid violating the rule that needsLayout()
- // isn't set at the end of a layout.
- FrameView* view = mainFrameImpl()->frameView();
- if (view && view->needsLayout())
- view->layout();
- }
+ // Relayout immediately to avoid violating the rule that needsLayout()
+ // isn't set at the end of a layout.
+ FrameView* view = mainFrameImpl()->frameView();
+ if (view && view->needsLayout())
+ view->layout();
m_client->didUpdateLayout();
« 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