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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 82083002: Move viewport unit resolution to style recalc time (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rename browser zoom to page zoom Created 6 years, 12 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/PageScaleConstraintsSet.cpp ('k') | no next file » | 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 50420131df9ce8596f2ccacae7417f05548b8c26..2abcf79379e8c1b88e66d11585ab13f6746b33c0 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2895,9 +2895,9 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
adjustedDescription.maxWidth = Length(); // auto
const int legacyWidthSnappingMagicNumber = 320;
if (adjustedDescription.maxWidth.isFixed() && adjustedDescription.maxWidth.value() <= legacyWidthSnappingMagicNumber)
- adjustedDescription.maxWidth = Length(100, ViewportPercentageWidth);
+ adjustedDescription.maxWidth = Length(DeviceWidth);
if (adjustedDescription.maxHeight.isFixed() && adjustedDescription.maxWidth.value() <= m_size.height)
- adjustedDescription.maxHeight = Length(100, ViewportPercentageHeight);
+ adjustedDescription.maxHeight = Length(DeviceHeight);
adjustedDescription.minWidth = adjustedDescription.maxWidth;
adjustedDescription.minHeight = adjustedDescription.maxHeight;
}
@@ -2907,7 +2907,7 @@ void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription
if (settingsImpl()->clobberUserAgentInitialScaleQuirk()
&& m_pageScaleConstraintsSet.userAgentConstraints().initialScale != -1
&& m_pageScaleConstraintsSet.userAgentConstraints().initialScale * deviceScaleFactor() <= 1) {
- if (description.maxWidth == Length(100, ViewportPercentageWidth)
+ if (description.maxWidth == Length(DeviceWidth)
|| (description.maxWidth.type() == ExtendToZoom && m_pageScaleConstraintsSet.pageDefinedConstraints().initialScale == 1.0f))
setInitialPageScaleOverride(-1);
}
« no previous file with comments | « Source/web/PageScaleConstraintsSet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698