Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
WK2: Add ability to pass context to policy delegate methods
https://bugs.webkit.org/show_bug.cgi?id=54031 Reviewed by Anders Carlsson. Source/WebKit2: * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): (CoreIPC::handleMessageVariadic): * Scripts/webkit2/messages.py: Add ability to pass variadic messages to sync messages. * Shared/API/c/WKBase.h: * Shared/APIObject.h: Add WKBundleNavigation type. * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::decidePolicyForNavigationAction): (WebKit::WebPageProxy::decidePolicyForNewWindowAction): (WebKit::WebPageProxy::decidePolicyForMIMEType): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebPolicyClient.cpp: (WebKit::WebPolicyClient::decidePolicyForNavigationAction): (WebKit::WebPolicyClient::decidePolicyForNewWindowAction): (WebKit::WebPolicyClient::decidePolicyForMIMEType): * UIProcess/WebPolicyClient.h: Update policy client for new data. * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.cpp: Added. (WKBundleNavigationActionGetTypeID): (WKBundleNavigationActionGetNavigationType): (WKBundleNavigationActionGetEventModifiers): (WKBundleNavigationActionGetEventMouseButton): (WKBundleNavigationActionCopyHitTestResult): (WKBundleNavigationActionCopyFormElement): * WebProcess/InjectedBundle/API/c/WKBundleNavigationAction.h: Added. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetPolicyClient): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: Added. (WebKit::mouseEventForNavigationAction): (WebKit::mouseButtonForMouseEvent): (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction): (WebKit::InjectedBundleNavigationAction::mouseButtonForNavigationAction): (WebKit::InjectedBundleNavigationAction::create): (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: Added. (WebKit::InjectedBundleNavigationAction::navigationType): (WebKit::InjectedBundleNavigationAction::modifiers): (WebKit::InjectedBundleNavigationAction::mouseButton): (WebKit::InjectedBundleNavigationAction::hitTestResult): (WebKit::InjectedBundleNavigationAction::formElement): (WebKit::InjectedBundleNavigationAction::type): * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp: Added. (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction): (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction): (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType): * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: Added. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::createWindow): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::initializeInjectedBundlePolicyClient): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::injectedBundlePolicyClient): Pipe the policy client through the bundle to allow setting user data. * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: * win/WebKit2Generated.make: Add new files. Tools: * MiniBrowser/mac/BrowserWindowController.m: (decidePolicyForNavigationAction): (decidePolicyForNewWindowAction): (decidePolicyForMIMEType): * TestWebKitAPI/Tests/WebKit2/PageLoadBasic.cpp: (TestWebKitAPI::decidePolicyForNavigationAction): (TestWebKitAPI::decidePolicyForNewWindowAction): (TestWebKitAPI::decidePolicyForMIMEType): Update policy client for new API. Canonical link: https://commits.webkit.org/68033@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@77974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
32 changed files
with
746 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.