Diff
Modified: branches/safari-600.8-branch/Source/WebKit2/ChangeLog (187175 => 187176)
--- branches/safari-600.8-branch/Source/WebKit2/ChangeLog 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Source/WebKit2/ChangeLog 2015-07-22 20:36:53 UTC (rev 187176)
@@ -1,3 +1,20 @@
+2015-07-21 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r185915. rdar://problem/21716368
+
+ 2015-06-24 Brady Eidson <beid...@apple.com>
+
+ 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.
+
+ * 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.
+
2015-07-21 Lucas Forschler <lforsch...@apple.com>
Merge r186812
Modified: branches/safari-600.8-branch/Source/WebKit2/Shared/API/c/WKSharedAPICast.h (187175 => 187176)
--- branches/safari-600.8-branch/Source/WebKit2/Shared/API/c/WKSharedAPICast.h 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Source/WebKit2/Shared/API/c/WKSharedAPICast.h 2015-07-22 20:36:53 UTC (rev 187176)
@@ -44,6 +44,7 @@
#include "WKPageLoadTypes.h"
#include "WKPageLoadTypesPrivate.h"
#include "WKPageVisibilityTypes.h"
+#include "WKSecurityOrigin.h"
#include "WKUserContentInjectedFrames.h"
#include "WKUserScriptInjectionTime.h"
#include "WebEvent.h"
Modified: branches/safari-600.8-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp (187175 => 187176)
--- branches/safari-600.8-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2015-07-22 20:36:53 UTC (rev 187176)
@@ -41,6 +41,7 @@
#include "NavigationActionData.h"
#include "PluginInformation.h"
#include "PrintInfo.h"
+#include "SecurityOriginData.h"
#include "WKAPICast.h"
#include "WKPagePolicyClientInternal.h"
#include "WKPluginInformation.h"
@@ -74,7 +75,7 @@
};
template<> struct ClientTraits<WKPageUIClientBase> {
- typedef std::tuple<WKPageUIClientV0, WKPageUIClientV1, WKPageUIClientV2, WKPageUIClientV3> Versions;
+ typedef std::tuple<WKPageUIClientV0, WKPageUIClientV1, WKPageUIClientV2, WKPageUIClientV3, WKPageUIClientV4> Versions;
};
}
@@ -1254,34 +1255,51 @@
virtual void runJavaScriptAlert(WebPageProxy* page, const String& message, WebFrameProxy* frame, const WebKit::SecurityOriginData& securityOriginData, std::function<void ()> completionHandler) override
{
- if (!m_client.runJavaScriptAlert) {
+ if (!m_client.runJavaScriptAlert && !m_client.runJavaScriptAlert_deprecatedForUseWithV0) {
completionHandler();
return;
}
- m_client.runJavaScriptAlert(toAPI(page), toAPI(message.impl()), toAPI(frame), m_client.base.clientInfo);
+ if (m_client.runJavaScriptAlert) {
+ RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::create(securityOriginData.protocol, securityOriginData.host, securityOriginData.port);
+ m_client.runJavaScriptAlert(toAPI(page), toAPI(message.impl()), toAPI(frame), toAPI(securityOrigin.get()), m_client.base.clientInfo);
+ } else
+ m_client.runJavaScriptAlert_deprecatedForUseWithV0(toAPI(page), toAPI(message.impl()), toAPI(frame), m_client.base.clientInfo);
+
completionHandler();
}
virtual void runJavaScriptConfirm(WebPageProxy* page, const String& message, WebFrameProxy* frame, const WebKit::SecurityOriginData& securityOriginData, std::function<void (bool)> completionHandler) override
{
- if (!m_client.runJavaScriptConfirm) {
+ if (!m_client.runJavaScriptConfirm && !m_client.runJavaScriptConfirm_deprecatedForUseWithV0) {
completionHandler(false);
return;
}
- bool result = m_client.runJavaScriptConfirm(toAPI(page), toAPI(message.impl()), toAPI(frame), m_client.base.clientInfo);
+ bool result;
+ if (m_client.runJavaScriptConfirm) {
+ RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::create(securityOriginData.protocol, securityOriginData.host, securityOriginData.port);
+ result = m_client.runJavaScriptConfirm(toAPI(page), toAPI(message.impl()), toAPI(frame), toAPI(securityOrigin.get()), m_client.base.clientInfo);
+ } else
+ result = m_client.runJavaScriptConfirm_deprecatedForUseWithV0(toAPI(page), toAPI(message.impl()), toAPI(frame), m_client.base.clientInfo);
+
completionHandler(result);
}
virtual void runJavaScriptPrompt(WebPageProxy* page, const String& message, const String& defaultValue, WebFrameProxy* frame, const WebKit::SecurityOriginData& securityOriginData, std::function<void (const String&)> completionHandler) override
{
- if (!m_client.runJavaScriptPrompt) {
+ if (!m_client.runJavaScriptPrompt && !m_client.runJavaScriptPrompt_deprecatedForUseWithV0) {
completionHandler(String());
return;
}
- RefPtr<API::String> string = adoptRef(toImpl(m_client.runJavaScriptPrompt(toAPI(page), toAPI(message.impl()), toAPI(defaultValue.impl()), toAPI(frame), m_client.base.clientInfo)));
+ RefPtr<API::String> string;
+ if (m_client.runJavaScriptPrompt) {
+ RefPtr<WebSecurityOrigin> securityOrigin = WebSecurityOrigin::create(securityOriginData.protocol, securityOriginData.host, securityOriginData.port);
+ string = adoptRef(toImpl(m_client.runJavaScriptPrompt(toAPI(page), toAPI(message.impl()), toAPI(defaultValue.impl()), toAPI(frame), toAPI(securityOrigin.get()), m_client.base.clientInfo)));
+ } else
+ string = adoptRef(toImpl(m_client.runJavaScriptPrompt_deprecatedForUseWithV0(toAPI(page), toAPI(message.impl()), toAPI(defaultValue.impl()), toAPI(frame), m_client.base.clientInfo)));
+
if (!string) {
completionHandler(String());
return;
Modified: branches/safari-600.8-branch/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h (187175 => 187176)
--- branches/safari-600.8-branch/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Source/WebKit2/UIProcess/API/C/WKPageUIClient.h 2015-07-22 20:36:53 UTC (rev 187176)
@@ -50,9 +50,9 @@
typedef void (*WKPageUIClientCallback)(WKPageRef page, const void* clientInfo);
typedef WKPageRef (*WKPageCreateNewPageCallback)(WKPageRef page, WKURLRequestRef urlRequest, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
-typedef void (*WKPageRunJavaScriptAlertCallback)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void *clientInfo);
-typedef bool (*WKPageRunJavaScriptConfirmCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo);
-typedef WKStringRef (*WKPageRunJavaScriptPromptCallback)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, const void *clientInfo);
+typedef void (*WKPageRunJavaScriptAlertCallback)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, WKSecurityOriginRef securityOrigin, const void *clientInfo);
+typedef bool (*WKPageRunJavaScriptConfirmCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, WKSecurityOriginRef securityOrigin, const void *clientInfo);
+typedef WKStringRef (*WKPageRunJavaScriptPromptCallback)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, WKSecurityOriginRef securityOrigin, 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);
@@ -92,6 +92,9 @@
typedef void (*WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0)(WKPageRef page, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo);
typedef void (*WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, WKStringRef url, WKStringRef pluginsPageURL, const void* clientInfo);
typedef void (*WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1)(WKPageRef page, WKPluginUnavailabilityReason pluginUnavailabilityReason, WKStringRef mimeType, WKStringRef url, WKStringRef pluginsPageURL, const void* clientInfo);
+typedef void (*WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void *clientInfo);
+typedef bool (*WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo);
+typedef WKStringRef (*WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, const void *clientInfo);
typedef struct WKPageUIClientBase {
int version;
@@ -108,9 +111,9 @@
WKPageTakeFocusCallback takeFocus;
WKPageFocusCallback focus;
WKPageUnfocusCallback unfocus;
- WKPageRunJavaScriptAlertCallback runJavaScriptAlert;
- WKPageRunJavaScriptConfirmCallback runJavaScriptConfirm;
- WKPageRunJavaScriptPromptCallback runJavaScriptPrompt;
+ WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0 runJavaScriptAlert_deprecatedForUseWithV0;
+ WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0 runJavaScriptConfirm_deprecatedForUseWithV0;
+ WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0 runJavaScriptPrompt_deprecatedForUseWithV0;
WKPageSetStatusTextCallback setStatusText;
WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0 mouseDidMoveOverElement_deprecatedForUseWithV0;
WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0 missingPluginButtonClicked_deprecatedForUseWithV0;
@@ -153,9 +156,9 @@
WKPageTakeFocusCallback takeFocus;
WKPageFocusCallback focus;
WKPageUnfocusCallback unfocus;
- WKPageRunJavaScriptAlertCallback runJavaScriptAlert;
- WKPageRunJavaScriptConfirmCallback runJavaScriptConfirm;
- WKPageRunJavaScriptPromptCallback runJavaScriptPrompt;
+ WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0 runJavaScriptAlert_deprecatedForUseWithV0;
+ WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0 runJavaScriptConfirm_deprecatedForUseWithV0;
+ WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0 runJavaScriptPrompt_deprecatedForUseWithV0;
WKPageSetStatusTextCallback setStatusText;
WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0 mouseDidMoveOverElement_deprecatedForUseWithV0;
WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0 missingPluginButtonClicked_deprecatedForUseWithV0;
@@ -204,9 +207,9 @@
WKPageTakeFocusCallback takeFocus;
WKPageFocusCallback focus;
WKPageUnfocusCallback unfocus;
- WKPageRunJavaScriptAlertCallback runJavaScriptAlert;
- WKPageRunJavaScriptConfirmCallback runJavaScriptConfirm;
- WKPageRunJavaScriptPromptCallback runJavaScriptPrompt;
+ WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0 runJavaScriptAlert_deprecatedForUseWithV0;
+ WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0 runJavaScriptConfirm_deprecatedForUseWithV0;
+ WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0 runJavaScriptPrompt_deprecatedForUseWithV0;
WKPageSetStatusTextCallback setStatusText;
WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0 mouseDidMoveOverElement_deprecatedForUseWithV0;
WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0 missingPluginButtonClicked_deprecatedForUseWithV0;
@@ -260,9 +263,9 @@
WKPageTakeFocusCallback takeFocus;
WKPageFocusCallback focus;
WKPageUnfocusCallback unfocus;
- WKPageRunJavaScriptAlertCallback runJavaScriptAlert;
- WKPageRunJavaScriptConfirmCallback runJavaScriptConfirm;
- WKPageRunJavaScriptPromptCallback runJavaScriptPrompt;
+ WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0 runJavaScriptAlert_deprecatedForUseWithV0;
+ WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0 runJavaScriptConfirm_deprecatedForUseWithV0;
+ WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0 runJavaScriptPrompt_deprecatedForUseWithV0;
WKPageSetStatusTextCallback setStatusText;
WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0 mouseDidMoveOverElement_deprecatedForUseWithV0;
WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0 missingPluginButtonClicked_deprecatedForUseWithV0;
@@ -309,6 +312,72 @@
WKPagePinnedStateDidChangeCallback pinnedStateDidChange;
} WKPageUIClientV3;
+typedef struct WKPageUIClientV4 {
+ 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 runBeforeUnloadConfirmPanel;
+ 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;
+ WKPageShouldInterruptJavaScriptCallback shouldInterruptJavaScript;
+
+ // Version 1.
+ WKPageCreateNewPageCallback createNewPage;
+ WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement;
+ WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
+ WKPageUnavailablePluginButtonClickedCallback_deprecatedForUseWithV1 unavailablePluginButtonClicked_deprecatedForUseWithV1;
+
+ // Version 2.
+ WKPageShowColorPickerCallback showColorPicker;
+ WKPageHideColorPickerCallback hideColorPicker;
+ WKPageUnavailablePluginButtonClickedCallback unavailablePluginButtonClicked;
+
+ // Version 3.
+ WKPagePinnedStateDidChangeCallback pinnedStateDidChange;
+
+ // Version 4.
+ WKPageRunJavaScriptAlertCallback runJavaScriptAlert;
+ WKPageRunJavaScriptConfirmCallback runJavaScriptConfirm;
+ WKPageRunJavaScriptPromptCallback runJavaScriptPrompt;
+
+} WKPageUIClientV4;
+
+
enum { kWKPageUIClientCurrentVersion WK_ENUM_DEPRECATED("Use an explicit version number instead") = 2 };
typedef struct WKPageUIClient {
int version;
@@ -321,9 +390,9 @@
WKPageTakeFocusCallback takeFocus;
WKPageFocusCallback focus;
WKPageUnfocusCallback unfocus;
- WKPageRunJavaScriptAlertCallback runJavaScriptAlert;
- WKPageRunJavaScriptConfirmCallback runJavaScriptConfirm;
- WKPageRunJavaScriptPromptCallback runJavaScriptPrompt;
+ WKPageRunJavaScriptAlertCallback_deprecatedForUseWithV0 runJavaScriptAlert_deprecatedForUseWithV0;
+ WKPageRunJavaScriptConfirmCallback_deprecatedForUseWithV0 runJavaScriptConfirm_deprecatedForUseWithV0;
+ WKPageRunJavaScriptPromptCallback_deprecatedForUseWithV0 runJavaScriptPrompt_deprecatedForUseWithV0;
WKPageSetStatusTextCallback setStatusText;
WKPageMouseDidMoveOverElementCallback_deprecatedForUseWithV0 mouseDidMoveOverElement_deprecatedForUseWithV0;
WKPageMissingPluginButtonClickedCallback_deprecatedForUseWithV0 missingPluginButtonClicked_deprecatedForUseWithV0;
Modified: branches/safari-600.8-branch/Source/WebKit2/UIProcess/efl/PageUIClientEfl.cpp (187175 => 187176)
--- branches/safari-600.8-branch/Source/WebKit2/UIProcess/efl/PageUIClientEfl.cpp 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Source/WebKit2/UIProcess/efl/PageUIClientEfl.cpp 2015-07-22 20:36:53 UTC (rev 187176)
@@ -60,9 +60,9 @@
uiClient.takeFocus = takeFocus;
uiClient.focus = focus;
uiClient.unfocus = unfocus;
- uiClient.runJavaScriptAlert = runJavaScriptAlert;
- uiClient.runJavaScriptConfirm = runJavaScriptConfirm;
- uiClient.runJavaScriptPrompt = runJavaScriptPrompt;
+ uiClient.runJavaScriptAlert_deprecatedForUseWithV0 = runJavaScriptAlert;
+ uiClient.runJavaScriptConfirm_deprecatedForUseWithV0 = runJavaScriptConfirm;
+ uiClient.runJavaScriptPrompt_deprecatedForUseWithV0 = runJavaScriptPrompt;
uiClient.toolbarsAreVisible = toolbarsAreVisible;
uiClient.setToolbarsAreVisible = setToolbarsAreVisible;
uiClient.menuBarIsVisible = menuBarIsVisible;
Modified: branches/safari-600.8-branch/Tools/ChangeLog (187175 => 187176)
--- branches/safari-600.8-branch/Tools/ChangeLog 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Tools/ChangeLog 2015-07-22 20:36:53 UTC (rev 187176)
@@ -1,3 +1,45 @@
+2015-07-21 Matthew Hanson <matthew_han...@apple.com>
+
+ Merge r185915. rdar://problem/21716368
+
+ 2015-06-24 Brady Eidson <beid...@apple.com>
+
+ 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.
+
+ - 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):
+
2015-07-15 Matthew Hanson <matthew_han...@apple.com>
Merge r186763. rdar://problem/21707917
Modified: branches/safari-600.8-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (187175 => 187176)
--- branches/safari-600.8-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2015-07-22 20:36:53 UTC (rev 187176)
@@ -101,6 +101,7 @@
5142B2731517C8C800C32B19 /* ContextMenuCanCopyURL.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 5142B2721517C89100C32B19 /* ContextMenuCanCopyURL.html */; };
517E7DFC15110EA600D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 517E7DFB15110EA600D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.mm */; };
517E7E04151119C100D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 517E7E031511187500D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.html */; };
+ 51CB4AD81B3A079C00C1B1C6 /* ModalAlertsSPI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51CB4AD71B3A079C00C1B1C6 /* ModalAlertsSPI.cpp */; };
51E5C7021919C3B200D8B3E1 /* simple2.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 51E780361919AFF8001829A2 /* simple2.html */; };
51E5C7031919C3B200D8B3E1 /* simple3.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 51E780371919AFF8001829A2 /* simple3.html */; };
51E5C7051919EA5F00D8B3E1 /* ShouldKeepCurrentBackForwardListItemInList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E5C7041919EA5F00D8B3E1 /* ShouldKeepCurrentBackForwardListItemInList.cpp */; };
@@ -445,6 +446,7 @@
5142B2721517C89100C32B19 /* ContextMenuCanCopyURL.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = ContextMenuCanCopyURL.html; sourceTree = "<group>"; };
517E7DFB15110EA600D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MemoryCachePruneWithinResourceLoadDelegate.mm; sourceTree = "<group>"; };
517E7E031511187500D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = MemoryCachePruneWithinResourceLoadDelegate.html; sourceTree = "<group>"; };
+ 51CB4AD71B3A079C00C1B1C6 /* ModalAlertsSPI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModalAlertsSPI.cpp; sourceTree = "<group>"; };
51E5C7041919EA5F00D8B3E1 /* ShouldKeepCurrentBackForwardListItemInList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShouldKeepCurrentBackForwardListItemInList.cpp; sourceTree = "<group>"; };
51E780361919AFF8001829A2 /* simple2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = simple2.html; sourceTree = "<group>"; };
51E780371919AFF8001829A2 /* simple3.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = simple3.html; sourceTree = "<group>"; };
@@ -846,6 +848,7 @@
33DC8910141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp */,
33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */,
8AA28C1916D2FA7B002FF4DB /* LoadPageOnCrash.cpp */,
+ 51CB4AD71B3A079C00C1B1C6 /* ModalAlertsSPI.cpp */,
33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */,
33BE5AF8137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp */,
93F1DB3014DA20760024C362 /* NewFirstVisuallyNonEmptyLayout.cpp */,
@@ -1380,6 +1383,7 @@
265AF55015D1E48A00B0CB4A /* WTFString.cpp in Sources */,
2E7765CD16C4D80A00BA2BB1 /* mainIOS.mm in Sources */,
2E7765CF16C4D81100BA2BB1 /* mainMac.mm in Sources */,
+ 51CB4AD81B3A079C00C1B1C6 /* ModalAlertsSPI.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: branches/safari-600.8-branch/Tools/TestWebKitAPI/Tests/WebKit2/CloseFromWithinCreatePage.cpp (187175 => 187176)
--- branches/safari-600.8-branch/Tools/TestWebKitAPI/Tests/WebKit2/CloseFromWithinCreatePage.cpp 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Tools/TestWebKitAPI/Tests/WebKit2/CloseFromWithinCreatePage.cpp 2015-07-22 20:36:53 UTC (rev 187176)
@@ -32,7 +32,7 @@
static bool testDone;
static std::unique_ptr<PlatformWebView> openedWebView;
-static void runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
+static void runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, WKSecurityOriginRef, const void* clientInfo)
{
// FIXME: Check that the alert text matches the storage.
testDone = true;
@@ -44,10 +44,10 @@
openedWebView = std::make_unique<PlatformWebView>(page);
- WKPageUIClientV1 uiClient;
+ WKPageUIClientV4 uiClient;
memset(&uiClient, 0, sizeof(uiClient));
- uiClient.base.version = 5;
+ uiClient.base.version = 4;
uiClient.runJavaScriptAlert = runJavaScriptAlert;
WKPageSetPageUIClient(openedWebView->page(), &uiClient.base);
@@ -63,10 +63,10 @@
PlatformWebView webView(context.get());
- WKPageUIClientV1 uiClient;
+ WKPageUIClientV4 uiClient;
memset(&uiClient, 0, sizeof(uiClient));
- uiClient.base.version = 5;
+ uiClient.base.version = 4;
uiClient.createNewPage = createNewPage;
uiClient.runJavaScriptAlert = runJavaScriptAlert;
WKPageSetPageUIClient(webView.page(), &uiClient.base);
Modified: branches/safari-600.8-branch/Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp (187175 => 187176)
--- branches/safari-600.8-branch/Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Tools/TestWebKitAPI/Tests/WebKit2/DocumentStartUserScriptAlertCrash.cpp 2015-07-22 20:36:53 UTC (rev 187176)
@@ -33,7 +33,7 @@
static bool done;
-static void runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
+static void runJavaScriptAlert_deprecatedForUseWithV0(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
{
ASSERT_NOT_NULL(frame);
@@ -54,7 +54,7 @@
memset(&uiClient, 0, sizeof(uiClient));
uiClient.base.version = 0;
- uiClient.runJavaScriptAlert = runJavaScriptAlert;
+ uiClient.runJavaScriptAlert_deprecatedForUseWithV0 = runJavaScriptAlert_deprecatedForUseWithV0;
WKPageSetPageUIClient(webView.page(), &uiClient.base);
Modified: branches/safari-600.8-branch/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm (187175 => 187176)
--- branches/safari-600.8-branch/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm 2015-07-22 20:36:53 UTC (rev 187176)
@@ -55,7 +55,7 @@
// WebKit2 WKPageUIClient
-static void runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
+static void runJavaScriptAlert_deprecatedForUseWithV0(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
{
EXPECT_TRUE(isWaitingForPageSignalToContinue);
isWaitingForPageSignalToContinue = false;
@@ -102,7 +102,7 @@
memset(&uiClient, 0, sizeof(uiClient));
uiClient.base.version = 0;
- uiClient.runJavaScriptAlert = runJavaScriptAlert;
+ uiClient.runJavaScriptAlert_deprecatedForUseWithV0 = runJavaScriptAlert_deprecatedForUseWithV0;
WKPageSetPageUIClient(wkView.pageRef, &uiClient.base);
}
Modified: branches/safari-600.8-branch/Tools/WebKitTestRunner/TestController.cpp (187175 => 187176)
--- branches/safari-600.8-branch/Tools/WebKitTestRunner/TestController.cpp 2015-07-22 20:31:07 UTC (rev 187175)
+++ branches/safari-600.8-branch/Tools/WebKitTestRunner/TestController.cpp 2015-07-22 20:36:53 UTC (rev 187176)
@@ -220,9 +220,9 @@
0, // takeFocus
focus,
unfocus,
- 0, // runJavaScriptAlert
- 0, // runJavaScriptConfirm
- 0, // runJavaScriptPrompt
+ 0, // runJavaScriptAlert_deprecatedForUseWithV0
+ 0, // runJavaScriptAlert_deprecatedForUseWithV0
+ 0, // runJavaScriptAlert_deprecatedForUseWithV0
0, // setStatusText
0, // mouseDidMoveOverElement_deprecatedForUseWithV0
0, // missingPluginButtonClicked
@@ -426,9 +426,9 @@
0, // takeFocus
focus,
unfocus,
- 0, // runJavaScriptAlert
- 0, // runJavaScriptConfirm
- 0, // runJavaScriptPrompt
+ 0, // runJavaScriptAlert_deprecatedForUseWithV0
+ 0, // runJavaScriptAlert_deprecatedForUseWithV0
+ 0, // runJavaScriptAlert_deprecatedForUseWithV0
0, // setStatusText
0, // mouseDidMoveOverElement_deprecatedForUseWithV0
0, // missingPluginButtonClicked