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
Implement removeDataOfTypes to WKWebsiteDataStore #13605
base: main
Are you sure you want to change the base?
Conversation
EWS run on previous version of this PR (hash 3a38799) |
EWS run on previous version of this PR (hash 74e6747) |
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 think this is mostly heading in a good direction, and hopefully my feedback can make it so I think it's completely heading in a good direction.
return WebKit::toAPI(API::WebsiteDataRecord::APIType); | ||
} | ||
|
||
WKWebsiteDataRecordRef WKWebsiteDataRecordCreate() |
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.
This shouldn't exist. Same with the setters. Instead, I think we should make something like WKWebsiteDataStore.allWebsiteDataTypes, which will probably require making a WKSetRef type like WKDictionaryRef.
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.
Just kidding. I meant fetchDataRecordsOfTypes, which means we don't need a WKSetRef. We already have WKArrayRef.
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.
Does that mean that WKWebsiteDataRecordRef is unnecessary?
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.
It it probably necessary, but it should not be constructible or modifiable by API clients. It is a read-only object that is only constructed inside of WebKit.
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.
Removed WKWebsiteDataStoreRemoveDataOfTypesWithDataRecord as WKWebsiteDataRecord is not available and created WK APIs like WKWebsiteDataStoreRemoveDataOfTypesWithValues instead. What do you think?
EWS run on previous version of this PR (hash 8dbf1dc) |
I will add new files to the xcode project. |
EWS run on previous version of this PR (hash 69ab19c) |
The following files are not directly related to this fix. Adding WK???.cpp to the build target causes a build error related to Unified Sources, which has been fixed. Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h |
EWS run on previous version of this PR (hash d9a960a) |
https://bugs.webkit.org/show_bug.cgi?id=256452 Reviewed by NOBODY (OOPS!). Add a function to WKAPI similar to WKWebsiteDataStore::removeDataOfTypes in the Cocoa port. * Source/WebKit/Headers.cmake: * Source/WebKit/Shared/API/c/WKBase.h: * Source/WebKit/Sources.txt: * Source/WebKit/SourcesCocoa.txt: * Source/WebKit/UIProcess/API/C/WKAPICast.cpp: Added. (WebKit::toWebsiteDataTypes): (WebKit::toAPI): * Source/WebKit/UIProcess/API/C/WKAPICast.h: * Source/WebKit/UIProcess/API/C/WKWebsiteDataRecordRef.cpp: Copied from Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingTreeIOS.h. (WKWebsiteDataRecordGetTypeID): (WKWebsiteDataRecordGetDisplayName): (WKWebsiteDataRecordGetDataTypes): * Source/WebKit/UIProcess/API/C/WKWebsiteDataRecordRef.h: Added. * Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp: (WKWebsiteDataStoreRemoveITPDataForDomain): (WKWebsiteDataStoreStatisticsClearThroughWebsiteDataRemoval): (WKWebsiteDataStoreRemoveAllFetchCaches): (WKWebsiteDataStoreRemoveNetworkCache): (WKWebsiteDataStoreRemoveMemoryCaches): (WKWebsiteDataStoreRemoveFetchCacheForOrigin): (WKWebsiteDataStoreRemoveAllIndexedDatabases): (WKWebsiteDataStoreRemoveLocalStorage): (WKWebsiteDataStoreRemoveAllServiceWorkerRegistrations): (WKWebsiteDataStoreClearPrivateClickMeasurementsThroughWebsiteDataRemoval): (WKWebsiteDataStoreClearStorage): (WKWebsiteDataStoreAllWebsiteDataTypes): (WKWebsiteDataStoreRemoveDataOfTypes): (WKWebsiteDataStoreRemoveDataOfTypesWithValues): * Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h: * Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingTreeIOS.cpp: * Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingTreeIOS.h: * Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeEventDispatcher.h: * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Tools/MiniBrowser/win/WebKitBrowserWindow.cpp: (removeDataOfTypesCallback): (WebKitBrowserWindow::clearWebsiteData): (removeAllFetchCachesCallback): Deleted. (removeNetworkCacheCallback): Deleted. (removeMemoryCachesCallback): Deleted. (removeAllServiceWorkerRegistrationsCallback): Deleted. (removeAllIndexedDatabasesCallback): Deleted. (removeLocalStorageCallback): Deleted. * Tools/WebKitTestRunner/TestController.cpp: (WTR::TestController::clearServiceWorkerRegistrations): (WTR::TestController::clearDOMCache): (WTR::TestController::clearDOMCaches): (WTR::TestController::clearMemoryCache): (WTR::TestController::clearIndexedDatabases): (WTR::TestController::clearLocalStorage): (WTR::TestController::clearStorage): (WTR::TestController::clearStatisticsDataForDomain): (WTR::TestController::statisticsClearThroughWebsiteDataRemoval): (WTR::TestController::clearPrivateClickMeasurementsThroughWebsiteDataRemoval): * Tools/WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
EWS run on current version of this PR (hash 1300c28) |
EWS run on current version of this PR (hash 1300c28) |
@achristensen07 |
1300c28
1300c28