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

Unified Diff: third_party/WebKit/Source/web/DevToolsEmulator.cpp

Issue 1690493002: Switch to LayoutThemeMobile when emulating mobile device in DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Invalidate tapHighlightColor only Created 4 years, 10 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 | « third_party/WebKit/Source/web/DevToolsEmulator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/DevToolsEmulator.cpp
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.cpp b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
index 6d05aa8712590c754a5c35d354f7bba311709900..098d985e4d182660f03b8e941df4e56a216414ee 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -8,6 +8,7 @@
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
#include "core/page/Page.h"
+#include "core/style/ComputedStyle.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "public/platform/WebLayerTreeView.h"
#include "web/WebInputEventConversion.h"
@@ -52,6 +53,7 @@ DevToolsEmulator::DevToolsEmulator(WebViewImpl* webViewImpl)
, m_emulateMobileEnabled(false)
, m_isOverlayScrollbarsEnabled(false)
, m_isOrientationEventEnabled(false)
+ , m_isMobileLayoutThemeEnabled(false)
, m_originalDefaultMinimumPageScaleFactor(0)
, m_originalDefaultMaximumPageScaleFactor(0)
, m_embedderTextAutosizingEnabled(webViewImpl->page()->settings().textAutosizingEnabled())
@@ -258,6 +260,9 @@ void DevToolsEmulator::enableMobileEmulation()
RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(true);
m_isOrientationEventEnabled = RuntimeEnabledFeatures::orientationEventEnabled();
RuntimeEnabledFeatures::setOrientationEventEnabled(true);
+ m_isMobileLayoutThemeEnabled = RuntimeEnabledFeatures::mobileLayoutThemeEnabled();
+ RuntimeEnabledFeatures::setMobileLayoutThemeEnabled(true);
+ ComputedStyle::invalidateInitialStyle();
m_webViewImpl->page()->settings().setUseMobileViewportStyle(true);
m_webViewImpl->enableViewport();
m_webViewImpl->settings()->setViewportMetaEnabled(true);
@@ -288,6 +293,8 @@ void DevToolsEmulator::disableMobileEmulation()
return;
RuntimeEnabledFeatures::setOverlayScrollbarsEnabled(m_isOverlayScrollbarsEnabled);
RuntimeEnabledFeatures::setOrientationEventEnabled(m_isOrientationEventEnabled);
+ RuntimeEnabledFeatures::setMobileLayoutThemeEnabled(m_isMobileLayoutThemeEnabled);
+ ComputedStyle::invalidateInitialStyle();
m_webViewImpl->disableViewport();
m_webViewImpl->settings()->setViewportMetaEnabled(false);
m_webViewImpl->page()->frameHost().visualViewport().initializeScrollbars();
« no previous file with comments | « third_party/WebKit/Source/web/DevToolsEmulator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698