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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 55073002: [Android WebView] Add a quirk to clobber initial scale in certain cases (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | « Source/web/WebSettingsImpl.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 de936e3c9d9a8dce13a72bc07f4bb62024dcd547..6944efa25897018b3fd3c11d5f71a4b253930e03 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2969,12 +2969,20 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
adjustedDescription.minHeight = adjustedDescription.maxHeight;
}
float oldInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale;
+ float oldUserAgentInitialScale = m_pageScaleConstraintsSet.userAgentConstraints().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());
+ m_pageScaleConstraintsSet.adjustForAndroidWebViewQuirks(adjustedDescription, m_size, page()->settings().layoutFallbackWidth(), deviceScaleFactor(), settingsImpl()->supportDeprecatedTargetDensityDPI(), page()->settings().wideViewportQuirkEnabled(), page()->settings().useWideViewport(), page()->settings().loadWithOverviewMode(), settingsImpl()->clobberUserAgentInitialScaleQuirk());
float newInitialScale = m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale;
if (oldInitialScale != newInitialScale && newInitialScale != -1)
m_pageScaleConstraintsSet.setNeedsReset(true);
-
+ if (settingsImpl()->clobberUserAgentInitialScaleQuirk()) {
aelias_OOO_until_Jul13 2013/11/01 00:10:07 Could you put all the logic within this block inst
mnaganov (inactive) 2013/11/04 17:20:52 Done.
+ float newUserAgentInitialScale = m_pageScaleConstraintsSet.userAgentConstraints().initialScale;
+ if (oldUserAgentInitialScale != newUserAgentInitialScale) {
+ m_pageScaleConstraintsSet.setNeedsReset(true);
+ if (mainFrameImpl() && mainFrameImpl()->frameView())
+ mainFrameImpl()->frameView()->setNeedsLayout();
+ }
+ }
updateMainFrameLayoutSize();
}
« no previous file with comments | « Source/web/WebSettingsImpl.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698