Title: [169208] trunk/Source/WebKit2
- Revision
- 169208
- Author
- [email protected]
- Date
- 2014-05-22 11:23:21 -0700 (Thu, 22 May 2014)
Log Message
[iOS][WK2] Application cache is broken
https://bugs.webkit.org/show_bug.cgi?id=133172
<rdar://problem/16994593>
Reviewed by Andy Estes.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory): Use a proper
path for application cache database (same as WebKit1).
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (169207 => 169208)
--- trunk/Source/WebKit2/ChangeLog 2014-05-22 18:03:54 UTC (rev 169207)
+++ trunk/Source/WebKit2/ChangeLog 2014-05-22 18:23:21 UTC (rev 169208)
@@ -1,3 +1,15 @@
+2014-05-22 Alexey Proskuryakov <[email protected]>
+
+ [iOS][WK2] Application cache is broken
+ https://bugs.webkit.org/show_bug.cgi?id=133172
+ <rdar://problem/16994593>
+
+ Reviewed by Andy Estes.
+
+ * UIProcess/mac/WebContextMac.mm:
+ (WebKit::WebContext::platformDefaultApplicationCacheDirectory): Use a proper
+ path for application cache database (same as WebKit1).
+
2014-05-22 Enrica Casucci <[email protected]>
REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm (169207 => 169208)
--- trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm 2014-05-22 18:03:54 UTC (rev 169207)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm 2014-05-22 18:23:21 UTC (rev 169208)
@@ -48,7 +48,9 @@
#import "NetworkProcessProxy.h"
#endif
-#if !PLATFORM(IOS)
+#if PLATFORM(IOS)
+#import <WebCore/RuntimeApplicationChecksIOS.h>
+#else
#import <QuartzCore/CARemoteLayerServer.h>
#endif
@@ -142,15 +144,25 @@
NSString *appName = [[NSBundle mainBundle] bundleIdentifier];
if (!appName)
appName = [[NSProcessInfo processInfo] processName];
+#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.
+ if (applicationIsMobileSafari() || applicationIsWebApp())
+ appName = @"com.apple.WebAppCache";
+#endif
ASSERT(appName);
+#if PLATFORM(IOS)
+ NSString *cacheDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
+#else
char cacheDirectory[MAXPATHLEN];
size_t cacheDirectoryLen = confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectory, MAXPATHLEN);
if (!cacheDirectoryLen)
return String();
NSString *cacheDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:cacheDirectory length:cacheDirectoryLen - 1];
+#endif
return [cacheDir stringByAppendingPathComponent:appName];
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes