Bug 178601
| Summary: | Make setStorageBlockingPolicy a public API | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Dan Saunders <dasau> |
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | achristensen, beidson |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Mac | ||
| OS: | macOS 10.13 | ||
Dan Saunders
Third party content we load in WKWebView has a dependency of being able to use localStorage from an iframe. Currently, WKWebView is configured to isolate iframe localStorage, data is not able to be shared between the iframe and the same domain loaded in a main frame from another instance of WKWebView. WebView did not have this policy, the same site we load in WebView is working and able to share localStorage between the iframe and main frame of same domain. Safari in Sierra had "Cookies and website data" setting configurable to allow iframes to access localStorage, but it looks like in High Sierra this setting was removed and localStorage works by default in iframes. WKWebView still defaults to block the iframe storage in High Sierra, we should be able to configure it. This setting causes issue, as no other browser implements it. You can have a site work in Chrome/IE/Firefox but not work in WKWebView due to this.
typedef NS_ENUM(NSInteger, _WKStorageBlockingPolicy) {
_WKStorageBlockingPolicyAllowAll,
_WKStorageBlockingPolicyBlockThirdParty,
_WKStorageBlockingPolicyBlockAll,
} WK_API_AVAILABLE(macosx(10.10), ios(8.0));
@interface WKPreferences (WKPrivate)
@property (nonatomic, setter=_setStorageBlockingPolicy:) _WKStorageBlockingPolicy _storageBlockingPolicy;
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |