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

Unified Diff: Source/core/rendering/RenderThemeChromiumMac.mm

Issue 14574002: Replace some trivial WebKitSystemInterface wrappers with direct calls to SPI. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Missing param Created 7 years, 8 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: Source/core/rendering/RenderThemeChromiumMac.mm
diff --git a/Source/core/rendering/RenderThemeChromiumMac.mm b/Source/core/rendering/RenderThemeChromiumMac.mm
index a0f32d075092916b40173dca3aaac327c5c8145f..7febbbbf781a157b0d352a659331a68c2b5cdf89 100644
--- a/Source/core/rendering/RenderThemeChromiumMac.mm
+++ b/Source/core/rendering/RenderThemeChromiumMac.mm
@@ -144,6 +144,12 @@ const double progressAnimationNumFrames = 256;
@end
+// Forward declare Mac SPIs.
+extern "C" {
+void _NSDrawCarbonThemeBezel(NSRect frame, BOOL enabled, BOOL flipped);
+void _NSDrawCarbonThemeListBox(NSRect frame, BOOL enabled, BOOL flipped, BOOL always_yes);
+}
+
namespace WebCore {
using namespace HTMLNames;
@@ -736,9 +742,9 @@ bool RenderThemeChromiumMac::paintTextField(RenderObject* o, const PaintInfo& pa
// We do not use NSTextFieldCell to draw styled text fields on Lion and SnowLeopard because
// there are a number of bugs on those platforms that require NSTextFieldCell to be in charge
// of painting its own background. We need WebCore to paint styled backgrounds, so we'll use
- // this WebCoreSystemInterface function instead.
+ // this AppKit SPI function instead.
if (!useNSTextFieldCell) {
- WKDrawBezeledTextFieldCell(r, isEnabled(o) && !isReadOnlyControl(o));
+ _NSDrawCarbonThemeBezel(r, isEnabled(o) && !isReadOnlyControl(o), YES);
Nico 2013/05/01 01:02:18 This is ok since this seems to be unnecessary on 1
Robert Sesek 2013/05/01 23:58:43 Correct.
return false;
}
#endif
@@ -773,7 +779,7 @@ bool RenderThemeChromiumMac::paintCapsLockIndicator(RenderObject*, const PaintIn
bool RenderThemeChromiumMac::paintTextArea(RenderObject* o, const PaintInfo& paintInfo, const IntRect& r)
{
LocalCurrentGraphicsContext localContext(paintInfo.context);
- WKDrawBezeledTextArea(r, isEnabled(o) && !isReadOnlyControl(o));
+ _NSDrawCarbonThemeListBox(r, isEnabled(o) && !isReadOnlyControl(o), YES, YES);
Robert Sesek 2013/05/01 23:58:43 Filed.
return false;
}

Powered by Google App Engine
This is Rietveld 408576698