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

Unified Diff: Source/core/page/Settings.cpp

Issue 22747002: setViewportEnabled on InternalSettings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Mac compile issue: removed unused member variable Created 7 years, 4 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/core/page/Settings.h ('k') | Source/core/testing/InternalSettings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Settings.cpp
diff --git a/Source/core/page/Settings.cpp b/Source/core/page/Settings.cpp
index 68a69d3e5665b447ff0007471d7eb22468b3373f..c9c952a64061f2ffea955471ab6ceb617f16aff8 100644
--- a/Source/core/page/Settings.cpp
+++ b/Source/core/page/Settings.cpp
@@ -137,6 +137,7 @@ Settings::Settings(Page* page)
, m_cssStickyPositionEnabled(true)
, m_dnsPrefetchingEnabled(false)
, m_touchEventEmulationEnabled(false)
+ , m_viewportEnabled(false)
, m_setImageLoadingSettingsTimer(this, &Settings::imageLoadingSettingsTimerFired)
{
m_page = page; // Page is not yet fully initialized wen constructing Settings, so keeping m_page null over initializeDefaultFontFamilies() call.
@@ -380,4 +381,14 @@ bool Settings::openGLMultisamplingEnabled()
return m_openGLMultisamplingEnabled;
}
+void Settings::setViewportEnabled(bool enabled)
+{
+ if (m_viewportEnabled == enabled)
+ return;
+
+ m_viewportEnabled = enabled;
+ if (m_page->mainFrame())
+ m_page->mainFrame()->document()->updateViewportArguments();
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/page/Settings.h ('k') | Source/core/testing/InternalSettings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698