RESOLVED FIXED 147426
Don't use (Details) when exposing SPI
https://bugs.webkit.org/show_bug.cgi?id=147426
Summary Don't use (Details) when exposing SPI
Dean Jackson
Reported 2015-07-29 16:32:48 PDT
If we are simply declaring the interface and not implementing, we should use class extensions rather than categories.
Attachments
Patch (61.49 KB, patch)
2015-07-29 16:42 PDT, Dean Jackson
no flags
Patch (61.42 KB, patch)
2015-07-29 17:13 PDT, Dean Jackson
mitz: review+
Radar WebKit Bug Importer
Comment 1 2015-07-29 16:34:34 PDT
Dean Jackson
Comment 2 2015-07-29 16:42:22 PDT
Dean Jackson
Comment 3 2015-07-29 17:13:47 PDT
mitz
Comment 4 2015-07-29 17:53:44 PDT
Comment on attachment 257788 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257788&action=review > Source/WebCore/platform/mac/ScrollViewMac.mm:43 > +@interface NSScrollView (Details) > @property BOOL automaticallyAdjustsContentInsets; > @end Is this declared here for building on Mavericks? If so, can you guard this category with #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000 so that it’s easy to remove later? Maybe also give the category a name that begins with “Web”. > Source/WebCore/platform/spi/cocoa/NSButtonCellSPI.h:30 > +#if PLATFORM(MAC) && USE(APPLE_INTERNAL_SDK) We don’t need the PLATFORM(MAC) here. The fact that the #import <AppKit/NSButtonCell.h> above works proves that this header is used only on Mac, and the __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 is true only on Mac.
Dean Jackson
Comment 5 2015-07-30 14:17:39 PDT
Comment on attachment 257788 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257788&action=review >> Source/WebCore/platform/mac/ScrollViewMac.mm:43 >> @end > > Is this declared here for building on Mavericks? If so, can you guard this category with #if __MAC_OS_X_VERSION_MIN_REQUIRED < 101000 so that it’s easy to remove later? Maybe also give the category a name that begins with “Web”. You are right. I originally left it in because we can't redeclare it in an extension, but it is only needed for Mavericks. >> Source/WebCore/platform/spi/cocoa/NSButtonCellSPI.h:30 >> +#if PLATFORM(MAC) && USE(APPLE_INTERNAL_SDK) > > We don’t need the PLATFORM(MAC) here. The fact that the #import <AppKit/NSButtonCell.h> above works proves that this header is used only on Mac, and the __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 is true only on Mac. Fixed.
Dean Jackson
Comment 6 2015-07-30 14:23:38 PDT
Note You need to log in before you can comment on or make changes to this bug.