Diff
Modified: trunk/Source/WebCore/ChangeLog (231456 => 231457)
--- trunk/Source/WebCore/ChangeLog 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebCore/ChangeLog 2018-05-07 21:56:53 UTC (rev 231457)
@@ -1,3 +1,26 @@
+2018-05-07 Brent Fulgham <[email protected]>
+
+ Add experimental feature to prompt for Storage Access API use
+ https://bugs.webkit.org/show_bug.cgi?id=185335
+ <rdar://problem/39994649>
+
+ Reviewed by Alex Christensen and Youenn Fablet.
+
+ Create a new experimental feature that gates the ability of WebKit clients to prompt the user when
+ Storage Access API is invoked.
+
+ Currently this feature doesn't have any user-visible impact.
+
+ * page/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::setStorageAccessPromptsEnabled):
+ (WebCore::RuntimeEnabledFeatures::storageAccessPromptsEnabled const):
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::Backup::Backup):
+ (WebCore::InternalSettings::Backup::restoreTo):
+ (WebCore::InternalSettings::setStorageAccessPromptsEnabled):
+ * testing/InternalSettings.h:
+ * testing/InternalSettings.idl:
+
2018-05-07 Chris Dumez <[email protected]>
Stop using an iframe's id as fallback if its name attribute is not set
Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (231456 => 231457)
--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -256,6 +256,9 @@
void setWebGLCompressedTextureASTCSupportEnabled(bool isEnabled) { m_isWebGLCompressedTextureASTCSupportEnabled = isEnabled; }
bool webGLCompressedTextureASTCSupportEnabled() const { return m_isWebGLCompressedTextureASTCSupportEnabled; }
+ void setStorageAccessPromptsEnabled(bool isEnabled) { m_promptForStorageAccessAPIEnabled = isEnabled; }
+ bool storageAccessPromptsEnabled() const { return m_promptForStorageAccessAPIEnabled; }
+
WEBCORE_EXPORT static RuntimeEnabledFeatures& sharedFeatures();
private:
@@ -394,6 +397,8 @@
bool m_isWebGLCompressedTextureASTCSupportEnabled { false };
+ bool m_promptForStorageAccessAPIEnabled { false };
+
friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
};
Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (231456 => 231457)
--- trunk/Source/WebCore/testing/InternalSettings.cpp 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp 2018-05-07 21:56:53 UTC (rev 231457)
@@ -122,6 +122,7 @@
, m_shouldManageAudioSessionCategory(DeprecatedGlobalSettings::shouldManageAudioSessionCategory())
#endif
, m_customPasteboardDataEnabled(RuntimeEnabledFeatures::sharedFeatures().customPasteboardDataEnabled())
+ , m_promptForStorageAccessAPIEnabled(RuntimeEnabledFeatures::sharedFeatures().storageAccessPromptsEnabled())
{
}
@@ -225,6 +226,8 @@
#if USE(AUDIO_SESSION)
DeprecatedGlobalSettings::setShouldManageAudioSessionCategory(m_shouldManageAudioSessionCategory);
#endif
+
+ RuntimeEnabledFeatures::sharedFeatures().setStorageAccessPromptsEnabled(m_promptForStorageAccessAPIEnabled);
}
class InternalSettingsWrapper : public Supplement<Page> {
@@ -776,6 +779,11 @@
#endif
}
+void InternalSettings::setStorageAccessPromptsEnabled(bool enabled)
+{
+ RuntimeEnabledFeatures::sharedFeatures().setStorageAccessPromptsEnabled(enabled);
+}
+
ExceptionOr<String> InternalSettings::userInterfaceDirectionPolicy()
{
if (!m_page)
Modified: trunk/Source/WebCore/testing/InternalSettings.h (231456 => 231457)
--- trunk/Source/WebCore/testing/InternalSettings.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebCore/testing/InternalSettings.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -127,6 +127,8 @@
static bool cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled();
+ static void setStorageAccessPromptsEnabled(bool);
+
private:
explicit InternalSettings(Page*);
@@ -214,6 +216,7 @@
bool m_shouldManageAudioSessionCategory;
#endif
bool m_customPasteboardDataEnabled;
+ bool m_promptForStorageAccessAPIEnabled { false };
};
Page* m_page;
Modified: trunk/Source/WebCore/testing/InternalSettings.idl (231456 => 231457)
--- trunk/Source/WebCore/testing/InternalSettings.idl 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebCore/testing/InternalSettings.idl 2018-05-07 21:56:53 UTC (rev 231457)
@@ -92,6 +92,7 @@
void setWebGPUEnabled(boolean enabled);
void setWebVREnabled(boolean enabled);
void setScreenCaptureEnabled(boolean enabled);
+ void setStorageAccessPromptsEnabled(boolean enabled);
[MayThrowException] DOMString userInterfaceDirectionPolicy();
[MayThrowException] void setUserInterfaceDirectionPolicy(DOMString policy);
Modified: trunk/Source/WebKit/ChangeLog (231456 => 231457)
--- trunk/Source/WebKit/ChangeLog 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/ChangeLog 2018-05-07 21:56:53 UTC (rev 231457)
@@ -1,3 +1,48 @@
+2018-05-07 Brent Fulgham <[email protected]>
+
+ Add experimental feature to prompt for Storage Access API use
+ https://bugs.webkit.org/show_bug.cgi?id=185335
+ <rdar://problem/39994649>
+
+ Reviewed by Alex Christensen and Youenn Fablet.
+
+ Create a new experimental feature that gates the ability of WebKit clients to prompt the user when
+ Storage Access API is invoked.
+
+ Currently this feature doesn't have any user-visible impact.
+
+ * Shared/API/APIObject.h:
+ * Shared/API/c/WKBase.h:
+ * Shared/WebPreferences.yaml:
+ * UIProcess/API/APIUIClient.h:
+ (API::UIClient::requestStorageAccessConfirm):
+ * UIProcess/API/C/WKPage.cpp:
+ (WebKit::RequestStorageAccessConfirmResultListener::create):
+ (WebKit::RequestStorageAccessConfirmResultListener::~RequestStorageAccessConfirmResultListener):
+ (WebKit::RequestStorageAccessConfirmResultListener::call):
+ (WebKit::RequestStorageAccessConfirmResultListener::RequestStorageAccessConfirmResultListener):
+ (WKPageRequestStorageAccessConfirmResultListenerGetTypeID):
+ (WKPageRequestStorageAccessConfirmResultListenerCall):
+ (WKPageSetPageUIClient):
+ * UIProcess/API/C/WKPageUIClient.h:
+ * UIProcess/API/Cocoa/WKPreferences.mm:
+ (-[WKPreferences _storageAccessPromptsEnabled]):
+ (-[WKPreferences _setStorageAccessPromptsEnabled:]):
+ * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
+ * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
+ * UIProcess/Cocoa/UIDelegate.h:
+ * UIProcess/Cocoa/UIDelegate.mm:
+ (WebKit::UIDelegate::setDelegate):
+ (WebKit::UIDelegate::UIClient::requestStorageAccessConfirm):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::requestStorageAccessConfirm):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/WebPreferences.cpp:
+ (WebKit::WebPreferences::update):
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+ (WebKit::WebChromeClient::requestStorageAccess):
+
2018-05-07 Dean Jackson <[email protected]>
Use a dark gray for system preview bbackground
Modified: trunk/Source/WebKit/Shared/API/APIObject.h (231456 => 231457)
--- trunk/Source/WebKit/Shared/API/APIObject.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/Shared/API/APIObject.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -144,6 +144,7 @@
ProcessPoolConfiguration,
PluginSiteDataManager,
Preferences,
+ RequestStorageAccessConfirmResultListener,
ResourceLoadStatisticsStore,
RunBeforeUnloadConfirmPanelResultListener,
RunJavaScriptAlertResultListener,
Modified: trunk/Source/WebKit/Shared/API/c/WKBase.h (231456 => 231457)
--- trunk/Source/WebKit/Shared/API/c/WKBase.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/Shared/API/c/WKBase.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -125,6 +125,7 @@
typedef const struct OpaqueWKPageRunJavaScriptAlertResultListener* WKPageRunJavaScriptAlertResultListenerRef;
typedef const struct OpaqueWKPageRunJavaScriptConfirmResultListener* WKPageRunJavaScriptConfirmResultListenerRef;
typedef const struct OpaqueWKPageRunJavaScriptPromptResultListener* WKPageRunJavaScriptPromptResultListenerRef;
+typedef const struct OpaqueWKPageRequestStorageAccessConfirmResultListener* WKPageRequestStorageAccessConfirmResultListenerRef;
typedef const struct OpaqueWKResourceLoadStatisticsManager* WKResourceLoadStatisticsManagerRef;
typedef const struct OpaqueWKTextChecker* WKTextCheckerRef;
typedef const struct OpaqueWKSession* WKSessionRef;
Modified: trunk/Source/WebKit/Shared/WebPreferences.yaml (231456 => 231457)
--- trunk/Source/WebKit/Shared/WebPreferences.yaml 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/Shared/WebPreferences.yaml 2018-05-07 21:56:53 UTC (rev 231457)
@@ -1259,3 +1259,11 @@
humanReadableDescription: "Support for ASTC compressed texture formats in WebGL"
category: experimental
webcoreBinding: RuntimeEnabledFeatures
+
+StorageAccessPromptsEnabled:
+ type: bool
+ defaultValue: false
+ humanReadableName: "Prompt for Storage Access API Requests"
+ humanReadableDescription: "Prompt the user when Storage Access API calls are made"
+ category: experimental
+ webcoreBinding: RuntimeEnabledFeatures
Modified: trunk/Source/WebKit/UIProcess/API/APIUIClient.h (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/API/APIUIClient.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/API/APIUIClient.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -128,6 +128,7 @@
virtual bool decidePolicyForUserMediaPermissionRequest(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, SecurityOrigin&, SecurityOrigin&, WebKit::UserMediaPermissionRequestProxy&) { return false; }
virtual bool checkUserMediaPermissionForOrigin(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, SecurityOrigin&, SecurityOrigin&, WebKit::UserMediaPermissionCheckProxy&) { return false; }
virtual void decidePolicyForNotificationPermissionRequest(WebKit::WebPageProxy&, SecurityOrigin&, Function<void(bool)>&& completionHandler) { completionHandler(false); }
+ virtual void requestStorageAccessConfirm(WebKit::WebPageProxy&, WebKit::WebFrameProxy*, const WTF::String& requestingDomain, const WTF::String& currentDomain, CompletionHandler<void(bool)>&& completionHandler) { completionHandler(true); }
// Printing.
virtual float headerHeight(WebKit::WebPageProxy&, WebKit::WebFrameProxy&) { return 0; }
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp 2018-05-07 21:56:53 UTC (rev 231457)
@@ -111,7 +111,7 @@
};
template<> struct ClientTraits<WKPageUIClientBase> {
- typedef std::tuple<WKPageUIClientV0, WKPageUIClientV1, WKPageUIClientV2, WKPageUIClientV3, WKPageUIClientV4, WKPageUIClientV5, WKPageUIClientV6, WKPageUIClientV7, WKPageUIClientV8, WKPageUIClientV9, WKPageUIClientV10, WKPageUIClientV11> Versions;
+ typedef std::tuple<WKPageUIClientV0, WKPageUIClientV1, WKPageUIClientV2, WKPageUIClientV3, WKPageUIClientV4, WKPageUIClientV5, WKPageUIClientV6, WKPageUIClientV7, WKPageUIClientV8, WKPageUIClientV9, WKPageUIClientV10, WKPageUIClientV11, WKPageUIClientV12> Versions;
};
#if ENABLE(CONTEXT_MENUS)
@@ -1510,10 +1510,36 @@
Function<void (const String&)> m_completionHandler;
};
+class RequestStorageAccessConfirmResultListener : public API::ObjectImpl<API::Object::Type::RequestStorageAccessConfirmResultListener> {
+public:
+ static Ref<RequestStorageAccessConfirmResultListener> create(CompletionHandler<void(bool)>&& completionHandler)
+ {
+ return adoptRef(*new RequestStorageAccessConfirmResultListener(WTFMove(completionHandler)));
+ }
+
+ virtual ~RequestStorageAccessConfirmResultListener()
+ {
+ }
+
+ void call(bool result)
+ {
+ m_completionHandler(result);
+ }
+
+private:
+ explicit RequestStorageAccessConfirmResultListener(CompletionHandler<void(bool)>&& completionHandler)
+ : m_completionHandler(WTFMove(completionHandler))
+ {
+ }
+
+ CompletionHandler<void(bool)> m_completionHandler;
+};
+
WK_ADD_API_MAPPING(WKPageRunBeforeUnloadConfirmPanelResultListenerRef, RunBeforeUnloadConfirmPanelResultListener)
WK_ADD_API_MAPPING(WKPageRunJavaScriptAlertResultListenerRef, RunJavaScriptAlertResultListener)
WK_ADD_API_MAPPING(WKPageRunJavaScriptConfirmResultListenerRef, RunJavaScriptConfirmResultListener)
WK_ADD_API_MAPPING(WKPageRunJavaScriptPromptResultListenerRef, RunJavaScriptPromptResultListener)
+WK_ADD_API_MAPPING(WKPageRequestStorageAccessConfirmResultListenerRef, RequestStorageAccessConfirmResultListener)
}
@@ -1557,6 +1583,16 @@
toImpl(listener)->call(toWTFString(result));
}
+WKTypeID WKPageRequestStorageAccessConfirmResultListenerGetTypeID()
+{
+ return toAPI(RequestStorageAccessConfirmResultListener::APIType);
+}
+
+void WKPageRequestStorageAccessConfirmResultListenerCall(WKPageRequestStorageAccessConfirmResultListenerRef listener, bool result)
+{
+ toImpl(listener)->call(result);
+}
+
void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient)
{
class UIClient : public API::Client<WKPageUIClientBase>, public API::UIClient {
@@ -1982,6 +2018,17 @@
m_client.decidePolicyForNotificationPermissionRequest(toAPI(&page), toAPI(&origin), toAPI(NotificationPermissionRequest::create(WTFMove(completionHandler)).ptr()), m_client.base.clientInfo);
}
+ void requestStorageAccessConfirm(WebPageProxy& page, WebFrameProxy* frame, const WTF::String& requestingDomain, const WTF::String& currentDomain, CompletionHandler<void(bool)>&& completionHandler) final
+ {
+ if (!m_client.requestStorageAccessConfirm) {
+ completionHandler(true);
+ return;
+ }
+
+ auto listener = RequestStorageAccessConfirmResultListener::create(WTFMove(completionHandler));
+ m_client.requestStorageAccessConfirm(toAPI(&page), toAPI(frame), toAPI(requestingDomain.impl()), toAPI(currentDomain.impl()), toAPI(listener.ptr()), m_client.base.clientInfo);
+ }
+
// Printing.
float headerHeight(WebPageProxy& page, WebFrameProxy& frame) final
{
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPageUIClient.h (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/API/C/WKPageUIClient.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPageUIClient.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -79,6 +79,9 @@
WK_EXPORT WKTypeID WKPageRunJavaScriptPromptResultListenerGetTypeID();
WK_EXPORT void WKPageRunJavaScriptPromptResultListenerCall(WKPageRunJavaScriptPromptResultListenerRef listener, WKStringRef result);
+WK_EXPORT WKTypeID WKPageRequestStorageAccessConfirmResultListenerGetTypeID();
+WK_EXPORT void WKPageRequestStorageAccessConfirmResultListenerCall(WKPageRequestStorageAccessConfirmResultListenerRef listener, bool result);
+
typedef void (*WKPageUIClientCallback)(WKPageRef page, const void* clientInfo);
typedef WKPageRef (*WKPageCreateNewPageCallback)(WKPageRef page, WKPageConfigurationRef configuration, WKNavigationActionRef navigationAction, WKWindowFeaturesRef windowFeatures, const void *clientInfo);
typedef void (*WKPageRunBeforeUnloadConfirmPanelCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, WKPageRunBeforeUnloadConfirmPanelResultListenerRef listener, const void *clientInfo);
@@ -85,6 +88,7 @@
typedef void (*WKPageRunJavaScriptAlertCallback)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, WKSecurityOriginRef securityOrigin, WKPageRunJavaScriptAlertResultListenerRef listener, const void *clientInfo);
typedef void (*WKPageRunJavaScriptConfirmCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, WKSecurityOriginRef securityOrigin, WKPageRunJavaScriptConfirmResultListenerRef listener, const void *clientInfo);
typedef void (*WKPageRunJavaScriptPromptCallback)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, WKSecurityOriginRef securityOrigin, WKPageRunJavaScriptPromptResultListenerRef listener, const void *clientInfo);
+typedef void (*WKPageRequestStorageAccessConfirmCallback)(WKPageRef page, WKFrameRef frame, WKStringRef requestingDomain, WKStringRef currentDomain, WKPageRequestStorageAccessConfirmResultListenerRef listener, const void *clientInfo);
typedef void (*WKPageTakeFocusCallback)(WKPageRef page, WKFocusDirection direction, const void *clientInfo);
typedef void (*WKPageFocusCallback)(WKPageRef page, const void *clientInfo);
typedef void (*WKPageUnfocusCallback)(WKPageRef page, const void *clientInfo);
@@ -1033,6 +1037,107 @@
WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
} WKPageUIClientV11;
+typedef struct WKPageUIClientV12 {
+ WKPageUIClientBase base;
+
+ // Version 0.
+ WKPageCreateNewPageCallback_deprecatedForUseWithV0 createNewPage_deprecatedForUseWithV0;
+ WKPageUIClientCallback showPage;
+ WKPageUIClientCallback close;
+ WKPageTakeFocusCallback takeFocus;
+ WKPageFocusCallback focus;
+ WKPageUnfocusCallback unfocus;
+ WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0 runJavaScriptAlert_deprecatedForUseWithV0;
+ WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0 runJavaScriptConfirm_deprecatedForUseWithV0;
+ WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0 runJavaScriptPrompt_deprecatedForUseWithV0;
+ WKPageSetStatusTextCallback setStatusText;
+ WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0 mouseDidMoveOverElement_deprecatedForUseWithV0;
+ WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0 missingPluginButtonClicked_deprecatedForUseWithV0;
+ WKPageDidNotHandleKeyEventCallback didNotHandleKeyEvent;
+ WKPageDidNotHandleWheelEventCallback didNotHandleWheelEvent;
+ WKPageGetToolbarsAreVisibleCallback toolbarsAreVisible;
+ WKPageSetToolbarsAreVisibleCallback setToolbarsAreVisible;
+ WKPageGetMenuBarIsVisibleCallback menuBarIsVisible;
+ WKPageSetMenuBarIsVisibleCallback setMenuBarIsVisible;
+ WKPageGetStatusBarIsVisibleCallback statusBarIsVisible;
+ WKPageSetStatusBarIsVisibleCallback setStatusBarIsVisible;
+ WKPageGetIsResizableCallback isResizable;
+ WKPageSetIsResizableCallback setIsResizable;
+ WKPageGetWindowFrameCallback getWindowFrame;
+ WKPageSetWindowFrameCallback setWindowFrame;
+ WKPageRunBeforeUnloadConfirmPanelCallback_deprecatedForUseWithV6 runBeforeUnloadConfirmPanel_deprecatedForUseWithV6;
+ WKPageUIClientCallback didDraw;
+ WKPageUIClientCallback pageDidScroll;
+ WKPageExceededDatabaseQuotaCallback exceededDatabaseQuota;
+ WKPageRunOpenPanelCallback runOpenPanel;
+ WKPageDecidePolicyForGeolocationPermissionRequestCallback decidePolicyForGeolocationPermissionRequest;
+ WKPageHeaderHeightCallback headerHeight;
+ WKPageFooterHeightCallback footerHeight;
+ WKPageDrawHeaderCallback drawHeader;
+ WKPageDrawFooterCallback drawFooter;
+ WKPagePrintFrameCallback printFrame;
+ WKPageUIClientCallback runModal;
+ void* unused1; // Used to be didCompleteRubberBandForMainFrame
+ WKPageSaveDataToFileInDownloadsFolderCallback saveDataToFileInDownloadsFolder;
+ void* shouldInterruptJavaScript_unavailable;
+
+ // Version 1.
+ WKPageCreateNewPageCallback_deprecatedForUseWithV1 createNewPage_deprecatedForUseWithV1;
+ WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement;
+ WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
+ WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1 unavailablePluginButtonClicked_deprecatedForUseWithV1;
+
+ // Version 2.
+ WKPageShowColorPickerCallback showColorPicker;
+ WKPageHideColorPickerCallback hideColorPicker;
+ WKPageUnavailablePluginButtonClickedCallback unavailablePluginButtonClicked;
+
+ // Version 3.
+ WKPagePinnedStateDidChangeCallback pinnedStateDidChange;
+
+ // Version 4.
+ void* unused2; // Used to be didBeginTrackingPotentialLongMousePress.
+ void* unused3; // Used to be didRecognizeLongMousePress.
+ void* unused4; // Used to be didCancelTrackingPotentialLongMousePress.
+ WKPageIsPlayingAudioDidChangeCallback isPlayingAudioDidChange;
+
+ // Version 5.
+ WKPageDecidePolicyForUserMediaPermissionRequestCallback decidePolicyForUserMediaPermissionRequest;
+ WKPageDidClickAutoFillButtonCallback didClickAutoFillButton;
+ WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV5 runJavaScriptAlert_deprecatedForUseWithV5;
+ WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV5 runJavaScriptConfirm_deprecatedForUseWithV5;
+ WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV5 runJavaScriptPrompt_deprecatedForUseWithV5;
+ WKPageMediaSessionMetadataDidChangeCallback mediaSessionMetadataDidChange;
+
+ // Version 6.
+ WKPageCreateNewPageCallback createNewPage;
+ WKPageRunJavaScriptAlertCallback runJavaScriptAlert;
+ WKPageRunJavaScriptConfirmCallback runJavaScriptConfirm;
+ WKPageRunJavaScriptPromptCallback runJavaScriptPrompt;
+ WKCheckUserMediaPermissionCallback checkUserMediaPermissionForOrigin;
+
+ // Version 7.
+ WKPageRunBeforeUnloadConfirmPanelCallback runBeforeUnloadConfirmPanel;
+ WKFullscreenMayReturnToInlineCallback fullscreenMayReturnToInline;
+
+ // Version 8.
+ WKRequestPointerLockCallback requestPointerLock;
+ WKDidLosePointerLockCallback didLosePointerLock;
+
+ // Version 9.
+ WKHandleAutoplayEventCallback handleAutoplayEvent;
+
+ // Version 10.
+ WKHasVideoInPictureInPictureDidChangeCallback hasVideoInPictureInPictureDidChange;
+ WKDidExceedBackgroundResourceLimitWhileInForegroundCallback didExceedBackgroundResourceLimitWhileInForeground;
+
+ // Version 11.
+ WKPageDidResignInputElementStrongPasswordAppearanceCallback didResignInputElementStrongPasswordAppearance;
+
+ // Version 12.
+ WKPageRequestStorageAccessConfirmCallback requestStorageAccessConfirm;
+} WKPageUIClientV12;
+
#ifdef __cplusplus
}
#endif
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferences.cpp 2018-05-07 21:56:53 UTC (rev 231457)
@@ -194,6 +194,16 @@
return toImpl(preferencesRef)->_javascript_CanOpenWindowsAutomatically();
}
+void WKPreferencesSetStorageAccessPromptsEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+ toImpl(preferencesRef)->setStorageAccessPromptsEnabled(enabled);
+}
+
+bool WKPreferencesGetStorageAccessPromptsEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->storageAccessPromptsEnabled();
+}
+
void WKPreferencesSetHyperlinkAuditingEnabled(WKPreferencesRef preferencesRef, bool hyperlinkAuditingEnabled)
{
toImpl(preferencesRef)->setHyperlinkAuditingEnabled(hyperlinkAuditingEnabled);
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -108,6 +108,10 @@
WK_EXPORT void WKPreferencesSetJavaScriptCanOpenWindowsAutomatically(WKPreferencesRef preferences, bool _javascript_CanOpenWindowsAutomatically);
WK_EXPORT bool WKPreferencesGetJavaScriptCanOpenWindowsAutomatically(WKPreferencesRef preferences);
+// Defaults to false.
+WK_EXPORT void WKPreferencesSetStorageAccessPromptsEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetStorageAccessPromptsEnabled(WKPreferencesRef preferencesRef);
+
// Defaults to true.
WK_EXPORT void WKPreferencesSetHyperlinkAuditingEnabled(WKPreferencesRef preferences, bool hyperlinkAuditingEnabled);
WK_EXPORT bool WKPreferencesGetHyperlinkAuditingEnabled(WKPreferencesRef preferences);
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm 2018-05-07 21:56:53 UTC (rev 231457)
@@ -129,6 +129,16 @@
_preferences->setJavaScriptCanOpenWindowsAutomatically(_javascript_CanOpenWindowsAutomatically);
}
+- (BOOL)_storageAccessPromptsEnabled
+{
+ return _preferences->storageAccessPromptsEnabled();
+}
+
+- (void)_setStorageAccessPromptsEnabled:(BOOL)enabled
+{
+ _preferences->setStorageAccessPromptsEnabled(enabled);
+}
+
#pragma mark OS X-specific methods
#if PLATFORM(MAC)
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -136,6 +136,8 @@
@property (nonatomic, setter=_setShouldEnableTextAutosizingBoost:) BOOL _shouldEnableTextAutosizingBoost WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic, setter=_setStorageAccessPromptsEnabled:) BOOL _storageAccessPromptsEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+
#if !TARGET_OS_IPHONE
@property (nonatomic, setter=_setWebGLEnabled:) BOOL _webGLEnabled WK_API_AVAILABLE(macosx(10.13.4));
@property (nonatomic, setter=_setJavaEnabledForLocalFiles:) BOOL _javaEnabledForLocalFiles WK_API_AVAILABLE(macosx(10.13.4));
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -116,6 +116,8 @@
- (void)_webView:(WKWebView *)webView didResignInputElementStrongPasswordAppearanceWithUserInfo:(id <NSSecureCoding>)userInfo WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+- (void)_webView:(WKWebView *)webView requestStorageAccessPanelForDomain:(NSString *)requestingDomain underCurrentDomain:(NSString *)currentDomain completionHandler:(void (^)(BOOL result))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+
#if TARGET_OS_IPHONE
- (BOOL)_webView:(WKWebView *)webView shouldIncludeAppLinkActionsForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(9.0));
- (NSArray *)_webView:(WKWebView *)webView actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(NSArray<_WKElementAction *> *)defaultActions;
Modified: trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -88,6 +88,7 @@
void runJavaScriptAlert(WebPageProxy*, const WTF::String&, WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void()>&& completionHandler) final;
void runJavaScriptConfirm(WebPageProxy*, const WTF::String&, WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void(bool)>&& completionHandler) final;
void runJavaScriptPrompt(WebPageProxy*, const WTF::String&, const WTF::String&, WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void(const WTF::String&)>&&) final;
+ void requestStorageAccessConfirm(WebPageProxy&, WebFrameProxy*, const WTF::String& requestingDomain, const WTF::String& currentDomain, CompletionHandler<void(bool)>&&) final;
void decidePolicyForGeolocationPermissionRequest(WebPageProxy&, WebFrameProxy&, API::SecurityOrigin&, Function<void(bool)>&) final;
bool canRunBeforeUnloadConfirmPanel() const final;
void runBeforeUnloadConfirmPanel(WebPageProxy*, const WTF::String&, WebFrameProxy*, const WebCore::SecurityOriginData&, Function<void(bool)>&& completionHandler) final;
@@ -156,6 +157,7 @@
bool webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler : 1;
+ bool webViewRequestStorageAccessPanelForTopPrivatelyControlledDomainUnderFirstPartyTopPrivatelyControlledDomainCompletionHandler : 1;
bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1;
bool webViewRequestGeolocationPermissionForFrameDecisionHandler : 1;
bool webViewDidResignInputElementStrongPasswordAppearanceWithUserInfo : 1;
Modified: trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm 2018-05-07 21:56:53 UTC (rev 231457)
@@ -102,6 +102,7 @@
m_delegateMethods.webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:)];
m_delegateMethods.webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:)];
m_delegateMethods.webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:)];
+ m_delegateMethods.webViewRequestStorageAccessPanelForTopPrivatelyControlledDomainUnderFirstPartyTopPrivatelyControlledDomainCompletionHandler = [delegate respondsToSelector:@selector(_webView:requestStorageAccessPanelForDomain:underCurrentDomain:completionHandler:)];
m_delegateMethods.webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler = [delegate respondsToSelector:@selector(_webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:completionHandler:)];
m_delegateMethods.webViewRequestGeolocationPermissionForFrameDecisionHandler = [delegate respondsToSelector:@selector(_webView:requestGeolocationPermissionForFrame:decisionHandler:)];
m_delegateMethods.webViewDidResignInputElementStrongPasswordAppearanceWithUserInfo = [delegate respondsToSelector:@selector(_webView:didResignInputElementStrongPasswordAppearanceWithUserInfo:)];
@@ -328,6 +329,28 @@
}).get()];
}
+void UIDelegate::UIClient::requestStorageAccessConfirm(WebPageProxy&, WebFrameProxy*, const WTF::String& requestingDomain, const WTF::String& currentDomain, CompletionHandler<void(bool)>&& completionHandler)
+{
+ if (!m_uiDelegate.m_delegateMethods.webViewRequestStorageAccessPanelForTopPrivatelyControlledDomainUnderFirstPartyTopPrivatelyControlledDomainCompletionHandler) {
+ completionHandler(true);
+ return;
+ }
+
+ auto delegate = m_uiDelegate.m_delegate.get();
+ if (!delegate) {
+ completionHandler(true);
+ return;
+ }
+
+ auto checker = CompletionHandlerCallChecker::create(delegate.get(), @selector(_webView:requestStorageAccessPanelForDomain:underCurrentDomain:completionHandler:));
+ [(id <WKUIDelegatePrivate>)delegate _webView:m_uiDelegate.m_webView requestStorageAccessPanelForDomain:requestingDomain underCurrentDomain:currentDomain completionHandler:BlockPtr<void(BOOL)>::fromCallable([completionHandler = WTFMove(completionHandler), checker = WTFMove(checker)](BOOL result) {
+ if (checker->completionHandlerHasBeenCalled())
+ return;
+ completionHandler(result);
+ checker->didCallCompletionHandler();
+ }).get()];
+}
+
void UIDelegate::UIClient::decidePolicyForGeolocationPermissionRequest(WebKit::WebPageProxy&, WebKit::WebFrameProxy& frame, API::SecurityOrigin& securityOrigin, Function<void(bool)>& completionHandler)
{
if (!m_uiDelegate.m_delegateMethods.webViewRequestGeolocationPermissionForFrameDecisionHandler)
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-05-07 21:56:53 UTC (rev 231457)
@@ -7472,18 +7472,28 @@
}
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
-void WebPageProxy::hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, uint64_t webProcessContextId)
+void WebPageProxy::hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t webProcessContextId)
{
- m_websiteDataStore->hasStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, pageID, [this, webProcessContextId] (bool hasAccess) {
+ m_websiteDataStore->hasStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, m_pageID, [this, webProcessContextId] (bool hasAccess) {
m_process->send(Messages::WebPage::StorageAccessResponse(hasAccess, webProcessContextId), m_pageID);
});
}
-void WebPageProxy::requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, uint64_t webProcessContextId)
+void WebPageProxy::requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t webProcessContextId, bool promptEnabled)
{
- ASSERT(pageID == m_pageID);
- m_websiteDataStore->requestStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, pageID, [this, webProcessContextId] (bool wasGranted) {
- m_process->send(Messages::WebPage::StorageAccessResponse(wasGranted, webProcessContextId), m_pageID);
+ auto completionHandler = [this, protectedThis = makeRef(*this), webProcessContextId] (bool access) {
+ m_process->send(Messages::WebPage::StorageAccessResponse(access, webProcessContextId), m_pageID);
+ };
+ String requestingDomain = subFrameHost;
+ String currentDomain = topFrameHost;
+ m_websiteDataStore->requestStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, m_pageID, [this, protectedThis = makeRef(*this), requestingDomain = WTFMove(requestingDomain), currentDomain = WTFMove(currentDomain), promptEnabled, frameID, completionHandler = WTFMove(completionHandler)] (bool wasGranted) mutable {
+ if (!wasGranted)
+ return completionHandler(false);
+
+ if (!promptEnabled)
+ return completionHandler(true);
+
+ m_uiClient->requestStorageAccessConfirm(*this, m_process->webFrame(frameID), requestingDomain, currentDomain, WTFMove(completionHandler));
});
}
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -1280,8 +1280,8 @@
#endif
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
- void hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, uint64_t webProcessContextId);
- void requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, uint64_t webProcessContextId);
+ void hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t webProcessContextId);
+ void requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t webProcessContextId, bool prompt);
#endif
#if ENABLE(ATTACHMENT_ELEMENT)
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (231456 => 231457)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2018-05-07 21:56:53 UTC (rev 231457)
@@ -512,8 +512,8 @@
StopURLSchemeTask(uint64_t handlerIdentifier, uint64_t taskIdentifier)
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
- HasStorageAccess(String subFrameHost, String topFrameHost, uint64_t frameID, uint64_t pageID, uint64_t contextID)
- RequestStorageAccess(String subFrameHost, String topFrameHost, uint64_t frameID, uint64_t pageID, uint64_t contextID)
+ HasStorageAccess(String subFrameHost, String topFrameHost, uint64_t frameID, uint64_t contextID)
+ RequestStorageAccess(String subFrameHost, String topFrameHost, uint64_t frameID, uint64_t contextID, bool prompt)
#endif
#if ENABLE(ATTACHMENT_ELEMENT)
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp (231456 => 231457)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp 2018-05-07 21:56:53 UTC (rev 231457)
@@ -1284,14 +1284,14 @@
}
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
-void WebChromeClient::hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback)
+void WebChromeClient::hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t, CompletionHandler<void(bool)>&& callback)
{
- m_page.hasStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, pageID, WTFMove(callback));
+ m_page.hasStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, WTFMove(callback));
}
-void WebChromeClient::requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback)
+void WebChromeClient::requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t, CompletionHandler<void(bool)>&& callback)
{
- m_page.requestStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, pageID, WTFMove(callback));
+ m_page.requestStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, WTFMove(callback));
}
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (231456 => 231457)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-05-07 21:56:53 UTC (rev 231457)
@@ -5912,25 +5912,26 @@
return ++nextContextId;
}
-void WebPage::hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback)
+void WebPage::hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, CompletionHandler<void(bool)>&& callback)
{
auto contextId = nextRequestStorageAccessContextId();
auto addResult = m_storageAccessResponseCallbackMap.add(contextId, WTFMove(callback));
ASSERT(addResult.isNewEntry);
if (addResult.iterator->value)
- send(Messages::WebPageProxy::HasStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, pageID, contextId));
+ send(Messages::WebPageProxy::HasStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, contextId));
else
callback(false);
}
-void WebPage::requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback)
+void WebPage::requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, CompletionHandler<void(bool)>&& callback)
{
auto contextId = nextRequestStorageAccessContextId();
auto addResult = m_storageAccessResponseCallbackMap.add(contextId, WTFMove(callback));
ASSERT(addResult.isNewEntry);
- if (addResult.iterator->value)
- send(Messages::WebPageProxy::RequestStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, pageID, contextId));
- else
+ if (addResult.iterator->value) {
+ bool promptEnabled = RuntimeEnabledFeatures::sharedFeatures().storageAccessPromptsEnabled();
+ send(Messages::WebPageProxy::RequestStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, contextId, promptEnabled));
+ } else
callback(false);
}
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (231456 => 231457)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-05-07 21:42:29 UTC (rev 231456)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-05-07 21:56:53 UTC (rev 231457)
@@ -1054,8 +1054,8 @@
void flushPendingEditorStateUpdate();
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
- void hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback);
- void requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback);
+ void hasStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, CompletionHandler<void(bool)>&& callback);
+ void requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, CompletionHandler<void(bool)>&& callback);
void storageAccessResponse(bool wasGranted, uint64_t contextId);
#endif