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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutThemeMobile.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/LayoutThemeMobile.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeAndroid.cpp b/third_party/WebKit/Source/core/layout/LayoutThemeMobile.cpp
similarity index 83%
copy from third_party/WebKit/Source/core/layout/LayoutThemeAndroid.cpp
copy to third_party/WebKit/Source/core/layout/LayoutThemeMobile.cpp
index fe9782e1cdff54a04fe702692a0ce6237395c7eb..0aa8d4894353f5da792c3502d67d6c952a98978f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutThemeAndroid.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutThemeMobile.cpp
@@ -23,7 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "core/layout/LayoutThemeAndroid.h"
+#include "core/layout/LayoutThemeMobile.h"
#include "core/CSSValueKeywords.h"
#include "core/InputTypeNames.h"
@@ -40,29 +40,23 @@
namespace blink {
-PassRefPtr<LayoutTheme> LayoutThemeAndroid::create()
+PassRefPtr<LayoutTheme> LayoutThemeMobile::create()
{
- return adoptRef(new LayoutThemeAndroid());
+ return adoptRef(new LayoutThemeMobile());
}
-LayoutTheme& LayoutTheme::theme()
+LayoutThemeMobile::~LayoutThemeMobile()
{
- DEFINE_STATIC_REF(LayoutTheme, layoutTheme, (LayoutThemeAndroid::create()));
- return *layoutTheme;
}
-LayoutThemeAndroid::~LayoutThemeAndroid()
-{
-}
-
-String LayoutThemeAndroid::extraMediaControlsStyleSheet()
+String LayoutThemeMobile::extraMediaControlsStyleSheet()
{
return loadResourceAsASCIIString(
RuntimeEnabledFeatures::newMediaPlaybackUiEnabled() ?
"mediaControlsAndroidNew.css" : "mediaControlsAndroid.css");
}
-String LayoutThemeAndroid::extraDefaultStyleSheet()
+String LayoutThemeMobile::extraDefaultStyleSheet()
{
return LayoutThemeDefault::extraDefaultStyleSheet() +
loadResourceAsASCIIString("themeChromiumLinux.css") +
@@ -70,7 +64,8 @@ String LayoutThemeAndroid::extraDefaultStyleSheet()
}
-void LayoutThemeAndroid::adjustInnerSpinButtonStyle(ComputedStyle& style) const
+#if !USE(NEW_THEME)
+void LayoutThemeMobile::adjustInnerSpinButtonStyle(ComputedStyle& style) const
{
if (LayoutTestSupport::isRunningLayoutTest()) {
// Match Linux spin button style in layout tests.
@@ -81,5 +76,6 @@ void LayoutThemeAndroid::adjustInnerSpinButtonStyle(ComputedStyle& style) const
style.setMinWidth(Length(size.width(), Fixed));
}
}
+#endif // !USE(NEW_THEME)
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698