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

Unified Diff: Source/web/PageScaleConstraintsSet.cpp

Issue 61593006: Zoom instead of autosizing for desktop sites. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add a test. 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.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/PageScaleConstraintsSet.cpp
diff --git a/Source/web/PageScaleConstraintsSet.cpp b/Source/web/PageScaleConstraintsSet.cpp
index 5d82c4b91d5618f7ead84fd03176d3eb871f1465..8ecc556d4b64fc96e674ce343f7f216e20579bfc 100644
--- a/Source/web/PageScaleConstraintsSet.cpp
+++ b/Source/web/PageScaleConstraintsSet.cpp
@@ -200,4 +200,14 @@ void PageScaleConstraintsSet::adjustForAndroidWebViewQuirks(const ViewportDescri
m_pageDefinedConstraints.layoutSize.setHeight(adjustedLayoutSizeHeight);
}
+void PageScaleConstraintsSet::applyDeviceScaleAdjustment(const ViewportDescription& viewportDescription, float deviceScaleAdjustment)
+{
+ // If possible, reduce the layout width instead of applying text autosizing.
+ // But don't reduce below the minimum fallback width and don't reduce if explicitly specified by the page author.
+ if (!viewportDescription.isSpecifiedByAuthor()) {
johnme 2013/11/11 15:49:38 Actually, I think we should also reduce the viewpo
kenneth.r.christiansen 2013/11/19 16:32:52 I am not sure that is a good idea. People who add
+ FloatSize& layoutSize = m_pageDefinedConstraints.layoutSize;
+ layoutSize.setWidth(std::max(viewportDescription.minWidth.value(), layoutSize.width() / deviceScaleAdjustment));
johnme 2013/11/11 15:49:38 I'm a bit concerned that this patch is going to ha
+ }
+}
+
} // namespace WebCore
« no previous file with comments | « Source/web/PageScaleConstraintsSet.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698