WebKit Bugzilla
Attachment 339655 Details for
Bug 185335
: Add experimental feature to prompt for Storage Access API use
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185335-20180505142522.patch (text/plain), 44.05 KB, created by
Brent Fulgham
on 2018-05-05 14:25:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Brent Fulgham
Created:
2018-05-05 14:25:24 PDT
Size:
44.05 KB
patch
obsolete
>Subversion Revision: 231396 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 643899057e03d25ecbc3c3fdd48bce9166e16eaa..6380879725df1652c0ea13b87d2eb02f80fc4a70 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-05-05 Brent Fulgham <bfulgham@apple.com> >+ >+ Add experimental feature to prompt for Storage Access API use >+ https://bugs.webkit.org/show_bug.cgi?id=185335 >+ <rdar://problem/39994649> >+ >+ 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): >+ * testing/InternalSettings.h: >+ > 2018-05-04 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] Multiple links in Mail are dropped in a single line, and are difficult to tell apart >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 6bc61b61b4fa0246738dc1fa2eae9f8e23d6f533..be7498e38c7d8ab88559dc737bc37c513558aaa5 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,51 @@ >+2018-05-05 Brent Fulgham <bfulgham@apple.com> >+ >+ Add experimental feature to prompt for Storage Access API use >+ https://bugs.webkit.org/show_bug.cgi?id=185335 >+ <rdar://problem/39994649> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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/C/WKPreferences.cpp: >+ (WKPreferencesSetPromptForStorageAccessAPIEnabled): >+ (WKPreferencesGetPromptForStorageAccessAPIEnabled): >+ * UIProcess/API/C/WKPreferencesRef.h: >+ * UIProcess/API/Cocoa/WKPreferences.h: >+ * UIProcess/API/Cocoa/WKPreferences.mm: >+ (-[WKPreferences _storageAccessPromptsEnabled]): >+ (-[WKPreferences _setStorageAccessPromptsEnabled:]): >+ * UIProcess/API/Cocoa/WKPreferencesPrivate.h: >+ * UIProcess/API/Cocoa/WKUIDelegate.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: >+ * WebProcess/WebCoreSupport/WebChromeClient.cpp: >+ (WebKit::WebChromeClient::requestStorageAccess): >+ > 2018-05-04 Tim Horton <timothy_horton@apple.com> > > Shift to a lower-level framework for simplifying URLs >diff --git a/Source/WebCore/page/RuntimeEnabledFeatures.h b/Source/WebCore/page/RuntimeEnabledFeatures.h >index 7df0ac0689c46a10586a6af68215c450562c62b1..f692e57fd027a245b847bce70569aea020a87691 100644 >--- a/Source/WebCore/page/RuntimeEnabledFeatures.h >+++ b/Source/WebCore/page/RuntimeEnabledFeatures.h >@@ -256,6 +256,9 @@ public: > 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 @@ private: > > bool m_isWebGLCompressedTextureASTCSupportEnabled { false }; > >+ bool m_promptForStorageAccessAPIEnabled { false }; >+ > friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>; > }; > >diff --git a/Source/WebCore/testing/InternalSettings.cpp b/Source/WebCore/testing/InternalSettings.cpp >index 6b17e873bc2dcc9c8de61c53906b919a64928eff..ead4b6fc1d38a409215cf7c987261bc6ed6356e9 100644 >--- a/Source/WebCore/testing/InternalSettings.cpp >+++ b/Source/WebCore/testing/InternalSettings.cpp >@@ -122,6 +122,7 @@ InternalSettings::Backup::Backup(Settings& settings) > , m_shouldManageAudioSessionCategory(DeprecatedGlobalSettings::shouldManageAudioSessionCategory()) > #endif > , m_customPasteboardDataEnabled(RuntimeEnabledFeatures::sharedFeatures().customPasteboardDataEnabled()) >+ , m_promptForStorageAccessAPIEnabled(RuntimeEnabledFeatures::sharedFeatures().storageAccessPromptsEnabled()) > { > } > >@@ -225,6 +226,8 @@ void InternalSettings::Backup::restoreTo(Settings& settings) > #if USE(AUDIO_SESSION) > DeprecatedGlobalSettings::setShouldManageAudioSessionCategory(m_shouldManageAudioSessionCategory); > #endif >+ >+ RuntimeEnabledFeatures::sharedFeatures().setStorageAccessPromptsEnabled(m_promptForStorageAccessAPIEnabled); > } > > class InternalSettingsWrapper : public Supplement<Page> { >@@ -776,6 +779,15 @@ void InternalSettings::setScreenCaptureEnabled(bool enabled) > #endif > } > >+void InternalSettings::setStorageAccessPromptsEnabled(bool enabled) >+{ >+#if ENABLE(MEDIA_STREAM) >+ RuntimeEnabledFeatures::sharedFeatures().setStorageAccessPromptsEnabled(enabled); >+#else >+ UNUSED_PARAM(enabled); >+#endif >+} >+ > ExceptionOr<String> InternalSettings::userInterfaceDirectionPolicy() > { > if (!m_page) >diff --git a/Source/WebCore/testing/InternalSettings.h b/Source/WebCore/testing/InternalSettings.h >index 38e0719a0fe85ae058216c6056b6908eb4df570a..ce3b37204539dece0119e750644bae0002b5e265 100644 >--- a/Source/WebCore/testing/InternalSettings.h >+++ b/Source/WebCore/testing/InternalSettings.h >@@ -127,6 +127,8 @@ public: > > static bool cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled(); > >+ static void setStorageAccessPromptsEnabled(bool); >+ > private: > explicit InternalSettings(Page*); > >@@ -214,6 +216,7 @@ private: > bool m_shouldManageAudioSessionCategory; > #endif > bool m_customPasteboardDataEnabled; >+ bool m_promptForStorageAccessAPIEnabled { false }; > }; > > Page* m_page; >diff --git a/Source/WebCore/testing/InternalSettings.idl b/Source/WebCore/testing/InternalSettings.idl >index c9856a7533cc2c1215d531b96eb2ed34e55631ce..bf8854067996922309a40f7a0728329ad3b1ddf3 100644 >--- a/Source/WebCore/testing/InternalSettings.idl >+++ b/Source/WebCore/testing/InternalSettings.idl >@@ -92,6 +92,7 @@ enum FontLoadTimingOverride { "Block", "Swap", "Failure" }; > void setWebGPUEnabled(boolean enabled); > void setWebVREnabled(boolean enabled); > void setScreenCaptureEnabled(boolean enabled); >+ void setStorageAccessPromptsEnabled(boolean enabled); > > [MayThrowException] DOMString userInterfaceDirectionPolicy(); > [MayThrowException] void setUserInterfaceDirectionPolicy(DOMString policy); >diff --git a/Source/WebKit/Shared/API/APIObject.h b/Source/WebKit/Shared/API/APIObject.h >index 75572a6dbb046243b675b150e074ee8e52a65d60..1f6003ff5f4d9de4f186e7b1a3ba4ed2a12d2c70 100644 >--- a/Source/WebKit/Shared/API/APIObject.h >+++ b/Source/WebKit/Shared/API/APIObject.h >@@ -144,6 +144,7 @@ public: > ProcessPoolConfiguration, > PluginSiteDataManager, > Preferences, >+ RequestStorageAccessConfirmResultListener, > ResourceLoadStatisticsStore, > RunBeforeUnloadConfirmPanelResultListener, > RunJavaScriptAlertResultListener, >diff --git a/Source/WebKit/Shared/API/c/WKBase.h b/Source/WebKit/Shared/API/c/WKBase.h >index c995cbc5818836316dfcd9248dd079425065f8ed..1164c1582c412a7b550a5b1c56bb1df54ffe7aa9 100644 >--- a/Source/WebKit/Shared/API/c/WKBase.h >+++ b/Source/WebKit/Shared/API/c/WKBase.h >@@ -125,6 +125,7 @@ typedef const struct OpaqueWKPageRunBeforeUnloadConfirmPanelResultListener* WKPa > 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; >diff --git a/Source/WebKit/Shared/WebPreferences.yaml b/Source/WebKit/Shared/WebPreferences.yaml >index 0e04ccd9dce6a0b16aa08b215e3d85028ba92ab1..3189575a8d78d04e6c86d4414a63c5b6d2b376bb 100644 >--- a/Source/WebKit/Shared/WebPreferences.yaml >+++ b/Source/WebKit/Shared/WebPreferences.yaml >@@ -1259,3 +1259,11 @@ WebGLCompressedTextureASTCSupportEnabled: > 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 >diff --git a/Source/WebKit/UIProcess/API/APIUIClient.h b/Source/WebKit/UIProcess/API/APIUIClient.h >index d0bca76a0214111fe1fad8925fbc7af3191c7b24..77318b8aadfac6fa50f0cb61bdf17a8aed438f94 100644 >--- a/Source/WebKit/UIProcess/API/APIUIClient.h >+++ b/Source/WebKit/UIProcess/API/APIUIClient.h >@@ -128,6 +128,7 @@ public: > 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& topPrivatelyControlledDomainRequestingAccess, const WTF::String& topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided, Function<void (bool)>&& completionHandler) { completionHandler(true); } > > // Printing. > virtual float headerHeight(WebKit::WebPageProxy&, WebKit::WebFrameProxy&) { return 0; } >diff --git a/Source/WebKit/UIProcess/API/C/WKPage.cpp b/Source/WebKit/UIProcess/API/C/WKPage.cpp >index 67cfbf3ea003d0a0f7b87fa753b96f577bda19cf..e4dbdda9b381b8503e53b5917f7839623377dcb0 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPage.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKPage.cpp >@@ -111,7 +111,7 @@ template<> struct ClientTraits<WKPagePolicyClientBase> { > }; > > 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 @@ private: > Function<void (const String&)> m_completionHandler; > }; > >+class RequestStorageAccessConfirmResultListener : public API::ObjectImpl<API::Object::Type::RequestStorageAccessConfirmResultListener> { >+public: >+ static Ref<RequestStorageAccessConfirmResultListener> create(Function<void(bool)>&& completionHandler) >+ { >+ return adoptRef(*new RequestStorageAccessConfirmResultListener(WTFMove(completionHandler))); >+ } >+ >+ virtual ~RequestStorageAccessConfirmResultListener() >+ { >+ } >+ >+ void call(bool result) >+ { >+ m_completionHandler(result); >+ } >+ >+private: >+ explicit RequestStorageAccessConfirmResultListener(Function<void(bool)>&& completionHandler) >+ : m_completionHandler(WTFMove(completionHandler)) >+ { >+ } >+ >+ Function<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 @@ void WKPageRunJavaScriptPromptResultListenerCall(WKPageRunJavaScriptPromptResult > 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 @@ void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient > 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& topPrivatelyControlledDomainRequestingAccess, const WTF::String& topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided, Function<void(bool)>&& completionHandler) final >+ { >+ if (!m_client.requestStorageAccessConfirm) { >+ completionHandler(true); >+ return; >+ } >+ >+ RefPtr<RequestStorageAccessConfirmResultListener> listener = RequestStorageAccessConfirmResultListener::create(WTFMove(completionHandler)); >+ m_client.requestStorageAccessConfirm(toAPI(page), toAPI(frame), toAPI(topPrivatelyControlledDomainRequestingAccess.impl()), toAPI(topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided.impl()), toAPI(listener.get()), m_client.base.clientInfo); >+ } >+ > // Printing. > float headerHeight(WebPageProxy& page, WebFrameProxy& frame) final > { >diff --git a/Source/WebKit/UIProcess/API/C/WKPageUIClient.h b/Source/WebKit/UIProcess/API/C/WKPageUIClient.h >index a649b1d7dccb129fd366dd9b45f731b3b68aaa73..ae6edbc97e8e1f72b86985052fd0b5d0dd3c904d 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPageUIClient.h >+++ b/Source/WebKit/UIProcess/API/C/WKPageUIClient.h >@@ -79,12 +79,16 @@ WK_EXPORT void WKPageRunJavaScriptConfirmResultListenerCall(WKPageRunJavaScriptC > 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); > 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 topPrivatelyControlledDomainRequestingAccess, WKStringRef topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided, 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 @@ typedef struct WKPageUIClientV11 { > 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 >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >index edd474fe4d9d4e259e42ba879a042443958d9d4c..40691a04980df2bd82d94311228f91676469cdd1 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKPreferences.cpp >@@ -1983,3 +1983,13 @@ bool WKPreferencesGetRestrictedHTTPResponseAccess(WKPreferencesRef preferencesRe > { > return toImpl(preferencesRef)->restrictedHTTPResponseAccess(); > } >+ >+void WKPreferencesSetPromptForStorageAccessAPIEnabled(WKPreferencesRef preferencesRef, bool enabled) >+{ >+ toImpl(preferencesRef)->setStorageAccessPromptsEnabled(enabled); >+} >+ >+bool WKPreferencesGetPromptForStorageAccessAPIEnabled(WKPreferencesRef preferencesRef) >+{ >+ return toImpl(preferencesRef)->storageAccessPromptsEnabled(); >+} >diff --git a/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h b/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h >index a5f90f8f03c9f9d3e012d3a104a6fc8ad508a16d..088afbb01ecb753243f08d152ddde3a7b64912ee 100644 >--- a/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h >+++ b/Source/WebKit/UIProcess/API/C/WKPreferencesRef.h >@@ -319,6 +319,10 @@ WK_EXPORT void WKPreferencesSetRestrictedHTTPResponseAccess(WKPreferencesRef pre > WK_EXPORT bool WKPreferencesGetFromOriginResponseHeaderEnabled(WKPreferencesRef preferencesRef); > WK_EXPORT void WKPreferencesSetFromOriginResponseHeaderEnabled(WKPreferencesRef preferencesRef, bool allow); > >+// Defaults to false. >+WK_EXPORT void WKPreferencesSetPromptForStorageAccessAPIEnabled(WKPreferencesRef preferences, bool enabled); >+WK_EXPORT bool WKPreferencesGetPromptForStorageAccessAPIEnabled(WKPreferencesRef preferences); >+ > #ifdef __cplusplus > } > #endif >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h >index e35b7192c0b666ebff50f46f605c630a129db931..4c8df25a84b9b1ce2217f4436b6f260b2d60cc8d 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2014-2017 Apple Inc. All rights reserved. >+ * Copyright (C) 2014-2018 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm >index 9ba349599219a038b49420fd4bb68db498dfeae8..944e082d2b2e82ebb8d067569e5521635da81e47 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm >@@ -129,6 +129,16 @@ - (void)setJavaScriptCanOpenWindowsAutomatically:(BOOL)javaScriptCanOpenWindowsA > _preferences->setJavaScriptCanOpenWindowsAutomatically(javaScriptCanOpenWindowsAutomatically); > } > >+- (BOOL)_storageAccessPromptsEnabled >+{ >+ return _preferences->storageAccessPromptsEnabled(); >+} >+ >+- (void)_setStorageAccessPromptsEnabled:(BOOL)enabled >+{ >+ _preferences->setStorageAccessPromptsEnabled(enabled); >+} >+ > #pragma mark OS X-specific methods > > #if PLATFORM(MAC) >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h >index 977d4e8544de3c28d43526b26f679012d16c7c41..f9baf8ad689fabb6ca659372f464e7bfaf55e730 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKPreferencesPrivate.h >@@ -136,6 +136,8 @@ typedef NS_ENUM(NSInteger, _WKEditableLinkBehavior) { > > @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)); >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h b/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h >index d5bb6be8bf7ee97876b0abd2bf7686f188f10c69..f04df5806d12ad8d039e84d1857e5430965ef59f 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKUIDelegate.h >@@ -118,6 +118,22 @@ NS_ASSUME_NONNULL_BEGIN > */ > - (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * _Nullable result))completionHandler; > >+/*! @abstract Displays a non-partitioned storage access panel. >+ @param webView The web view invoking the delegate method. >+ @param topPrivatelyControlledDomain The eTLD+1 of the domain requesting >+ access to its non-partitioned website data. >+ @param underFirstPartyTopPrivatelyControlledDomain The eTLD+1 of the >+ first-party domain under which the request for website data access is >+ being made. >+ @param completionHandler The completion handler to call after the confirm >+ panel has been dismissed. Pass YES if the user chose OK, NO if the user >+ chose Don't Allow. >+ >+ If you do not implement this method, the web view will behave as if the >+ user selected the Don't Allow button. >+ */ >+- (void)webView:(WKWebView *)webView requestStorageAccessPanelForTopPrivatelyControlledDomain:(NSString *)topPrivatelyControlledDomain underFirstPartyTopPrivatelyControlledDomain:(NSString *)topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided completionHandler:(void (^)(BOOL result))completionHandler; >+ > #if TARGET_OS_IPHONE > > /*! @abstract Allows your app to determine whether or not the given element should show a preview. >diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.h b/Source/WebKit/UIProcess/Cocoa/UIDelegate.h >index 4251b7a58e787678ff8f4dca3695e477d4465348..87296d1503aec1cf3b4855e0471205c18c537a66 100644 >--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.h >+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.h >@@ -88,6 +88,7 @@ private: > 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& topPrivatelyControlledDomainRequestingAccess, const WTF::String& topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided, Function<void(bool)>&& completionHandler) 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 @@ private: > bool webViewRunJavaScriptAlertPanelWithMessageInitiatedByFrameCompletionHandler : 1; > bool webViewRunJavaScriptConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1; > bool webViewRunJavaScriptTextInputPanelWithPromptDefaultTextInitiatedByFrameCompletionHandler : 1; >+ bool webViewRequestStorageAccessPanelForTopPrivatelyControlledDomainUnderFirstPartyTopPrivatelyControlledDomainCompletionHandler : 1; > bool webViewRunBeforeUnloadConfirmPanelWithMessageInitiatedByFrameCompletionHandler : 1; > bool webViewRequestGeolocationPermissionForFrameDecisionHandler : 1; > bool webViewDidResignInputElementStrongPasswordAppearanceWithUserInfo : 1; >diff --git a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm >index b605233ef666a26ce503e8f9894e4c55b9092ed1..7c57bc45a5d3f2e539f71ecda4b705d6b92aa5ac 100644 >--- a/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm >+++ b/Source/WebKit/UIProcess/Cocoa/UIDelegate.mm >@@ -102,6 +102,7 @@ void UIDelegate::setDelegate(id <WKUIDelegate> delegate) > 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:requestStorageAccessPanelForTopPrivatelyControlledDomain:underFirstPartyTopPrivatelyControlledDomain: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,31 @@ void UIDelegate::UIClient::runJavaScriptPrompt(WebPageProxy*, const WTF::String& > }).get()]; > } > >+void UIDelegate::UIClient::requestStorageAccessConfirm(WebPageProxy*, WebFrameProxy* webFrameProxy, const WTF::String& topPrivatelyControlledDomainRequestingStorageAccess, const WTF::String& topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided, Function<void(bool)>&& completionHandler) >+{ >+ WTFLogAlways("ResourceLoadLog | UIClient::requestStorageAccessConfirm() 1."); >+ if (!m_uiDelegate.m_delegateMethods.webViewRequestStorageAccessPanelForTopPrivatelyControlledDomainUnderFirstPartyTopPrivatelyControlledDomainCompletionHandler) { >+ completionHandler(false); >+ return; >+ } >+ >+ WTFLogAlways("ResourceLoadLog | UIClient::requestStorageAccessConfirm() 2."); >+ auto delegate = m_uiDelegate.m_delegate.get(); >+ if (!delegate) { >+ completionHandler(false); >+ return; >+ } >+ >+ WTFLogAlways("ResourceLoadLog | UIClient::requestStorageAccessConfirm() 3."); >+ RefPtr<CompletionHandlerCallChecker> checker = CompletionHandlerCallChecker::create(delegate.get(), @selector(webView:requestStorageAccessPanelForTopPrivatelyControlledDomain:underFirstPartyTopPrivatelyControlledDomain:completionHandler:)); >+ [delegate webView:m_uiDelegate.m_webView requestStorageAccessPanelForTopPrivatelyControlledDomain:topPrivatelyControlledDomainRequestingStorageAccess underFirstPartyTopPrivatelyControlledDomain:topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided 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) >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index efe7620e0fdadc4d673e33992fe152f99a0a138a..4c03e916cc56bc11049eaeea131df445d5444b68 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -138,6 +138,7 @@ > #include <WebCore/PerformanceLoggingClient.h> > #include <WebCore/PublicSuffix.h> > #include <WebCore/RenderEmbeddedObject.h> >+#include <WebCore/RuntimeEnabledFeatures.h> > #include <WebCore/SSLKeyGenerator.h> > #include <WebCore/SerializedCryptoKeyWrap.h> > #include <WebCore/SharedBuffer.h> >@@ -3284,6 +3285,8 @@ void WebPageProxy::preferencesDidChange() > > m_pageClient.preferencesDidChange(); > >+ WebCore::RuntimeEnabledFeatures::sharedFeatures().setStorageAccessPromptsEnabled(m_preferences->storageAccessPromptsEnabled()); >+ > // FIXME: It probably makes more sense to send individual preference changes. > // However, WebKitTestRunner depends on getting a preference change notification > // even if nothing changed in UI process, so that overrides get removed. >@@ -4270,6 +4273,30 @@ void WebPageProxy::runJavaScriptPrompt(uint64_t frameID, const SecurityOriginDat > }); > } > >+void WebPageProxy::requestStorageAccessConfirm(uint64_t frameID, const String& topPrivatelyControlledDomainRequestingAccess, const String& topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided, Ref<Messages::WebPageProxy::RequestStorageAccessConfirm::DelayedReply>&& reply) >+{ >+ if (!RuntimeEnabledFeatures::sharedFeatures().storageAccessPromptsEnabled()) { >+ reply->send(true); >+ return; >+ } >+ >+ WebFrameProxy* frame = m_process->webFrame(frameID); >+ MESSAGE_CHECK(frame); >+ >+ // Since runJavaScriptConfirm() can spin a nested run loop we need to turn off the responsiveness timer. >+ m_process->responsivenessTimer().stop(); >+ >+ if (m_controlledByAutomation) { >+ if (auto* automationSession = process().processPool().automationSession()) >+ automationSession->willShowJavaScriptDialog(*this); >+ } >+ >+ WTFLogAlways("ResourceLoadLog | WebPageProxy::requestStorageAccessConfirm()."); >+ m_uiClient->requestStorageAccessConfirm(this, frame, topPrivatelyControlledDomainRequestingAccess, topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided, [reply = WTFMove(reply)](bool result) { >+ reply->send(result); >+ }); >+} >+ > void WebPageProxy::setStatusText(const String& text) > { > m_uiClient->setStatusText(this, text); >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index 9d1355d0cd7c9daebbb837176d747f3df57ebaed..b54f8446affe5a310f836c53ee16743f296b742c 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -1402,6 +1402,7 @@ private: > void runJavaScriptAlert(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, Ref<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>&&); > void runJavaScriptConfirm(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, Ref<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>&&); > void runJavaScriptPrompt(uint64_t frameID, const WebCore::SecurityOriginData&, const String&, const String&, Ref<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>&&); >+ void requestStorageAccessConfirm(uint64_t frameID, const String& topPrivatelyControlledDomainRequestingAccess, const String& topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided, Ref<Messages::WebPageProxy::RequestStorageAccessConfirm::DelayedReply>&&); > void setStatusText(const String&); > void mouseDidMoveOverElement(WebHitTestResultData&&, uint32_t modifiers, UserData&&); > >diff --git a/Source/WebKit/UIProcess/WebPageProxy.messages.in b/Source/WebKit/UIProcess/WebPageProxy.messages.in >index ac7aa760557497d4b6ff298ce8d4d49d4ee8c995..01de90b0d2cb5281befb7bd1887db42040c90b8d 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.messages.in >+++ b/Source/WebKit/UIProcess/WebPageProxy.messages.in >@@ -28,6 +28,7 @@ messages -> WebPageProxy { > RunJavaScriptAlert(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message) -> () Delayed > RunJavaScriptConfirm(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message) -> (bool result) Delayed > RunJavaScriptPrompt(uint64_t frameID, struct WebCore::SecurityOriginData frameSecurityOrigin, String message, String defaultValue) -> (String result) Delayed >+ RequestStorageAccessConfirm(uint64_t frameID, String topPrivatelyControlledDomainRequestingAccess, String topPrivatelyControlledDomainUnderWhichStorageAccessWillBeProvided) -> (bool result) Delayed > MouseDidMoveOverElement(struct WebKit::WebHitTestResultData hitTestResultData, uint32_t modifiers, WebKit::UserData userData) > > #if ENABLE(NETSCAPE_PLUGIN_API) >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >index 0a3ea5f8dd9879109eae6165a726437586d5ffce..9eba030df378e854ee5ed74762d05f6624abd704 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >@@ -1291,6 +1291,13 @@ void WebChromeClient::hasStorageAccess(String&& subFrameHost, String&& topFrameH > > void WebChromeClient::requestStorageAccess(String&& subFrameHost, String&& topFrameHost, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void (bool)>&& callback) > { >+ bool result = false; >+ if (!WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::RequestStorageAccessConfirm(frameID, subFrameHost, topFrameHost), Messages::WebPageProxy::RequestStorageAccessConfirm::Reply(result), pageID, Seconds::infinity(), IPC::SendSyncOption::InformPlatformProcessWillSuspend) || !result) { >+ callback(false); >+ return; >+ } >+ >+ WTFLogAlways("ResourceLoadLog | The user granted storage access to %s on page from %s.", subFrameHost.utf8().data(), topFrameHost.utf8().data()); > m_page.requestStorageAccess(WTFMove(subFrameHost), WTFMove(topFrameHost), frameID, pageID, WTFMove(callback)); > } > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185335
:
339616
|
339651
|
339652
|
339655
|
339659
|
339693
|
339697
|
339700
|
339735
|
339742
|
339745
|
339755
|
339766