⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 276164 in webkit


Ignore:
Timestamp:
Apr 16, 2021, 1:41:08 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Disable ApplicationCache with linkedOnOrAfter check
https://bugs.webkit.org/show_bug.cgi?id=224629

Patch by Alex Christensen <achristensen@webkit.org> 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):

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r276154 r276164  
     12021-04-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        Disable ApplicationCache with linkedOnOrAfter check
     4        https://bugs.webkit.org/show_bug.cgi?id=224629
     5
     6        Reviewed by Brady Eidson.
     7
     8        * Scripts/Preferences/WebPreferences.yaml:
     9
    1102021-04-16  Alex Christensen  <achristensen@webkit.org>
    211
  • trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml

    r275912 r276164  
    15991599      default: false
    16001600    WebKit:
    1601       default: true
     1601      default: WebKit::defaultOfflineWebApplicationCacheEnabled()
    16021602    WebCore:
    16031603      default: false
  • trunk/Source/WebCore/ChangeLog

    r276159 r276164  
     12021-04-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        Disable ApplicationCache with linkedOnOrAfter check
     4        https://bugs.webkit.org/show_bug.cgi?id=224629
     5
     6        Reviewed by Brady Eidson.
     7
     8        ApplicationCache has been deprecated for two years in WebKit with a message to developers since r227225.
     9
     10        Firefox removed support in https://bugzilla.mozilla.org/show_bug.cgi?id=1619673 which shipped with Firefox 84 on Dec 15, 2020.
     11
     12        Chrome removed support in https://bugs.chromium.org/p/chromium/issues/detail?id=582750 by default in Chrome 85 on August 25, 2020
     13        but they have a reverse origin trial program running right now so that some origins have it working, but they are planning to remove
     14        even that support October 2021.
     15
     16        We have kept it working for a reason related to rdar://38505756, specifically the 4th and 5th comment in that bug.
     17        That reason is now passed.
     18
     19        This patch removes support for new apps but keeps it working for 3rd party apps linked with existing SDKs.  Once those apps update
     20        to a new SDK, they will be unable to use ApplicationCache.  They will need to migrate to use fetch service workers instead.
     21
     22        * platform/cocoa/VersionChecks.h:
     23
    1242021-04-16  Commit Queue  <commit-queue@webkit.org>
    225
  • trunk/Source/WebCore/platform/cocoa/VersionChecks.h

    r275485 r276164  
    7373    FirstWithSharedNetworkProcess = DYLD_IOS_VERSION_14_5,
    7474    FirstWithBlankViewOnJSPrompt = DYLD_IOS_VERSION_14_5,
     75    FirstWithApplicationCacheDisabledByDefault = DYLD_IOS_VERSION_15_0,
    7576#elif PLATFORM(MAC)
    7677    FirstWithNetworkCache = DYLD_MACOSX_VERSION_10_11,
     
    9596    FirstWithDOMWindowReuseRestriction = DYLD_MACOSX_VERSION_11_3,
    9697    FirstWithBlankViewOnJSPrompt = DYLD_MACOSX_VERSION_11_3,
     98    FirstWithApplicationCacheDisabledByDefault = DYLD_MACOSX_VERSION_12_00,
    9799#endif
    98100};
  • trunk/Source/WebKit/ChangeLog

    r276160 r276164  
     12021-04-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        Disable ApplicationCache with linkedOnOrAfter check
     4        https://bugs.webkit.org/show_bug.cgi?id=224629
     5
     6        Reviewed by Brady Eidson.
     7
     8        * Shared/WebPreferencesDefaultValues.cpp:
     9        (WebKit::defaultOfflineWebApplicationCacheEnabled):
     10        * Shared/WebPreferencesDefaultValues.h:
     11
    1122021-04-16  Ada Chan  <ada.chan@apple.com>
    213
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp

    r275418 r276164  
    130130}
    131131
     132bool defaultOfflineWebApplicationCacheEnabled()
     133{
     134#if PLATFORM(COCOA)
     135    static bool newSDK = linkedOnOrAfter(WebCore::SDKVersion::FirstWithApplicationCacheDisabledByDefault);
     136    return !newSDK;
     137#else
     138    // FIXME: Other platforms should consider turning this off.
     139    // ApplicationCache is on its way to being removed from WebKit.
     140    return true;
     141#endif
     142}
     143
    132144#if ENABLE(GPU_PROCESS)
    133145
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h

    r275077 r276164  
    6767bool defaultAsyncFrameScrollingEnabled();
    6868bool defaultAsyncOverflowScrollingEnabled();
     69bool defaultOfflineWebApplicationCacheEnabled();
    6970
    7071#if ENABLE(GPU_PROCESS)
  • trunk/Tools/ChangeLog

    r276152 r276164  
     12021-04-16  Alex Christensen  <achristensen@webkit.org>
     2
     3        Disable ApplicationCache with linkedOnOrAfter check
     4        https://bugs.webkit.org/show_bug.cgi?id=224629
     5
     6        Reviewed by Brady Eidson.
     7
     8        * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
     9        (TestWebKitAPI::TEST):
     10        * TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
     11        (TEST):
     12        * WebKitTestRunner/TestOptions.cpp:
     13        (WTR::TestOptions::defaults):
     14
    1152021-04-16  Tyler Wilcock  <twilco.o@protonmail.com>
    216
  • trunk/Tools/TestWebKitAPI/Tests/WebKit/WKPreferences.cpp

    r264580 r276164  
    7575    EXPECT_TRUE(WKPreferencesGetJavaScriptEnabled(preference));
    7676    EXPECT_TRUE(WKPreferencesGetLoadsImagesAutomatically(preference));
    77     EXPECT_TRUE(WKPreferencesGetOfflineWebApplicationCacheEnabled(preference));
     77    EXPECT_FALSE(WKPreferencesGetOfflineWebApplicationCacheEnabled(preference));
    7878    EXPECT_TRUE(WKPreferencesGetLocalStorageEnabled(preference));
    7979    EXPECT_TRUE(WKPreferencesGetXSSAuditorEnabled(preference));
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm

    r275267 r276164  
    3434#import <JavaScriptCore/JSCConfig.h>
    3535#import <WebKit/WKHTTPCookieStorePrivate.h>
     36#import <WebKit/WKPreferencesPrivate.h>
    3637#import <WebKit/WKPreferencesRef.h>
    3738#import <WebKit/WKProcessPoolPrivate.h>
     
    659660   
    660661    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]);
     662    [webView.get().configuration.preferences _setOfflineApplicationCacheIsEnabled:YES];
    661663    [webView synchronouslyLoadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://127.0.0.1:%d/index.html", server.port()]]]];
    662664
  • trunk/Tools/WebKitTestRunner/TestOptions.cpp

    r275810 r276164  
    9999            { "NeedsSiteSpecificQuirks", false },
    100100            { "NeedsStorageAccessFromFileURLsQuirk", false },
     101            { "OfflineWebApplicationCacheEnabled", true },
    101102            { "OffscreenCanvasEnabled", true },
    102103            { "PageVisibilityBasedProcessSuppressionEnabled", false },
Note: See TracChangeset for help on using the changeset viewer.