Bug 113844

Summary: Remove code for Mac 10.5 and earlier from WTF and WebKit2
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: New BugsAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, darin, ddkilzer, ojan.autocc, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Cleanup benjamin: review+

Description Ryosuke Niwa 2013-04-02 22:07:36 PDT
Remove code for 10.5 from WTF and WebKit2
Comment 1 Ryosuke Niwa 2013-04-02 22:11:00 PDT
Created attachment 196279 [details]
Cleanup
Comment 2 Benjamin Poulain 2013-04-02 23:30:07 PDT
Comment on attachment 196279 [details]
Cleanup

View in context: https://bugs.webkit.org/attachment.cgi?id=196279&action=review

> Source/WTF/wtf/Platform.h:673
>  #define HAVE_SYS_TIMEB_H 1
>  #define WTF_USE_ACCELERATE 1
>  
> -#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
> -
>  #define HAVE_DISPATCH_H 1
>  #define HAVE_MADV_FREE 1
>  #define HAVE_PTHREAD_SETNAME_NP 1

Better re-order the #defines alphabetically with the ones above.

> Source/WebKit2/Shared/mac/PasteboardTypes.mm:48
>      static NSArray *types = retain([NSArray arrayWithObjects:WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPDFPboardType,
> -#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
> -        NSPICTPboardType,
> -#endif
>          NSURLPboardType, NSRTFDPboardType, NSRTFPboardType, NSStringPboardType, NSColorPboardType, kUTTypePNG, nil]);
>      return types;

While you are at it, maybe clean the array allocation?

static NSArray *types = [[NSArray alloc] initWithArray: WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPDFPboardType, etc
Comment 3 Ryosuke Niwa 2013-04-02 23:33:55 PDT
Comment on attachment 196279 [details]
Cleanup

View in context: https://bugs.webkit.org/attachment.cgi?id=196279&action=review

Thanks for the review.

>> Source/WebKit2/Shared/mac/PasteboardTypes.mm:48
>>      return types;
> 
> While you are at it, maybe clean the array allocation?
> 
> static NSArray *types = [[NSArray alloc] initWithArray: WebArchivePboardType, NSHTMLPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPDFPboardType, etc

There are 4 other functions that use the same style so I'll leave it to you.
Comment 4 Ryosuke Niwa 2013-04-03 01:20:07 PDT
Committed r147525: <http://trac.webkit.org/changeset/147525>