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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutThemeMac.mm

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
Index: third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm b/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
index 19fc396aebf860881d190bf34a4d10ba46878ae4..5a5304077c08138aa57e76dfbf3cb6928de787fa 100644
--- a/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
+++ b/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
@@ -31,6 +31,7 @@
#import "core/style/ShadowList.h"
#import "platform/LayoutTestSupport.h"
#import "platform/PlatformResourceLoader.h"
+#import "platform/Theme.h"
#import "platform/graphics/BitmapImage.h"
#import "platform/mac/ColorMac.h"
#import "platform/mac/LocalCurrentGraphicsContext.h"
@@ -116,8 +117,9 @@ namespace blink {
using namespace HTMLNames;
LayoutThemeMac::LayoutThemeMac()
- : m_notificationObserver(AdoptNS, [[BlinkLayoutThemeNotificationObserver alloc] initWithTheme:this])
- , m_painter(*this)
+ : LayoutTheme(platformTheme())
+ , m_notificationObserver(AdoptNS, [[BlinkLayoutThemeNotificationObserver alloc] initWithTheme:this])
+ , m_painter(*this, platformTheme())
{
[[NSNotificationCenter defaultCenter] addObserver:m_notificationObserver.get()
selector:@selector(systemColorsDidChange:)
@@ -473,19 +475,19 @@ void LayoutThemeMac::addVisualOverflow(const LayoutObject& object, IntRect& rect
{
ControlPart part = object.style()->appearance();
-#if USE(NEW_THEME)
- switch (part) {
- case CheckboxPart:
- case RadioPart:
- case PushButtonPart:
- case SquareButtonPart:
- case ButtonPart:
- case InnerSpinButtonPart:
- return LayoutTheme::addVisualOverflow(object, rect);
- default:
- break;
+ if (hasPlatformTheme()) {
+ switch (part) {
+ case CheckboxPart:
+ case RadioPart:
+ case PushButtonPart:
+ case SquareButtonPart:
+ case ButtonPart:
+ case InnerSpinButtonPart:
+ return LayoutTheme::addVisualOverflow(object, rect);
+ default:
+ break;
+ }
}
-#endif
float zoomLevel = object.style()->effectiveZoom();
@@ -1102,7 +1104,7 @@ NSView* FlippedView()
return view;
}
-LayoutTheme& LayoutTheme::theme()
+LayoutTheme& LayoutTheme::nativeTheme()
{
DEFINE_STATIC_REF(LayoutTheme, layoutTheme, (LayoutThemeMac::create()));
return *layoutTheme;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutThemeLinux.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutThemeMobile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698