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

Unified Diff: Source/web/WebSettingsImpl.cpp

Issue 40423003: Experimental viewport meta tag support for desktop, Blink-side. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase again 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/WebSettingsImpl.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/WebSettingsImpl.cpp
diff --git a/Source/web/WebSettingsImpl.cpp b/Source/web/WebSettingsImpl.cpp
index 4b29790e45a2460e75d1431093cfe04a1eb8b62c..183d5a1d2002695f58a6f78ad89cdb84e0e2cf5e 100644
--- a/Source/web/WebSettingsImpl.cpp
+++ b/Source/web/WebSettingsImpl.cpp
@@ -58,6 +58,7 @@ WebSettingsImpl::WebSettingsImpl(Settings* settings)
, m_supportDeprecatedTargetDensityDPI(false)
, m_viewportMetaLayoutSizeQuirk(false)
, m_pinchOverlayScrollbarThickness(0)
+ , m_mainFrameResizesAreOrientationChanges(false)
{
ASSERT(settings);
}
@@ -646,6 +647,16 @@ bool WebSettingsImpl::viewportEnabled() const
return m_settings->viewportEnabled();
}
+bool WebSettingsImpl::viewportMetaEnabled() const
+{
+ return m_settings->viewportMetaEnabled();
+}
+
+bool WebSettingsImpl::mainFrameResizesAreOrientationChanges() const
+{
+ return m_mainFrameResizesAreOrientationChanges;
+}
+
void WebSettingsImpl::setShouldDisplaySubtitles(bool enabled)
{
m_settings->setShouldDisplaySubtitles(enabled);
@@ -683,9 +694,17 @@ void WebSettingsImpl::setFixedPositionCreatesStackingContext(bool creates)
void WebSettingsImpl::setViewportEnabled(bool enabled)
{
+ // FIXME: Remove once Chromium side changes land.
+ setMainFrameResizesAreOrientationChanges(enabled);
+
m_settings->setViewportEnabled(enabled);
}
+void WebSettingsImpl::setViewportMetaEnabled(bool enabled)
+{
+ m_settings->setViewportMetaEnabled(enabled);
+}
+
void WebSettingsImpl::setSyncXHRInDocumentsEnabled(bool enabled)
{
m_settings->setSyncXHRInDocumentsEnabled(enabled);
@@ -746,4 +765,9 @@ void WebSettingsImpl::setUseSolidColorScrollbars(bool enabled)
m_settings->setUseSolidColorScrollbars(enabled);
}
+void WebSettingsImpl::setMainFrameResizesAreOrientationChanges(bool enabled)
+{
+ m_mainFrameResizesAreOrientationChanges = enabled;
+}
+
} // namespace WebKit
« no previous file with comments | « Source/web/WebSettingsImpl.h ('k') | Source/web/WebViewImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698