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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 26251010: Reset to initial page scale in additional scenarios. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test coverage and extra setNeedsLayout() call Created 7 years, 1 month 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 | « Source/web/PageScaleConstraintsSet.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 00b3326981bc95402d6d0bc011541cbf4812e956..16706ac9b2da5cbaaa665b26de0d00df7f2d03ab 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -3003,8 +3003,15 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
adjustedDescription.minWidth = adjustedDescription.maxWidth;
adjustedDescription.minHeight = adjustedDescription.maxHeight;
}
+ float oldInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale;
m_pageScaleConstraintsSet.updatePageDefinedConstraints(adjustedDescription, m_size);
m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription, m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor(), settingsImpl()->supportDeprecatedTargetDensityDPI(), page()->settings().wideViewportQuirkEnabled(), page()->settings().useWideViewport(), page()->settings().loadWithOverviewMode());
+ float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale;
+ if (oldInitialScale != newInitialScale && newInitialScale != -1) {
+ m_pageScaleConstraintsSet.setNeedsReset(true);
+ if (mainFrameImpl() && mainFrameImpl()->frameView())
mnaganov (inactive) 2013/11/04 11:44:09 I guess, we will have to cherry pick this 'if' int
+ mainFrameImpl()->frameView()->setNeedsLayout();
+ }
updateMainFrameLayoutSize();
}
« no previous file with comments | « Source/web/PageScaleConstraintsSet.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698