Chromium Code Reviews| Index: Source/platform/mac/WebCoreNSCellExtras.mm |
| diff --git a/Source/platform/mac/WebCoreNSCellExtras.mm b/Source/platform/mac/WebCoreNSCellExtras.mm |
| index 1b4f2f37c3b4cf6e743edad382165980992522d5..84f2b0a99b11ab0735d5269a6bb4ffc479135ab3 100644 |
| --- a/Source/platform/mac/WebCoreNSCellExtras.mm |
| +++ b/Source/platform/mac/WebCoreNSCellExtras.mm |
| @@ -25,12 +25,21 @@ |
| #import "platform/mac/WebCoreNSCellExtras.h" |
| -#if !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING |
| +#if !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 |
| + |
| +@interface NSCell (LionSDKDeclarations) |
| +- (void)drawFocusRingMaskWithFrame:(NSRect)cellFrame inView:(NSView *)controlView; |
| +@end |
| + |
| +#endif // !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 |
| @implementation NSCell (WebCoreFocusRingDrawing) |
| - (void)_web_drawFocusRingWithFrame:(NSRect)cellFrame inView:(NSView *)controlView |
|
Robert Sesek
2015/06/08 18:54:28
We should rename this. Apple still ship WebCore (w
|
| { |
| + // 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 +50,3 @@ |
| } |
| @end |
| - |
| -#endif // !BUTTON_CELL_DRAW_WITH_FRAME_DRAWS_FOCUS_RING |