Title: [228504] branches/safari-605-branch/Source/WebKit

Diff

Modified: branches/safari-605-branch/Source/WebKit/ChangeLog (228503 => 228504)


--- branches/safari-605-branch/Source/WebKit/ChangeLog	2018-02-15 03:41:57 UTC (rev 228503)
+++ branches/safari-605-branch/Source/WebKit/ChangeLog	2018-02-15 07:48:09 UTC (rev 228504)
@@ -1,3 +1,26 @@
+2018-02-14  Jason Marcell  <jmarc...@apple.com>
+
+        Cherry-pick r228442. rdar://problem/37559831
+
+    2018-02-13  Youenn Fablet  <you...@apple.com>
+
+            Add support for configuring WebsiteDatastore service worker and cache storage path
+            https://bugs.webkit.org/show_bug.cgi?id=182674
+
+            Reviewed by Chris Dumez.
+
+            Beef up WKWebsiteDataStoreConfiguration to easily set the WebsiteDataStore
+            service worker registration and cache storage directory path.
+
+            * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
+            (-[WKWebsiteDataStore _initWithConfiguration:]):
+            * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
+            * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
+            (-[_WKWebsiteDataStoreConfiguration _cacheStorageDirectory]):
+            (-[_WKWebsiteDataStoreConfiguration _setCacheStorageDirectory:]):
+            (-[_WKWebsiteDataStoreConfiguration _serviceWorkerRegistrationDirectory]):
+            (-[_WKWebsiteDataStoreConfiguration _setServiceWorkerRegistrationDirectory:]):
+
 2018-02-13  Jason Marcell  <jmarc...@apple.com>
 
         Cherry-pick r228350. rdar://problem/37523984

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (228503 => 228504)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2018-02-15 03:41:57 UTC (rev 228503)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm	2018-02-15 07:48:09 UTC (rev 228504)
@@ -199,6 +199,10 @@
         config.cookieStorageFile = configuration._cookieStorageFile.path;
     if (configuration._resourceLoadStatisticsDirectory)
         config.resourceLoadStatisticsDirectory = configuration._resourceLoadStatisticsDirectory.path;
+    if (configuration._cacheStorageDirectory)
+        config.cacheStorageDirectory = configuration._cacheStorageDirectory.path;
+    if (configuration._serviceWorkerRegistrationDirectory)
+        config.serviceWorkerRegistrationDirectory = configuration._serviceWorkerRegistrationDirectory.path;
 
     API::Object::constructInWrapper<API::WebsiteDataStore>(self, config, PAL::SessionID::generatePersistentSessionID());
 

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h (228503 => 228504)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h	2018-02-15 03:41:57 UTC (rev 228503)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h	2018-02-15 07:48:09 UTC (rev 228504)
@@ -39,6 +39,8 @@
 @property (nonatomic, copy, setter=_setWebSQLDatabaseDirectory:) NSURL *_webSQLDatabaseDirectory;
 @property (nonatomic, copy, setter=_setCookieStorageFile:) NSURL *_cookieStorageFile;
 @property (nonatomic, copy, setter=_setResourceLoadStatisticsDirectory:) NSURL *_resourceLoadStatisticsDirectory WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic, copy, setter=_setCacheStorageDirectory:) NSURL *_cacheStorageDirectory WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic, copy, setter=_setServiceWorkerRegistrationDirectory:) NSURL *_serviceWorkerRegistrationDirectory WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 
 @end
 

Modified: branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm (228503 => 228504)


--- branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm	2018-02-15 03:41:57 UTC (rev 228503)
+++ branches/safari-605-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm	2018-02-15 07:48:09 UTC (rev 228504)
@@ -42,6 +42,8 @@
     RetainPtr<NSURL> _webSQLDatabaseDirectoryURL;
     RetainPtr<NSURL> _cookieStorageFileURL;
     RetainPtr<NSURL> _resourceLoadStatisticsDirectoryURL;
+    RetainPtr<NSURL> _cacheStorageDirectoryURL;
+    RetainPtr<NSURL> _serviceWorkerRegistrationDirectoryURL;
 }
 
 - (NSURL *)_webStorageDirectory
@@ -102,6 +104,28 @@
     _resourceLoadStatisticsDirectoryURL = adoptNS([url copy]);
 }
 
+- (NSURL *)_cacheStorageDirectory
+{
+    return _cacheStorageDirectoryURL.get();
+}
+
+- (void)_setCacheStorageDirectory:(NSURL *)url
+{
+    checkURLArgument(url);
+    _cacheStorageDirectoryURL = adoptNS([url copy]);
+}
+
+- (NSURL *)_serviceWorkerRegistrationDirectory
+{
+    return _serviceWorkerRegistrationDirectoryURL.get();
+}
+
+- (void)_setServiceWorkerRegistrationDirectory:(NSURL *)url
+{
+    checkURLArgument(url);
+    _serviceWorkerRegistrationDirectoryURL = adoptNS([url copy]);
+}
+
 @end
 
 #endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to