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

Unified Diff: Source/platform/mac/WebCoreNSCellExtras.mm

Issue 368003002: Check if drawFocusRingMaskWithFrame:inView: exists when drawing focus ring (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removed BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING Created 6 years, 5 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/platform/mac/WebCoreNSCellExtras.mm
diff --git a/Source/platform/mac/WebCoreNSCellExtras.mm b/Source/platform/mac/WebCoreNSCellExtras.mm
index 1b4f2f37c3b4cf6e743edad382165980992522d5..959f0fd741a15cb9271be6a8c47a815f56db5cb1 100644
--- a/Source/platform/mac/WebCoreNSCellExtras.mm
+++ b/Source/platform/mac/WebCoreNSCellExtras.mm
@@ -25,12 +25,13 @@
#import "platform/mac/WebCoreNSCellExtras.h"
-#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
-
@implementation NSCell (WebCoreFocusRingDrawing)
- (void)_web_drawFocusRingWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
+ // FIXME: Remove this check when we drop support for Mac OS X 10.6
+ if (![self respondsToSelector:@selector(drawFocusRingMaskWithFrame:inView:)])
+ return;
CGContextRef cgContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
CGContextSaveGState(cgContext);
NSSetFocusRingStyle(NSFocusRingOnly);
@@ -41,5 +42,3 @@
}
@end
-
-#endif // !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING
« Source/platform/mac/WebCoreNSCellExtras.h ('K') | « Source/platform/mac/WebCoreNSCellExtras.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698