Title: [203392] trunk/Source
Revision
203392
Author
[email protected]
Date
2016-07-18 19:02:37 -0700 (Mon, 18 Jul 2016)

Log Message

webbookmarksd needs to use the same AppCache directory as MobileSafari
https://bugs.webkit.org/show_bug.cgi?id=159912
Source/WebCore:


Reviewed by Alexey Proskuryakov.

No new tests.  This only changes behavior for webbookmarksd.

* platform/RuntimeApplicationChecks.h:
* platform/RuntimeApplicationChecks.mm:
(WebCore::IOSApplication::isWebBookmarksD): Added.

Source/WebKit2:

<rdar://problem/27056844>

Reviewed by Alexey Proskuryakov.

* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
Make webbookmarksd match MobileSafari by adding a matching runtime exception.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (203391 => 203392)


--- trunk/Source/WebCore/ChangeLog	2016-07-19 01:18:06 UTC (rev 203391)
+++ trunk/Source/WebCore/ChangeLog	2016-07-19 02:02:37 UTC (rev 203392)
@@ -1,3 +1,16 @@
+2016-07-18  Alex Christensen  <[email protected]>
+
+        webbookmarksd needs to use the same AppCache directory as MobileSafari
+        https://bugs.webkit.org/show_bug.cgi?id=159912
+
+        Reviewed by Alexey Proskuryakov.
+
+        No new tests.  This only changes behavior for webbookmarksd.
+
+        * platform/RuntimeApplicationChecks.h:
+        * platform/RuntimeApplicationChecks.mm:
+        (WebCore::IOSApplication::isWebBookmarksD): Added.
+
 2016-07-18  Chris Dumez  <[email protected]>
 
         EventTarget.dispatchEvent() parameter should not be nullable

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.h (203391 => 203392)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2016-07-19 01:18:06 UTC (rev 203391)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.h	2016-07-19 02:02:37 UTC (rev 203392)
@@ -62,6 +62,7 @@
 
 WEBCORE_EXPORT bool isMobileMail();
 WEBCORE_EXPORT bool isMobileSafari();
+WEBCORE_EXPORT bool isWebBookmarksD();
 bool isDumpRenderTree();
 bool isMobileStore();
 WEBCORE_EXPORT bool isWebApp();

Modified: trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm (203391 => 203392)


--- trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm	2016-07-19 01:18:06 UTC (rev 203391)
+++ trunk/Source/WebCore/platform/RuntimeApplicationChecks.mm	2016-07-19 02:02:37 UTC (rev 203392)
@@ -170,6 +170,12 @@
     return isMobileSafari;
 }
 
+bool IOSApplication::isWebBookmarksD()
+{
+    static bool isWebBookmarksD = applicationBundleIsEqualTo("com.apple.webbookmarksd");
+    return isWebBookmarksD;
+}
+
 bool IOSApplication::isDumpRenderTree()
 {
     // We use a prefix match instead of strict equality since LayoutTestRelay may launch multiple instances of

Modified: trunk/Source/WebKit2/ChangeLog (203391 => 203392)


--- trunk/Source/WebKit2/ChangeLog	2016-07-19 01:18:06 UTC (rev 203391)
+++ trunk/Source/WebKit2/ChangeLog	2016-07-19 02:02:37 UTC (rev 203392)
@@ -1,3 +1,15 @@
+2016-07-18  Alex Christensen  <[email protected]>
+
+        webbookmarksd needs to use the same AppCache directory as MobileSafari
+        https://bugs.webkit.org/show_bug.cgi?id=159912
+        <rdar://problem/27056844>
+
+        Reviewed by Alexey Proskuryakov.
+
+        * UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
+        (API::WebsiteDataStore::defaultApplicationCacheDirectory):
+        Make webbookmarksd match MobileSafari by adding a matching runtime exception.
+
 2016-07-18  Anders Carlsson  <[email protected]>
 
         Don't null out the IPC::Connection's XPC connection

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm (203391 => 203392)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm	2016-07-19 01:18:06 UTC (rev 203391)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm	2016-07-19 02:02:37 UTC (rev 203392)
@@ -40,9 +40,9 @@
 #if PLATFORM(IOS)
     // This quirk used to make these apps share application cache storage, but doesn't accomplish that any more.
     // Preserving it avoids the need to migrate data when upgrading.
-    // FIXME: Ideally we should just have Safari and WebApp create a data store with
+    // FIXME: Ideally we should just have Safari, WebApp, and webbookmarksd create a data store with
     // this application cache path, but that's not supported as of right now.
-    if (WebCore::IOSApplication::isMobileSafari() || WebCore::IOSApplication::isWebApp()) {
+    if (WebCore::IOSApplication::isMobileSafari() || WebCore::IOSApplication::isWebApp() || WebCore::IOSApplication::isWebBookmarksD()) {
         NSString *cachePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches/com.apple.WebAppCache"];
 
         return WebKit::stringByResolvingSymlinksInPath(cachePath.stringByStandardizingPath);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to