Changeset 169356 in webkit
- Timestamp:
- May 26, 2014 11:00:47 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r169355 r169356 1 2014-05-26 Dan Bernstein <mitz@apple.com> 2 3 [Cocoa] Rewrite WK_DESIGNATED_INITIALIZER in installed headers 4 https://bugs.webkit.org/show_bug.cgi?id=133290 5 6 Reviewed by Anders Carlsson. 7 8 * Shared/API/Cocoa/WKFoundation.h: When WK_API_AVAILABILITY_ENABLED is defined, don’t 9 provide definitions of WK_DESIGNATED_INITIALIZER and WK_UNAVAILABLE, since those macros will 10 be rewritten out of the headers. When WK_API_AVAILABILITY_ENABLED isn’t defined, provide 11 definitions of the other two macros as appropriate for the target OS. 12 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Removed WK_DESIGNATED_INITIALIZER from a 13 category method declaration. 14 * UIProcess/API/Cocoa/WKWebView.h: Mark the superclass designated initializer 15 -initWithCoder: as unavailable. 16 * UIProcess/API/Cocoa/WKWebView.mm: 17 (-[WKWebView initWithCoder:]): Override this designated initializer of the superclass by 18 returning nil. 19 * mac/rewrite-availability-macros.sh: Rewrite WK_DESIGNATED_INITIALIZER to 20 NS_DESIGNATED_INITIALIZER and WK_UNAVAILABLE to NS_UNAVAILABLE. Also make sure to process 21 all headers if the script has changed since the last time it was run. 22 1 23 2014-05-26 Commit Queue <commit-queue@webkit.org> 2 24 -
trunk/Source/WebKit2/Shared/API/Cocoa/WKFoundation.h
r168768 r169356 48 48 #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090 49 49 50 #define WK_DESIGNATED_INITIALIZER 51 #define WK_UNAVAILABLE 52 50 53 #ifdef __OBJC__ 51 54 #import <Foundation/Foundation.h> … … 53 56 #endif 54 57 58 #else 59 60 #define WK_DESIGNATED_INITIALIZER NS_DESIGNATED_INITIALIZER 61 #define WK_UNAVAILABLE NS_UNAVAILABLE 62 55 63 #endif 56 64 57 65 #endif 58 59 #define WK_DESIGNATED_INITIALIZER -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h
r168541 r169356 33 33 @interface WKProcessPool (WKPrivate) 34 34 35 - (instancetype)_initWithConfiguration:(_WKProcessPoolConfiguration *)configuration __attribute__((objc_method_family(init))) WK_DESIGNATED_INITIALIZER;35 - (instancetype)_initWithConfiguration:(_WKProcessPoolConfiguration *)configuration __attribute__((objc_method_family(init))); 36 36 37 37 @property (nonatomic, readonly) _WKProcessPoolConfiguration *_configuration; -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h
r168566 r169356 80 80 - (instancetype)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration WK_DESIGNATED_INITIALIZER; 81 81 82 - (instancetype)initWithCoder:(NSCoder *)coder WK_UNAVAILABLE; 83 82 84 /*! @abstract Navigates to the given NSURLRequest. 83 85 @param request The NSURLRequest to navigate to. -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r169326 r169356 269 269 } 270 270 271 - (instancetype)initWithCoder:(NSCoder *)coder 272 { 273 [self release]; 274 return nil; 275 } 276 271 277 - (void)dealloc 272 278 { -
trunk/Source/WebKit2/mac/rewrite-availability-macros.sh
r168566 r169356 31 31 TIMESTAMP_PATH=${TARGET_TEMP_DIR}/${0##*/} 32 32 33 if [[ $0 -nt $TIMESTAMP_PATH ]]; then 34 rm "${TIMESTAMP_PATH}"; 35 fi 36 33 37 function rewrite_headers () { 34 38 for HEADER_PATH in $1/*.h; do 35 39 if [[ $HEADER_PATH -nt $TIMESTAMP_PATH ]]; then 36 sed -e s/^WK_CLASS_AVAILABLE/NS_CLASS_AVAILABLE/ -e s/WK_AVAILABLE/NS_AVAILABLE/ -e s/WK_ ENUM_AVAILABLE/NS_ENUM_AVAILABLE/ ${HEADER_PATH} > ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} || exit $_;40 sed -e s/^WK_CLASS_AVAILABLE/NS_CLASS_AVAILABLE/ -e s/WK_AVAILABLE/NS_AVAILABLE/ -e s/WK_DESIGNATED_INITIALIZER/NS_DESIGNATED_INITIALIZER/ -e s/WK_ENUM_AVAILABLE/NS_ENUM_AVAILABLE/ -e s/WK_UNAVAILABLE/NS_UNAVAILABLE/ ${HEADER_PATH} > ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} || exit $_; 37 41 mv ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} $HEADER_PATH; 38 42 fi
Note: See TracChangeset
for help on using the changeset viewer.