Update JavaScript dialog delegates to include a WKSecurityOriginRef argument.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2015 16:57:30 +0000 (16:57 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jun 2015 16:57:30 +0000 (16:57 +0000)
commita1b1093656723c3fee8a9dc4089852202371c108
treefc50c0007fb211d43db05a6d48a73cd3fe2c5712
parent80cbbdc2a7768e4476302283f69b573bca76ec12
Update JavaScript dialog delegates to include a WKSecurityOriginRef argument.
<rdar://problem/21269187> and https://bugs.webkit.org/show_bug.cgi?id=146249

Reviewed by Alex Christensen.

Source/WebKit2:

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Call the new signature if the client has it set.
  Otherwise fall back to the old signature.
* UIProcess/API/C/WKPageUIClient.h: Deprecate the old method signature, and add the new
  one to the newest V5 client structure.

Tools:

- Update WKTR to the new client structure.
- Update existing TestWebKitAPI tests to either use the new client structure or
  assign the old function signature to the updated variable name.
- Include a new test.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

* TestWebKitAPI/Tests/WebKit2/CloseFromWithinCreatePage.cpp:
(TestWebKitAPI::runJavaScriptAlert):

* TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp:
(TestWebKitAPI::TEST):

* TestWebKitAPI/Tests/WebKit2/ModalAlertsSPI.cpp:
(TestWebKitAPI::analyzeDialogArguments):
(TestWebKitAPI::runJavaScriptAlert):
(TestWebKitAPI::runJavaScriptConfirm):
(TestWebKitAPI::runJavaScriptPrompt):
(TestWebKitAPI::createNewPage):
(TestWebKitAPI::TEST):

* TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm:
(TestWebKitAPI::FullscreenZoomInitialFrame::initializeView):

* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::initializeView):

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPageUIClient.h
Source/WebKit2/UIProcess/efl/PageUIClientEfl.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit2/CloseFromWithinCreatePage.cpp
Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp
Tools/TestWebKitAPI/Tests/WebKit2/ModalAlertsSPI.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm
Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm
Tools/WebKitTestRunner/TestController.cpp