Bug 113844 - Remove code for Mac 10.5 and earlier from WTF and WebKit2
Summary: Remove code for Mac 10.5 and earlier from WTF and WebKit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-02 22:07 PDT by Ryosuke Niwa
Modified: 2013-04-03 01:20 PDT (History)
6 users (show)

See Also:


Attachments
Cleanup (5.30 KB, patch)
2013-04-02 22:11 PDT, Ryosuke Niwa
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>