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

Side by Side Diff: third_party/WebKit/Source/core/paint/ThemePainterMac.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, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Google, Inc. 3 * Copyright (C) 2008, 2009 Google, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Forward declare Mac SPIs. 44 // Forward declare Mac SPIs.
45 extern "C" { 45 extern "C" {
46 void _NSDrawCarbonThemeBezel(NSRect frame, BOOL enabled, BOOL flipped); 46 void _NSDrawCarbonThemeBezel(NSRect frame, BOOL enabled, BOOL flipped);
47 // Request for public API: rdar://13787640 47 // Request for public API: rdar://13787640
48 void _NSDrawCarbonThemeListBox(NSRect frame, BOOL enabled, BOOL flipped, BOOL al ways_yes); 48 void _NSDrawCarbonThemeListBox(NSRect frame, BOOL enabled, BOOL flipped, BOOL al ways_yes);
49 } 49 }
50 50
51 namespace blink { 51 namespace blink {
52 52
53 ThemePainterMac::ThemePainterMac(LayoutThemeMac& layoutTheme, Theme* platformThe me)
54 : ThemePainter(platformTheme)
55 , m_layoutTheme(layoutTheme)
56 {
57 }
58
53 bool ThemePainterMac::paintTextField(const LayoutObject& o, const PaintInfo& pai ntInfo, const IntRect& r) 59 bool ThemePainterMac::paintTextField(const LayoutObject& o, const PaintInfo& pai ntInfo, const IntRect& r)
54 { 60 {
55 LocalCurrentGraphicsContext localContext(paintInfo.context, &paintInfo.cullR ect().m_rect, r); 61 LocalCurrentGraphicsContext localContext(paintInfo.context, &paintInfo.cullR ect().m_rect, r);
56 62
57 #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070 63 #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1070
58 bool useNSTextFieldCell = o.styleRef().hasAppearance() 64 bool useNSTextFieldCell = o.styleRef().hasAppearance()
59 && o.styleRef().visitedDependentColor(CSSPropertyBackgroundColor) == Col or::white 65 && o.styleRef().visitedDependentColor(CSSPropertyBackgroundColor) == Col or::white
60 && !o.styleRef().hasBackgroundImage(); 66 && !o.styleRef().hasBackgroundImage();
61 67
62 // We do not use NSTextFieldCell to draw styled text fields on Lion and 68 // We do not use NSTextFieldCell to draw styled text fields on Lion and
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 [search setSearchMenuTemplate:nil]; 592 [search setSearchMenuTemplate:nil];
587 593
588 m_layoutTheme.updateActiveState([search searchButtonCell], o); 594 m_layoutTheme.updateActiveState([search searchButtonCell], o);
589 595
590 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)]; 596 [[search searchButtonCell] drawWithFrame:unzoomedRect inView:m_layoutTheme.d ocumentViewFor(o)];
591 [[search searchButtonCell] setControlView:nil]; 597 [[search searchButtonCell] setControlView:nil];
592 return false; 598 return false;
593 } 599 }
594 600
595 } // namespace blink 601 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainterMac.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698