Skip to content

Commit b2c8ebc

Browse files
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. Canonical link: https://commits.webkit.org/178076@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@203392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent ac1d810 commit b2c8ebc

5 files changed

Lines changed: 34 additions & 2 deletions

File tree

Source/WebCore/ChangeLog

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2016-07-18 Alex Christensen <achristensen@webkit.org>
2+
3+
webbookmarksd needs to use the same AppCache directory as MobileSafari
4+
https://bugs.webkit.org/show_bug.cgi?id=159912
5+
6+
Reviewed by Alexey Proskuryakov.
7+
8+
No new tests. This only changes behavior for webbookmarksd.
9+
10+
* platform/RuntimeApplicationChecks.h:
11+
* platform/RuntimeApplicationChecks.mm:
12+
(WebCore::IOSApplication::isWebBookmarksD): Added.
13+
114
2016-07-18 Chris Dumez <cdumez@apple.com>
215

316
EventTarget.dispatchEvent() parameter should not be nullable

Source/WebCore/platform/RuntimeApplicationChecks.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ namespace IOSApplication {
6262

6363
WEBCORE_EXPORT bool isMobileMail();
6464
WEBCORE_EXPORT bool isMobileSafari();
65+
WEBCORE_EXPORT bool isWebBookmarksD();
6566
bool isDumpRenderTree();
6667
bool isMobileStore();
6768
WEBCORE_EXPORT bool isWebApp();

Source/WebCore/platform/RuntimeApplicationChecks.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ static bool applicationBundleIsEqualTo(const String& bundleIdentifierString)
170170
return isMobileSafari;
171171
}
172172

173+
bool IOSApplication::isWebBookmarksD()
174+
{
175+
static bool isWebBookmarksD = applicationBundleIsEqualTo("com.apple.webbookmarksd");
176+
return isWebBookmarksD;
177+
}
178+
173179
bool IOSApplication::isDumpRenderTree()
174180
{
175181
// We use a prefix match instead of strict equality since LayoutTestRelay may launch multiple instances of

Source/WebKit2/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2016-07-18 Alex Christensen <achristensen@webkit.org>
2+
3+
webbookmarksd needs to use the same AppCache directory as MobileSafari
4+
https://bugs.webkit.org/show_bug.cgi?id=159912
5+
<rdar://problem/27056844>
6+
7+
Reviewed by Alexey Proskuryakov.
8+
9+
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
10+
(API::WebsiteDataStore::defaultApplicationCacheDirectory):
11+
Make webbookmarksd match MobileSafari by adding a matching runtime exception.
12+
113
2016-07-18 Anders Carlsson <andersca@apple.com>
214

315
Don't null out the IPC::Connection's XPC connection

Source/WebKit2/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
#if PLATFORM(IOS)
4141
// This quirk used to make these apps share application cache storage, but doesn't accomplish that any more.
4242
// Preserving it avoids the need to migrate data when upgrading.
43-
// FIXME: Ideally we should just have Safari and WebApp create a data store with
43+
// FIXME: Ideally we should just have Safari, WebApp, and webbookmarksd create a data store with
4444
// this application cache path, but that's not supported as of right now.
45-
if (WebCore::IOSApplication::isMobileSafari() || WebCore::IOSApplication::isWebApp()) {
45+
if (WebCore::IOSApplication::isMobileSafari() || WebCore::IOSApplication::isWebApp() || WebCore::IOSApplication::isWebBookmarksD()) {
4646
NSString *cachePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches/com.apple.WebAppCache"];
4747

4848
return WebKit::stringByResolvingSymlinksInPath(cachePath.stringByStandardizingPath);

0 commit comments

Comments
 (0)