-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ApplicationCache code from WebKit #24669
Remove ApplicationCache code from WebKit #24669
Conversation
EWS run on previous version of this PR (hash 49ebbd4) |
49ebbd4
to
a7431cc
Compare
EWS run on previous version of this PR (hash a7431cc) |
a7431cc
to
07e5b4f
Compare
EWS run on previous version of this PR (hash 07e5b4f) |
07e5b4f
to
fe33951
Compare
EWS run on previous version of this PR (hash fe33951) |
API test failure looks real. |
@@ -129,7 +129,6 @@ WK_EXPORT void WKBundlePageClearApplicationCache(WKBundlePageRef page); | |||
WK_EXPORT void WKBundlePageClearApplicationCacheForOrigin(WKBundlePageRef page, WKStringRef origin); | |||
WK_EXPORT void WKBundlePageSetAppCacheMaximumSize(WKBundlePageRef page, uint64_t size); | |||
WK_EXPORT uint64_t WKBundlePageGetAppCacheUsageForOrigin(WKBundlePageRef page, WKStringRef origin); | |||
WK_EXPORT void WKBundlePageSetApplicationCacheOriginQuota(WKBundlePageRef page, WKStringRef origin, uint64_t bytes); | |||
WK_EXPORT void WKBundlePageResetApplicationCacheOriginQuota(WKBundlePageRef page, WKStringRef origin); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not deprecate or remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remove the ones that are not in use. Some of them are still in use by WebKitTestRunner, I will modify tests and remove the rest in followup.
@@ -102,7 +102,7 @@ typedef struct WKBundlePageUIClientV1 { | |||
WKBundlePageToolbarsAreVisibleCallback toolbarsAreVisible; | |||
|
|||
// Version 1. | |||
WKBundlePageReachedAppCacheOriginQuotaCallback didReachApplicationCacheOriginQuota; | |||
void* unused3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not change the type or name of this.
@@ -461,6 +458,14 @@ void WebsiteDataStore::resolveDirectoriesIfNecessary() | |||
FileSystem::deleteEmptyDirectory(webSQLDirectory); | |||
}); | |||
} | |||
|
|||
if (auto applicationCacheDirectory = m_configuration->applicationCacheDirectory(); !applicationCacheDirectory.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we adding this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clear the stale data left on disk
fe33951
to
05f7af7
Compare
EWS run on current version of this PR (hash 05f7af7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start.
void WKBundlePageResetApplicationCacheOriginQuota(WKBundlePageRef page, WKStringRef origin) | ||
{ | ||
WebKit::toImpl(page)->corePage()->applicationCacheStorage().storeUpdatedQuotaForOrigin(WebCore::SecurityOrigin::createFromString(WebKit::toImpl(origin)->string()).ptr(), WebKit::toImpl(page)->corePage()->applicationCacheStorage().defaultOriginQuota()); | ||
return 0; | ||
} | ||
|
||
WKArrayRef WKBundlePageCopyOriginsWithApplicationCache(WKBundlePageRef page) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should deprecate and eventually remove these too.
https://bugs.webkit.org/show_bug.cgi?id=269629 rdar://123123740 Reviewed by Alex Christensen. Also, clean up AppCache data left on disk when WebsiteDataStore resolves directories. * Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest): (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest): (WebCore::ApplicationCacheGroup::selectCache): (WebCore::ApplicationCacheGroup::didReachMaxAppCacheSize): (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota): * Source/WebCore/page/ChromeClient.h: (WebCore::ChromeClient::reachedMaxAppCacheSize): (WebCore::ChromeClient::reachedApplicationCacheOriginQuota): * Source/WebCore/page/Page.cpp: (WebCore::Page::Page): * Source/WebCore/page/Page.h: (WebCore::Page::applicationCacheStorage): * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): (WebCore::Internals::setApplicationCacheOriginQuota): * Source/WebKit/Shared/WebProcessDataStoreParameters.h: * Source/WebKit/Shared/WebProcessDataStoreParameters.serialization.in: * Source/WebKit/UIProcess/API/APIUIClient.h: (API::UIClient::exceededDatabaseQuota): (API::UIClient::reachedApplicationCacheOriginQuota): Deleted. * Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp: (WKContextConfigurationCopyApplicationCacheDirectory): Deleted. (WKContextConfigurationSetApplicationCacheDirectory): Deleted. * Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h: * Source/WebKit/UIProcess/Cocoa/UIDelegate.h: * Source/WebKit/UIProcess/Cocoa/UIDelegate.mm: (WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota): Deleted. * Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp: (WebKit::bubblewrapSpawn): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reachedApplicationCacheOriginQuota): Deleted. * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/UIProcess/WebPageProxy.messages.in: * Source/WebKit/UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::webProcessDataStoreParameters): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary): (WebKit::WebsiteDataStore::fetchDataAndApply): (WebKit::WebsiteDataStore::removeData): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h: (WebKit::WebsiteDataStore::resolvedCacheStorageDirectory const): (WebKit::WebsiteDataStore::applicationCacheFlatFileSubdirectoryName const): Deleted. (WebKit::WebsiteDataStore::resolvedApplicationCacheDirectory const): Deleted. * Source/WebKit/UIProcess/glib/WebProcessProxyGLib.cpp: (WebKit::WebProcessProxy::platformGetLaunchOptions): * Source/WebKit/WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h: (API::InjectedBundle::PageUIClient::didReachApplicationCacheOriginQuota): Deleted. * Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageClearApplicationCache): (WKBundlePageClearApplicationCacheForOrigin): (WKBundlePageSetAppCacheMaximumSize): (WKBundlePageGetAppCacheUsageForOrigin): (WKBundlePageCopyOriginsWithApplicationCache): (WKBundlePageSetApplicationCacheOriginQuota): Deleted. (WKBundlePageResetApplicationCacheOriginQuota): Deleted. * Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: * Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp: * Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota): Deleted. * Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: * Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::scheduleLoad): * Source/WebKit/WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::willSendRequest): (WebKit::WebResourceLoader::didReceiveResponse): (WebKit::WebResourceLoader::didFailResourceLoad): * Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reachedMaxAppCacheSize): Deleted. (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): Deleted. * Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::m_unifiedTextReplacementController): * Source/WebKit/WebProcess/WebProcess.cpp: (WebKit::WebProcess::setWebsiteDataStoreParameters): (WebKit::WebProcess::didClose): * Source/WebKit/WebProcess/WebProcess.h: (WebKit::WebProcess::applicationCacheStorage): Deleted. * Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformSetWebsiteDataStoreParameters): * Tools/TestWebKitAPI/Tests/WebKitCocoa/LocalStorageClear.mm: (TEST): * Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::InjectedBundlePage): (WTR::InjectedBundlePage::didReachApplicationCacheOriginQuota): Deleted. * Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: * Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::disallowIncreaseForApplicationCacheQuota): Deleted. * Tools/WebKitTestRunner/InjectedBundle/TestRunner.h: (WTR::TestRunner::shouldDisallowIncreaseForApplicationCacheQuota): Deleted. Canonical link: https://commits.webkit.org/275114@main
05f7af7
to
bcbd49c
Compare
Committed 275114@main (bcbd49c): https://commits.webkit.org/275114@main Reviewed commits have been landed. Closing PR #24669 and removing active labels. |
bcbd49c
05f7af7