Changeset 182930 in webkit


Ignore:
Timestamp:
Apr 16, 2015, 5:46:07 PM (10 years ago)
Author:
andersca@apple.com
Message:

Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=143844

Reviewed by Dan Bernstein.

Source/WebKit2:

  • Shared/API/Cocoa/WKFoundation.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _validate]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
  • mac/postprocess-framework-headers.sh:

Tools:

  • MiniBrowser/mac/AppDelegate.m:

(-[BrowserAppDelegate newPrivateWindow:]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController initWithConfiguration:]):
(-[WK2BrowserWindowController fetchWebsiteData:]):
(-[WK2BrowserWindowController fetchAndClearWebsiteData:]):
(-[WK2BrowserWindowController clearWebsiteData:]):

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r182922 r182930  
     12015-04-16  Anders Carlsson  <andersca@apple.com>
     2
     3        Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
     4        https://bugs.webkit.org/show_bug.cgi?id=143844
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * Shared/API/Cocoa/WKFoundation.h:
     9        * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
     10        (-[WKWebViewConfiguration _validate]):
     11        * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
     12        * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
     13        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
     14        * mac/postprocess-framework-headers.sh:
     15
    1162015-04-16  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Source/WebKit2/Shared/API/Cocoa/WKFoundation.h

    r182846 r182930  
    5151#define WK_CLASS_AVAILABLE(_mac, _ios) __attribute__((visibility ("default")))
    5252#define WK_DEPRECATED(_macIntro, _macDep, _iosIntro, _iosDep, ...) __attribute__((deprecated(__VA_ARGS__)))
     53#define WK_CLASS_DEPRECATED(_macIntro, _macDep, _iosIntro, _iosDep, ...) __attribute__((visibility("default"))) __attribute__((deprecated(__VA_ARGS__)))
    5354#define WK_ENUM_AVAILABLE(_mac, _ios)
    5455#define WK_ENUM_AVAILABLE_IOS(_ios)
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm

    r182875 r182930  
    216216}
    217217
     218#pragma clang diagnostic push
     219#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     220
    218221- (_WKWebsiteDataStore *)_websiteDataStore
    219222{
     
    225228    self.websiteDataStore = websiteDataStore;
    226229}
     230
     231#pragma clang diagnostic pop
    227232
    228233#if PLATFORM(IOS)
     
    249254        [NSException raise:NSInvalidArgumentException format:@"configuration.userContentController is nil"];
    250255
     256    if (!self.websiteDataStore)
     257        [NSException raise:NSInvalidArgumentException format:@"configuration.websiteDataStore is nil"];
     258
    251259    if (!self._visitedLinkProvider)
    252260        [NSException raise:NSInvalidArgumentException format:@"configuration._visitedLinkProvider is nil"];
    253261
    254     if (!self._websiteDataStore)
    255         [NSException raise:NSInvalidArgumentException format:@"configuration._websiteDataStore is nil"];
    256 
    257262#if PLATFORM(IOS)
    258263    if (!self._contentProviderRegistry)
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h

    r181317 r182930  
    3939@property (nonatomic, strong, setter=_setVisitedLinkProvider:) _WKVisitedLinkProvider *_visitedLinkProvider;
    4040
    41 @property (nonatomic, strong, setter=_setWebsiteDataStore:) _WKWebsiteDataStore *_websiteDataStore;
     41@property (nonatomic, strong, setter=_setWebsiteDataStore:) _WKWebsiteDataStore *_websiteDataStore WK_DEPRECATED(10_10, WK_MAC_TBA, 8_0, WK_IOS_TBA, "Please use websiteDataStore instead");
    4242
    4343@property (nonatomic, weak, setter=_setAlternateWebViewForNavigationGestures:) WKWebView *_alternateWebViewForNavigationGestures;
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataRecord.h

    r182862 r182930  
    3030#import <WebKit/WKWebsiteDataRecord.h>
    3131
    32 WK_CLASS_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA)
     32WK_CLASS_DEPRECATED(WK_MAC_TBA, WK_MAC_TBA, WK_IOS_TBA, WK_IOS_TBA, "Please use WKWebsiteDataRecord instead")
    3333@interface _WKWebsiteDataRecord : WKWebsiteDataRecord
    3434@end
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h

    r182873 r182930  
    3030#import <WebKit/WKWebsiteDataStore.h>
    3131
    32 WK_CLASS_AVAILABLE(10_10, 8_0)
     32WK_CLASS_DEPRECATED(10_10, WK_MAC_TBA, 8_0, WK_IOS_TBA, "Please use WKWebsiteDataStore instead")
    3333@interface _WKWebsiteDataStore : WKWebsiteDataStore
    3434
  • trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm

    r182873 r182930  
    2929#if WK_API_ENABLED
    3030
     31#pragma clang diagnostic push
     32#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     33
    3134@implementation _WKWebsiteDataStore
    3235
     
    4346@end
    4447
     48#pragma clang diagnostic pop
     49
    4550#endif
  • trunk/Source/WebKit2/mac/postprocess-framework-headers.sh

    r181004 r182930  
    5151                sed -i .tmp -e s/WK_MAC_TBA/${OSX_VERSION}/g -e s/WK_IOS_TBA/${IOS_VERSION}/g ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} || exit $_
    5252            else
    53                 sed -i .tmp -E -e 's/WK_(CLASS_|ENUM_)?AVAILABLE(_IOS|_MAC)?\(.+\)//g' -e 's/WK_DEPRECATED\(.+\)//g' ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} || exit $_
     53                sed -i .tmp -E -e 's/WK_(CLASS_|ENUM_)?AVAILABLE(_IOS|_MAC)?\(.+\)//g' -e 's/WK_(CLASS_?)DEPRECATED\(.+\)//g' ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} || exit $_
    5454            fi
    5555
    56             sed -i .tmp -e s/^WK_CLASS_AVAILABLE/NS_CLASS_AVAILABLE/ -e s/WK_AVAILABLE/NS_AVAILABLE/ -e s/WK_DEPRECATED/NS_DEPRECATED/ -e s/WK_DESIGNATED_INITIALIZER/NS_DESIGNATED_INITIALIZER/ -e s/WK_ENUM_AVAILABLE/NS_ENUM_AVAILABLE/ -e s/WK_UNAVAILABLE/NS_UNAVAILABLE/ -e s/WK_ASSUME_NONNULL_BEGIN/NS_ASSUME_NONNULL_BEGIN/ -e s/WK_ASSUME_NONNULL_END/NS_ASSUME_NONNULL_END/ -e s/WK_NULLABLE_PROPERTY/nullable,/ -e s/WK_NULLABLE_SPECIFIER/__nullable/g -e s/WK_NULLABLE/nullable/g -e s/WK_NULL_UNSPECIFIED/null_unspecified/ ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} || exit $_
     56            sed -i .tmp -e s/^WK_CLASS_AVAILABLE/NS_CLASS_AVAILABLE/ -e s/WK_AVAILABLE/NS_AVAILABLE/ -e s/^WK_CLASS_DEPRECATED/NS_CLASS_DEPRECATED/ -e s/WK_DEPRECATED/NS_DEPRECATED/ -e s/WK_DESIGNATED_INITIALIZER/NS_DESIGNATED_INITIALIZER/ -e s/WK_ENUM_AVAILABLE/NS_ENUM_AVAILABLE/ -e s/WK_UNAVAILABLE/NS_UNAVAILABLE/ -e s/WK_ASSUME_NONNULL_BEGIN/NS_ASSUME_NONNULL_BEGIN/ -e s/WK_ASSUME_NONNULL_END/NS_ASSUME_NONNULL_END/ -e s/WK_NULLABLE_PROPERTY/nullable,/ -e s/WK_NULLABLE_SPECIFIER/__nullable/g -e s/WK_NULLABLE/nullable/g -e s/WK_NULL_UNSPECIFIED/null_unspecified/ ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} || exit $_
    5757            mv ${TARGET_TEMP_DIR}/${HEADER_PATH##*/} $HEADER_PATH
    5858        fi
  • trunk/Tools/ChangeLog

    r182926 r182930  
     12015-04-16  Anders Carlsson  <andersca@apple.com>
     2
     3        Deprecate _WKWebsiteDataStore in favor of WKWebsiteDataStore
     4        https://bugs.webkit.org/show_bug.cgi?id=143844
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * MiniBrowser/mac/AppDelegate.m:
     9        (-[BrowserAppDelegate newPrivateWindow:]):
     10        * MiniBrowser/mac/WK2BrowserWindowController.m:
     11        (-[WK2BrowserWindowController initWithConfiguration:]):
     12        (-[WK2BrowserWindowController fetchWebsiteData:]):
     13        (-[WK2BrowserWindowController fetchAndClearWebsiteData:]):
     14        (-[WK2BrowserWindowController clearWebsiteData:]):
     15
    1162015-04-16  Alex Christensen  <achristensen@webkit.org>
    217
  • trunk/Tools/MiniBrowser/mac/AppDelegate.m

    r182476 r182930  
    3737#import <WebKit/_WKProcessPoolConfiguration.h>
    3838#import <WebKit/_WKUserContentExtensionStore.h>
    39 #import <WebKit/_WKWebsiteDataStore.h>
    4039
    4140enum {
     
    119118#if WK_API_ENABLED
    120119    WKWebViewConfiguration *privateConfiguraton = [defaultConfiguration() copy];
    121     privateConfiguraton._websiteDataStore = [_WKWebsiteDataStore nonPersistentDataStore];
     120    privateConfiguraton.websiteDataStore = [WKWebsiteDataStore nonPersistentDataStore];
    122121
    123122    BrowserWindowController *controller = [[WK2BrowserWindowController alloc] initWithConfiguration:privateConfiguraton];
  • trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m

    r182772 r182930  
    3737#import <WebKit/WKWebViewPrivate.h>
    3838#import <WebKit/WebNSURLExtras.h>
    39 #import <WebKit/_WKWebsiteDataStore.h>
    4039
    4140static void* keyValueObservingContext = &keyValueObservingContext;
     
    8079
    8180    _configuration = [configuration copy];
    82     _isPrivateBrowsingWindow = _configuration._websiteDataStore.isNonPersistent;
     81    _isPrivateBrowsingWindow = _configuration.websiteDataStore.isNonPersistent;
    8382
    8483    return self;
     
    446445- (IBAction)fetchWebsiteData:(id)sender
    447446{
    448     [_configuration._websiteDataStore fetchDataRecordsOfTypes:dataTypes completionHandler:^(NSArray *websiteDataRecords) {
     447    [_configuration.websiteDataStore fetchDataRecordsOfTypes:dataTypes completionHandler:^(NSArray *websiteDataRecords) {
    449448        NSLog(@"did fetch website data %@.", websiteDataRecords);
    450449    }];
     
    453452- (IBAction)fetchAndClearWebsiteData:(id)sender
    454453{
    455     [_configuration._websiteDataStore fetchDataRecordsOfTypes:dataTypes completionHandler:^(NSArray *websiteDataRecords) {
    456         [_configuration._websiteDataStore removeDataOfTypes:dataTypes forDataRecords:websiteDataRecords completionHandler:^{
    457             [_configuration._websiteDataStore fetchDataRecordsOfTypes:dataTypes completionHandler:^(NSArray *websiteDataRecords) {
     454    [_configuration.websiteDataStore fetchDataRecordsOfTypes:dataTypes completionHandler:^(NSArray *websiteDataRecords) {
     455        [_configuration.websiteDataStore removeDataOfTypes:dataTypes forDataRecords:websiteDataRecords completionHandler:^{
     456            [_configuration.websiteDataStore fetchDataRecordsOfTypes:dataTypes completionHandler:^(NSArray *websiteDataRecords) {
    458457                NSLog(@"did clear website data, after clearing data is %@.", websiteDataRecords);
    459458            }];
     
    464463- (IBAction)clearWebsiteData:(id)sender
    465464{
    466     [_configuration._websiteDataStore removeDataOfTypes:dataTypes modifiedSince:[NSDate distantPast] completionHandler:^{
     465    [_configuration.websiteDataStore removeDataOfTypes:dataTypes modifiedSince:[NSDate distantPast] completionHandler:^{
    467466        NSLog(@"Did clear website data.");
    468467    }];
Note: See TracChangeset for help on using the changeset viewer.