- Revision
- 276164
- Author
- [email protected]
- Date
- 2021-04-16 13:41:08 -0700 (Fri, 16 Apr 2021)
Log Message
Disable ApplicationCache with linkedOnOrAfter check
https://bugs.webkit.org/show_bug.cgi?id=224629
Patch by Alex Christensen <[email protected]> on 2021-04-16
Reviewed by Brady Eidson.
Source/WebCore:
ApplicationCache has been deprecated for two years in WebKit with a message to developers since r227225.
Firefox removed support in https://bugzilla.mozilla.org/show_bug.cgi?id=1619673 which shipped with Firefox 84 on Dec 15, 2020.
Chrome removed support in https://bugs.chromium.org/p/chromium/issues/detail?id=582750 by default in Chrome 85 on August 25, 2020
but they have a reverse origin trial program running right now so that some origins have it working, but they are planning to remove
even that support October 2021.
We have kept it working for a reason related to rdar://38505756, specifically the 4th and 5th comment in that bug.
That reason is now passed.
This patch removes support for new apps but keeps it working for 3rd party apps linked with existing SDKs. Once those apps update
to a new SDK, they will be unable to use ApplicationCache. They will need to migrate to use fetch service workers instead.
* platform/cocoa/VersionChecks.h:
Source/WebKit:
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultOfflineWebApplicationCacheEnabled):
* Shared/WebPreferencesDefaultValues.h:
Source/WTF:
* Scripts/Preferences/WebPreferences.yaml:
Tools:
* TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::defaults):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (276163 => 276164)
--- trunk/Source/WTF/ChangeLog 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Source/WTF/ChangeLog 2021-04-16 20:41:08 UTC (rev 276164)
@@ -1,5 +1,14 @@
2021-04-16 Alex Christensen <[email protected]>
+ Disable ApplicationCache with linkedOnOrAfter check
+ https://bugs.webkit.org/show_bug.cgi?id=224629
+
+ Reviewed by Brady Eidson.
+
+ * Scripts/Preferences/WebPreferences.yaml:
+
+2021-04-16 Alex Christensen <[email protected]>
+
Reduce maximum HashTable entry size to 128 bytes
https://bugs.webkit.org/show_bug.cgi?id=224381
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml (276163 => 276164)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml 2021-04-16 20:41:08 UTC (rev 276164)
@@ -1598,7 +1598,7 @@
WebKitLegacy:
default: false
WebKit:
- default: true
+ default: WebKit::defaultOfflineWebApplicationCacheEnabled()
WebCore:
default: false
Modified: trunk/Source/WebCore/ChangeLog (276163 => 276164)
--- trunk/Source/WebCore/ChangeLog 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Source/WebCore/ChangeLog 2021-04-16 20:41:08 UTC (rev 276164)
@@ -1,3 +1,26 @@
+2021-04-16 Alex Christensen <[email protected]>
+
+ Disable ApplicationCache with linkedOnOrAfter check
+ https://bugs.webkit.org/show_bug.cgi?id=224629
+
+ Reviewed by Brady Eidson.
+
+ ApplicationCache has been deprecated for two years in WebKit with a message to developers since r227225.
+
+ Firefox removed support in https://bugzilla.mozilla.org/show_bug.cgi?id=1619673 which shipped with Firefox 84 on Dec 15, 2020.
+
+ Chrome removed support in https://bugs.chromium.org/p/chromium/issues/detail?id=582750 by default in Chrome 85 on August 25, 2020
+ but they have a reverse origin trial program running right now so that some origins have it working, but they are planning to remove
+ even that support October 2021.
+
+ We have kept it working for a reason related to rdar://38505756, specifically the 4th and 5th comment in that bug.
+ That reason is now passed.
+
+ This patch removes support for new apps but keeps it working for 3rd party apps linked with existing SDKs. Once those apps update
+ to a new SDK, they will be unable to use ApplicationCache. They will need to migrate to use fetch service workers instead.
+
+ * platform/cocoa/VersionChecks.h:
+
2021-04-16 Commit Queue <[email protected]>
Unreviewed, reverting r273733.
Modified: trunk/Source/WebCore/platform/cocoa/VersionChecks.h (276163 => 276164)
--- trunk/Source/WebCore/platform/cocoa/VersionChecks.h 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Source/WebCore/platform/cocoa/VersionChecks.h 2021-04-16 20:41:08 UTC (rev 276164)
@@ -72,6 +72,7 @@
FirstWithDOMWindowReuseRestriction = DYLD_IOS_VERSION_14_5,
FirstWithSharedNetworkProcess = DYLD_IOS_VERSION_14_5,
FirstWithBlankViewOnJSPrompt = DYLD_IOS_VERSION_14_5,
+ FirstWithApplicationCacheDisabledByDefault = DYLD_IOS_VERSION_15_0,
#elif PLATFORM(MAC)
FirstWithNetworkCache = DYLD_MACOSX_VERSION_10_11,
FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13,
@@ -94,6 +95,7 @@
FirstWithNullOriginForNonSpecialSchemedURLs = DYLD_MACOSX_VERSION_12_00,
FirstWithDOMWindowReuseRestriction = DYLD_MACOSX_VERSION_11_3,
FirstWithBlankViewOnJSPrompt = DYLD_MACOSX_VERSION_11_3,
+ FirstWithApplicationCacheDisabledByDefault = DYLD_MACOSX_VERSION_12_00,
#endif
};
Modified: trunk/Source/WebKit/ChangeLog (276163 => 276164)
--- trunk/Source/WebKit/ChangeLog 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Source/WebKit/ChangeLog 2021-04-16 20:41:08 UTC (rev 276164)
@@ -1,3 +1,14 @@
+2021-04-16 Alex Christensen <[email protected]>
+
+ Disable ApplicationCache with linkedOnOrAfter check
+ https://bugs.webkit.org/show_bug.cgi?id=224629
+
+ Reviewed by Brady Eidson.
+
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultOfflineWebApplicationCacheEnabled):
+ * Shared/WebPreferencesDefaultValues.h:
+
2021-04-16 Ada Chan <[email protected]>
Add WKUIDelegate SPI for starting XR session
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (276163 => 276164)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2021-04-16 20:41:08 UTC (rev 276164)
@@ -129,6 +129,18 @@
return defaultAsyncFrameAndOverflowScrollingEnabled();
}
+bool defaultOfflineWebApplicationCacheEnabled()
+{
+#if PLATFORM(COCOA)
+ static bool newSDK = linkedOnOrAfter(WebCore::SDKVersion::FirstWithApplicationCacheDisabledByDefault);
+ return !newSDK;
+#else
+ // FIXME: Other platforms should consider turning this off.
+ // ApplicationCache is on its way to being removed from WebKit.
+ return true;
+#endif
+}
+
#if ENABLE(GPU_PROCESS)
bool defaultUseGPUProcessForCanvasRenderingEnabled()
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (276163 => 276164)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2021-04-16 20:41:08 UTC (rev 276164)
@@ -66,6 +66,7 @@
bool defaultAsyncFrameScrollingEnabled();
bool defaultAsyncOverflowScrollingEnabled();
+bool defaultOfflineWebApplicationCacheEnabled();
#if ENABLE(GPU_PROCESS)
bool defaultUseGPUProcessForCanvasRenderingEnabled();
Modified: trunk/Tools/ChangeLog (276163 => 276164)
--- trunk/Tools/ChangeLog 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Tools/ChangeLog 2021-04-16 20:41:08 UTC (rev 276164)
@@ -1,3 +1,17 @@
+2021-04-16 Alex Christensen <[email protected]>
+
+ Disable ApplicationCache with linkedOnOrAfter check
+ https://bugs.webkit.org/show_bug.cgi?id=224629
+
+ Reviewed by Brady Eidson.
+
+ * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
+ (TEST):
+ * WebKitTestRunner/TestOptions.cpp:
+ (WTR::TestOptions::defaults):
+
2021-04-16 Tyler Wilcock <[email protected]>
[css-counter-styles] Parse and add feature flag for @counter-style
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit/WKPreferences.cpp (276163 => 276164)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit/WKPreferences.cpp 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/WKPreferences.cpp 2021-04-16 20:41:08 UTC (rev 276164)
@@ -74,7 +74,7 @@
EXPECT_TRUE(WKPreferencesGetJavaScriptEnabled(preference));
EXPECT_TRUE(WKPreferencesGetLoadsImagesAutomatically(preference));
- EXPECT_TRUE(WKPreferencesGetOfflineWebApplicationCacheEnabled(preference));
+ EXPECT_FALSE(WKPreferencesGetOfflineWebApplicationCacheEnabled(preference));
EXPECT_TRUE(WKPreferencesGetLocalStorageEnabled(preference));
EXPECT_TRUE(WKPreferencesGetXSSAuditorEnabled(preference));
EXPECT_FALSE(WKPreferencesGetFrameFlatteningEnabled(preference));
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm (276163 => 276164)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm 2021-04-16 20:41:08 UTC (rev 276164)
@@ -33,6 +33,7 @@
#import "TestWKWebView.h"
#import <_javascript_Core/JSCConfig.h>
#import <WebKit/WKHTTPCookieStorePrivate.h>
+#import <WebKit/WKPreferencesPrivate.h>
#import <WebKit/WKPreferencesRef.h>
#import <WebKit/WKProcessPoolPrivate.h>
#import <WebKit/WKUserContentControllerPrivate.h>
@@ -658,6 +659,7 @@
[webViewConfiguration setWebsiteDataStore:adoptNS([[WKWebsiteDataStore alloc] _initWithConfiguration:websiteDataStoreConfiguration.get()]).get()];
auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]);
+ [webView.get().configuration.preferences _setOfflineApplicationCacheIsEnabled:YES];
[webView synchronouslyLoadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://127.0.0.1:%d/index.html", server.port()]]]];
while (![fileManager fileExistsAtPath:subdirectoryPath])
Modified: trunk/Tools/WebKitTestRunner/TestOptions.cpp (276163 => 276164)
--- trunk/Tools/WebKitTestRunner/TestOptions.cpp 2021-04-16 20:35:15 UTC (rev 276163)
+++ trunk/Tools/WebKitTestRunner/TestOptions.cpp 2021-04-16 20:41:08 UTC (rev 276164)
@@ -98,6 +98,7 @@
{ "ModernMediaControlsEnabled", true },
{ "NeedsSiteSpecificQuirks", false },
{ "NeedsStorageAccessFromFileURLsQuirk", false },
+ { "OfflineWebApplicationCacheEnabled", true },
{ "OffscreenCanvasEnabled", true },
{ "PageVisibilityBasedProcessSuppressionEnabled", false },
{ "PluginsEnabled", true },