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

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

Issue 13880019: [Android WebView] Update viewport size and scale calculation to match WebView Classic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed Adam's comments 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 | « Source/WebKit/chromium/src/WebSettingsImpl.cpp ('k') | Source/WebKit/chromium/tests/WebFrameTest.cpp » ('j') | 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 4942175219dcbe5170a29553c1926f4b721a4244..69faa7258d517defcfac7892510355be326065b4 100644
--- a/Source/WebKit/chromium/src/WebViewImpl.cpp
+++ b/Source/WebKit/chromium/src/WebViewImpl.cpp
@@ -3043,6 +3043,10 @@ void WebViewImpl::computePageScaleFactorLimits()
viewWidthNotIncludingScrollbars -= view->verticalScrollbar()->width();
m_minimumPageScaleFactor = max(m_minimumPageScaleFactor, static_cast<float>(viewWidthNotIncludingScrollbars) / contentsSize().width());
m_maximumPageScaleFactor = max(m_minimumPageScaleFactor, m_maximumPageScaleFactor);
+ if (m_initialPageScaleFactorOverride != -1) {
+ m_minimumPageScaleFactor = min(m_minimumPageScaleFactor, m_initialPageScaleFactorOverride);
+ m_maximumPageScaleFactor = max(m_maximumPageScaleFactor, m_initialPageScaleFactorOverride);
+ }
}
ASSERT(m_minimumPageScaleFactor <= m_maximumPageScaleFactor);
« no previous file with comments | « Source/WebKit/chromium/src/WebSettingsImpl.cpp ('k') | Source/WebKit/chromium/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698