Bug 209260

Summary: Add SPI to move localStorage to a different domain
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Alex Christensen 2020-03-18 17:25:51 PDT
Add SPI to move localStorage to a different domain
Comment 1 Alex Christensen 2020-03-18 17:27:11 PDT
Created attachment 393924 [details]
Patch
Comment 2 Alex Christensen 2020-03-18 17:27:14 PDT
<rdar://problem/60285683>
Comment 3 Alex Christensen 2020-03-23 11:40:53 PDT
https://trac.webkit.org/changeset/258862/webkit
Comment 4 Alex Christensen 2020-03-24 10:37:55 PDT
Reverted in https://trac.webkit.org/changeset/258914/webkit
Comment 5 Alex Christensen 2020-05-01 14:19:36 PDT
Created attachment 398238 [details]
Patch
Comment 6 Alex Christensen 2020-05-01 14:23:23 PDT
Comment on attachment 398238 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=398238&action=review

Turns out this is better than alternatives.

> Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:83
> +- (void)_renameOrigin:(NSURL *)oldName to:(NSURL *)newName forDataOfTypes:(NSSet<NSString *> *)dataTypes completionHandler:(void (^)(void))completionHandler;

I changed these from NSStrings to NSURLs and _renameDomain to _renameOrigin

> Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:2415
> +            networkProcess->addSession(*this);

I also add the session if it hasn't been added yet so the use case works.
Comment 7 Alex Christensen 2020-05-01 15:17:54 PDT
Created attachment 398247 [details]
Patch
Comment 8 EWS 2020-05-01 16:38:28 PDT
Committed r261038: <https://trac.webkit.org/changeset/261038>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398247 [details].