Changeset 185803 in webkit
- Timestamp:
- Jun 20, 2015, 8:27:20 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
Shared/API/Cocoa/WKFoundation.h (modified) (1 diff)
-
UIProcess/API/Cocoa/WKWebViewPrivate.h (modified) (1 diff)
-
UIProcess/API/Cocoa/WKWebsiteDataStore.mm (modified) (1 diff)
-
mac/postprocess-framework-headers.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r185799 r185803 1 2015-06-20 Dan Bernstein <mitz@apple.com> 2 3 [Cocoa] Actually use Objective-C lightweight generics when the compiler supports them 4 https://bugs.webkit.org/show_bug.cgi?id=146183 5 6 Reviewed by Sam Weinig. 7 8 * Shared/API/Cocoa/WKFoundation.h: When the compiler supports Objective-C generics, define 9 WK_ARRAY and WK_SET to use them. Also added a definition of WK_DICTIONARY. 10 11 * UIProcess/API/Cocoa/WKWebViewPrivate.h: Use WK_DICTIONARY for the options dictionary of 12 -_loadRequest:withOptions:. 13 14 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: 15 (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]): Made the completion 16 halder type match the declaration, now that NSArray and WK_ARRAY(WKWebsiteDataRecord *) are 17 not the same. 18 19 * mac/postprocess-framework-headers.sh: Also rewrite WK_DICTIONARY. 20 1 21 2015-06-20 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebKit2/Shared/API/Cocoa/WKFoundation.h
r184043 r185803 50 50 #define WK_ENUM_AVAILABLE_IOS(_ios) 51 51 52 #if __has_feature(objc_generics) 53 54 #define WK_ARRAY(_objectType) NSArray<_objectType> 55 #define WK_DICTIONARY(_keyType, _valueType) NSDictionary<_keyType, _valueType> 56 #define WK_SET(_objectType) NSSet<_objectType> 57 58 #else 59 52 60 #define WK_ARRAY(...) NSArray 61 #define WK_DICTIONARY(...) NSDictionary 53 62 #define WK_SET(...) NSSet 63 64 #endif 54 65 55 66 #ifndef __NSi_8_3 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
r185799 r185803 206 206 @property (nonatomic, readonly) NSArray *_scrollPerformanceData WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 207 207 208 - (WKNavigation *)_loadRequest:(NSURLRequest *)request withOptions:( NSDictionary*)loadOptions WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);208 - (WKNavigation *)_loadRequest:(NSURLRequest *)request withOptions:(WK_DICTIONARY(NSString *, id) *)loadOptions WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 209 209 210 210 @end -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
r185334 r185803 75 75 } 76 76 77 - (void)fetchDataRecordsOfTypes:(NSSet *)dataTypes completionHandler:(void (^)( NSArray*))completionHandler77 - (void)fetchDataRecordsOfTypes:(NSSet *)dataTypes completionHandler:(void (^)(WK_ARRAY(WKWebsiteDataRecord *) *))completionHandler 78 78 { 79 79 auto completionHandlerCopy = Block_copy(completionHandler); -
trunk/Source/WebKit2/mac/postprocess-framework-headers.sh
r185590 r185803 60 60 SED_OPTIONS=( 61 61 -e 's/WK_ARRAY\(([^\)]+)\)/NSArray<\1>/g' 62 -e 's/WK_DICTIONARY\(([^\)]+)\)/NSDictionary<\1>/g' 62 63 -e 's/WK_SET\(([^\)]+)\)/NSSet<\1>/g' 63 64 -e s/WK_ASSUME_NONNULL_BEGIN/NS_ASSUME_NONNULL_BEGIN/
Note:
See TracChangeset
for help on using the changeset viewer.