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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTheme.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: more mac compile 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
Index: third_party/WebKit/Source/core/layout/LayoutTheme.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
index 293daeff0a3378129ae4e07307ba5867918591b9..67c33924a191fb3d05074a5943d3e61fd5ce1e11 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
@@ -42,6 +42,7 @@
#include "core/html/shadow/ShadowElementNames.h"
#include "core/html/shadow/SpinButtonElement.h"
#include "core/html/shadow/TextControlInnerElements.h"
+#include "core/layout/LayoutThemeMobile.h"
#include "core/page/FocusController.h"
#include "core/page/Page.h"
#include "core/style/ComputedStyle.h"
@@ -66,6 +67,15 @@ namespace blink {
using namespace HTMLNames;
+LayoutTheme& LayoutTheme::theme()
+{
+ if (RuntimeEnabledFeatures::mobileLayoutThemeEnabled()) {
+ DEFINE_STATIC_REF(LayoutTheme, layoutThemeMobile, (LayoutThemeMobile::create()));
dgozman 2016/02/11 18:53:44 This is the meaningful part of the patch.
pdr. 2016/02/12 06:36:14 This seems incorrect anytime we share a render pro
dgozman 2016/02/19 19:15:16 I'm aware of this problem, but redesigning away fr
+ return *layoutThemeMobile;
+ }
+ return nativeTheme();
+}
+
LayoutTheme::LayoutTheme()
: m_hasCustomFocusRingColor(false)
#if USE(NEW_THEME)

Powered by Google App Engine
This is Rietveld 408576698