Skip to content

Commit 42da540

Browse files
author
Sam Weinig
committed
WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages Reviewed by Anders Carlsson. WebKit2: - Convert injected bundle UIClient functions to will-style, at least until we establish more concrete use cases for them past the TestRunner. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::willAddMessageToConsole): (WebKit::InjectedBundlePageUIClient::willSetStatusbarText): (WebKit::InjectedBundlePageUIClient::willRunJavaScriptAlert): (WebKit::InjectedBundlePageUIClient::willRunJavaScriptConfirm): (WebKit::InjectedBundlePageUIClient::willRunJavaScriptPrompt): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::addMessageToConsole): (WebKit::WebChromeClient::runJavaScriptAlert): (WebKit::WebChromeClient::runJavaScriptConfirm): (WebKit::WebChromeClient::runJavaScriptPrompt): (WebKit::WebChromeClient::setStatusbarText): WebKitTools: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::InjectedBundlePage): (WTR::InjectedBundlePage::_willAddMessageToConsole): (WTR::InjectedBundlePage::_willSetStatusbarText): (WTR::InjectedBundlePage::_willRunJavaScriptAlert): (WTR::InjectedBundlePage::_willRunJavaScriptConfirm): (WTR::InjectedBundlePage::_willRunJavaScriptPrompt): (WTR::InjectedBundlePage::willAddMessageToConsole): (WTR::InjectedBundlePage::willSetStatusbarText): (WTR::InjectedBundlePage::willRunJavaScriptAlert): (WTR::InjectedBundlePage::willRunJavaScriptConfirm): (WTR::InjectedBundlePage::willRunJavaScriptPrompt): * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: LayoutTests: * platform/mac-wk2/Skipped: Canonical link: https://commits.webkit.org/54687@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 6ceda08 commit 42da540

10 files changed

Lines changed: 228 additions & 126 deletions

File tree

LayoutTests/ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2010-07-21 Sam Weinig <sam@webkit.org>
2+
3+
Reviewed by Anders Carlsson.
4+
5+
Patch for https://bugs.webkit.org/show_bug.cgi?id=42539
6+
WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages
7+
8+
* platform/mac-wk2/Skipped:
9+
110
2010-07-21 Tony Chang <tony@chromium.org>
211

312
Not reviewed, updating chromium test expectations.

LayoutTests/platform/mac-wk2/Skipped

Lines changed: 45 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2008 Apple Inc. All rights reserved.
2+
# Copyright (C) 2010 Apple Inc. All rights reserved.
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions
@@ -718,16 +718,6 @@ platform/mac/editing/input/wrapped-line-char-rect.html
718718
# <https://bugs.webkit.org/show_bug.cgi?id=42194>
719719
compositing/iframes/layout-on-compositing-change.html
720720
editing/deleting/5390681-2.html
721-
http/tests/local/send-dragged-file.html
722-
http/tests/local/send-sliced-dragged-file.html
723-
http/tests/local/blob/send-data-blob.html
724-
http/tests/local/blob/send-sliced-data-blob.html
725-
http/tests/local/formdata/send-form-data-with-sliced-file.html
726-
http/tests/local/formdata/send-form-data.html
727-
http/tests/local/formdata/upload-events.html
728-
http/tests/misc/drag-over-iframe-invalid-source-crash.html
729-
http/tests/security/listener/xss-window-onclick-addEventListener.html
730-
http/tests/security/listener/xss-window-onclick-shortcut.html
731721
editing/deleting/5729680.html
732722
editing/deleting/forward-delete-key.html
733723
editing/input/option-page-up-down.html
@@ -746,6 +736,8 @@ editing/pasteboard/drag-drop-url-text.html
746736
editing/pasteboard/drag-image-in-about-blank-frame.html
747737
editing/pasteboard/drag-image-to-contenteditable-in-iframe.html
748738
editing/pasteboard/drop-inputtext-acquires-style.html
739+
editing/pasteboard/file-input-files-access.html
740+
editing/pasteboard/files-during-page-drags.html
749741
editing/pasteboard/get-data-text-plain-drop.html
750742
editing/selection/14971.html
751743
editing/selection/4895428-1.html
@@ -849,6 +841,7 @@ fast/events/drag-and-drop-dataTransfer-types-nocrash.html
849841
fast/events/drag-and-drop-fire-drag-dragover.html
850842
fast/events/drag-and-drop.html
851843
fast/events/drag-in-frames.html
844+
fast/events/drag-outside-window.html
852845
fast/events/drag-parent-node.html
853846
fast/events/drag-to-navigate.html
854847
fast/events/event-input-contentEditable.html
@@ -997,6 +990,7 @@ fast/forms/textfield-inside-anchor.html
997990
fast/forms/textfield-onchange-deletion.html
998991
fast/forms/textfield-outline.html
999992
fast/forms/textfield-to-password-on-focus.html
993+
fast/frames/frame-dead-region.html
1000994
fast/frames/frame-deep-nested-resize.html
1001995
fast/frames/hover-timer-crash.html
1002996
fast/frames/iframe-window-focus.html
@@ -1022,16 +1016,26 @@ fast/text/international/khmer-selection.html
10221016
fast/text/international/thai-offsetForPosition-inside-character.html
10231017
fast/text/offsetForPosition-cluster-at-zero.html
10241018
fast/text/reset-drag-on-mouse-down.html
1019+
http/tests/local/blob/send-data-blob.html
10251020
http/tests/local/blob/send-hybrid-blob.html
1021+
http/tests/local/blob/send-sliced-data-blob.html
10261022
http/tests/local/drag-over-remote-content.html
1023+
http/tests/local/formdata/send-form-data-with-sliced-file.html
1024+
http/tests/local/formdata/send-form-data.html
1025+
http/tests/local/formdata/upload-events.html
1026+
http/tests/local/send-dragged-file.html
1027+
http/tests/local/send-sliced-dragged-file.html
10271028
http/tests/misc/bubble-drag-events.html
1029+
http/tests/misc/drag-over-iframe-invalid-source-crash.html
10281030
http/tests/misc/isindex-with-no-form.html
10291031
http/tests/navigation/no-referrer-same-window.html
10301032
http/tests/navigation/no-referrer-subframe.html
10311033
http/tests/navigation/redirect-preserves-referrer.html
10321034
http/tests/security/clipboard/clipboard-file-access.html
10331035
http/tests/security/dataTransfer-set-data-file-url.html
10341036
http/tests/security/drag-over-remote-content-iframe.html
1037+
http/tests/security/listener/xss-window-onclick-addEventListener.html
1038+
http/tests/security/listener/xss-window-onclick-shortcut.html
10351039
media/media-fullscreen-inline.html
10361040
platform/mac/editing/deleting/backward-delete.html
10371041
platform/mac/editing/pasteboard/dataTransfer-set-data-file-url.html
@@ -1372,7 +1376,7 @@ plugins
13721376
http/tests/plugins
13731377
java
13741378
platform/mac/plugins
1375-
1379+
fast/loader/loadInProgress.html
13761380

13771381
# WebKit2 needs layoutTestController.overridePreference
13781382
# <https://bugs.webkit.org/show_bug.cgi?id=42197>
@@ -2066,7 +2070,7 @@ fast/loader/stateobjects/pushstate-updates-location.html
20662070
fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange.html
20672071
fast/loader/stateobjects/pushstate-within-popstate-handler-assert.html
20682072
fast/loader/stateobjects/pushstate-then-replacestate.html
2069-
2073+
fast/loader/stateobjects/document-destroyed-navigate-back.html
20702074
http/tests/loading/state-object-security-exception.html
20712075

20722076
# WebKitTestRunner needs textInputController
@@ -2160,70 +2164,6 @@ editing/deleting/smart-editing-disabled.html
21602164
editing/execCommand/delete-image-in-anchor.html
21612165
editing/selection/extend-forward-after-set-base-and-extent.html
21622166
editing/selection/select-line.html
2163-
2164-
2165-
# WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages
2166-
# <https://bugs.webkit.org/show_bug.cgi?id=42539>
2167-
editing/pasteboard/paste-noscript-xhtml.xhtml
2168-
editing/selection/5241148.html
2169-
editing/selection/5497643.html
2170-
fast/dom/Element/id-in-frameset.html
2171-
fast/dom/Geolocation/notimer-after-unload.html
2172-
fast/dom/script-element-gc.html
2173-
fast/dom/serialize-nodes.xhtml
2174-
fast/dom/set-inner-text-newlines.html
2175-
fast/dom/Window/alert-undefined.html
2176-
fast/events/attribute-listener-cloned-from-frameless-doc.xhtml
2177-
fast/events/drag-outside-window.html
2178-
fast/events/onload-webkit-before-webcore.html
2179-
fast/events/onunload-clears-onbeforeunload.html
2180-
fast/events/onunload.html
2181-
fast/events/onunload-not-on-body.html
2182-
fast/events/onunload-window-property.html
2183-
fast/events/pageshow-pagehide-on-back-uncached.html
2184-
fast/events/resize-subframe.html
2185-
fast/frames/frame-dead-region.html
2186-
fast/frames/frame-js-url-clientWidth.html
2187-
fast/frames/frame-name-reset.html
2188-
fast/frames/frameElement-widthheight.html
2189-
fast/frames/iframe-display-none.html
2190-
fast/frames/location-change.html
2191-
fast/frames/location-change-no-file-access.html
2192-
fast/frames/sandboxed-iframe-navigation-top-by-name-denied.html
2193-
fast/frames/set-unloaded-frame-location.html
2194-
fast/inspector-support/cssURLQuotes.html
2195-
fast/loader/for-window-event-onload-scripts.html
2196-
fast/loader/hashchange-event.html
2197-
fast/loader/loadInProgress.html
2198-
fast/loader/local-svg-parsed-as-svg.svg
2199-
fast/loader/non-deferred-substitute-load.html
2200-
fast/loader/onhashchange-attribute-listeners.html
2201-
fast/loader/simultaneous-reloads-assert.html
2202-
fast/loader/stateobjects/document-destroyed-navigate-back.html
2203-
fast/parser/parseCommentsInTitles.html
2204-
fast/xsl/subframe-location.html
2205-
http/tests/cookies/third-party-cookie-relaxing.html
2206-
http/tests/misc/DOMContentLoaded-event.html
2207-
http/tests/misc/embedCrasher.html
2208-
http/tests/misc/frame-default-enc-different-domain.html
2209-
http/tests/misc/frame-default-enc-same-domain.html
2210-
http/tests/misc/onload-remove-iframe-crash-2.html
2211-
http/tests/navigation/history-back-across-form-submission-to-fragment.html
2212-
http/tests/security/data-url-inline.css.html
2213-
http/tests/security/popup-blocked-from-fake-event.html
2214-
http/tests/security/popup-blocked-from-window-open.html
2215-
http/tests/xmlhttprequest/readystatechange.html
2216-
platform/mac/plugins/bindings-test-objc.html
2217-
storage/open-database-creation-callback-isolated-world.html
2218-
storage/statement-error-callback-isolated-world.html
2219-
storage/statement-success-callback-isolated-world.html
2220-
storage/transaction-callback-isolated-world.html
2221-
storage/transaction-error-callback-isolated-world.html
2222-
storage/transaction-success-callback-isolated-world.html
2223-
svg/hixie/dynamic/001.xml
2224-
websocket/tests/alert-in-event-handler.html
2225-
websocket/tests/websocket-pending-activity.html
2226-
22272167
# WebKitTestRunner needs layoutTestController.clearAllDatabases
22282168
# <https://bugs.webkit.org/show_bug.cgi?id=42540>
22292169
storage/change-version.html
@@ -2238,6 +2178,12 @@ storage/sql-error-codes.html
22382178
storage/statement-error-callback.html
22392179
storage/success-callback.html
22402180
storage/transaction-error-callback.html
2181+
storage/open-database-creation-callback-isolated-world.html
2182+
storage/statement-error-callback-isolated-world.html
2183+
storage/statement-success-callback-isolated-world.html
2184+
storage/transaction-callback-isolated-world.html
2185+
storage/transaction-error-callback-isolated-world.html
2186+
storage/transaction-success-callback-isolated-world.html
22412187

22422188
# WebKitTestRunner needs layoutTestController.pathToLocalResource
22432189
# <https://bugs.webkit.org/show_bug.cgi?id=42541>
@@ -2298,6 +2244,7 @@ fast/dom/Geolocation/reentrant-success.html
22982244
fast/dom/Geolocation/success.html
22992245
fast/dom/Geolocation/timeout.html
23002246
fast/dom/Geolocation/watch.html
2247+
fast/dom/Geolocation/notimer-after-unload.html
23012248

23022249
# WebKitTestRunner needs layoutTestController.setMockGeolocationPosition
23032250
fast/dom/Geolocation/timeout-clear-watch.html
@@ -2443,6 +2390,7 @@ fast/loader/stop-provisional-loads.html
24432390
# <https://bugs.webkit.org/show_bug.cgi?id=42692>
24442391
fast/xmlhttprequest/xmlhttprequest-no-file-access.html
24452392
fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
2393+
fast/frames/location-change-no-file-access.html
24462394

24472395
# WebKitTestRunner needs layoutTestController.setPrinting
24482396
# <https://bugs.webkit.org/show_bug.cgi?id=42693>
@@ -2481,6 +2429,19 @@ http/tests/security/no-referrer.html
24812429
# <https://bugs.webkit.org/show_bug.cgi?id=42700>
24822430
http/tests/security/setDomainRelaxationForbiddenForURLScheme.html
24832431

2432+
# WebKit2 needs layoutTestController.setDeferMainResourceDataLoad
2433+
# <https://bugs.webkit.org/show_bug.cgi?id=42777>
2434+
fast/loader/non-deferred-substitute-load.html
2435+
2436+
# WebKit2 needs layoutTestController.setAlwaysAcceptCookies
2437+
# <https://bugs.webkit.org/show_bug.cgi?id=42778>
2438+
http/tests/cookies/third-party-cookie-relaxing.html
2439+
2440+
# WebKit2 needs layoutTestController.setCloseRemainingWindowsWhenComplete
2441+
# <https://bugs.webkit.org/show_bug.cgi?id=42779>
2442+
http/tests/security/popup-blocked-from-fake-event.html
2443+
http/tests/security/popup-blocked-from-window-open.html
2444+
24842445
# WebKitTestRunner needs GCController
24852446
# <https://bugs.webkit.org/show_bug.cgi?id=42701>
24862447
fast/dom/gc-10.html
@@ -2495,6 +2456,7 @@ platform/mac/fast/text/attributed-substring-from-range.html
24952456

24962457
# WebKitTestRunner needs to print onunload handler information
24972458
# <https://bugs.webkit.org/show_bug.cgi?id=42703>
2459+
fast/events/onunload-clears-onbeforeunload.html
24982460
fast/events/pageshow-pagehide.html
24992461
fast/events/stop-load-in-unload-handler-using-document-write.html
25002462
fast/events/stop-load-in-unload-handler-using-window-stop.html
@@ -2512,10 +2474,14 @@ fast/loader/unload-hyperlink.html
25122474
fast/loader/unload-javascript-url.html
25132475
fast/loader/unload-reload.html
25142476
fast/loader/unload-window-location.html
2515-
http/tests/xmlhttprequest/xhr-onunload.html
25162477
http/tests/xmlhttprequest/frame-load-cancelled-abort.html
25172478
http/tests/xmlhttprequest/frame-unload-abort-crash.html
25182479
http/tests/xmlhttprequest/send-undefined-and-null.html
2480+
http/tests/xmlhttprequest/xhr-onunload.html
2481+
fast/events/onunload.html
2482+
fast/events/onunload-not-on-body.html
2483+
fast/events/pageshow-pagehide-on-back-uncached.html
2484+
http/tests/navigation/history-back-across-form-submission-to-fragment.html
25192485

25202486
# WebKitTestRunner needs to print history delegate information
25212487
# <https://bugs.webkit.org/show_bug.cgi?id=42704>
@@ -2540,7 +2506,6 @@ http/tests/loading/slow-parsing-subframe.html
25402506
http/tests/loading/text-content-type-with-binary-extension.html
25412507

25422508

2543-
25442509
# THINGS WE DON'T HAVE AND DON'T WANT
25452510

25462511
# WebKitTestRunner doesn't have appleScriptController
@@ -2553,11 +2518,10 @@ platform/mac/fast/dom/objc-wrapper-identity.html
25532518
platform/mac/fast/dom/wrapper-classes-objc.html
25542519
platform/mac/fast/dom/wrapper-round-tripping.html
25552520
platform/mac/fast/objc/longlongTest.html
2521+
platform/mac/plugins/bindings-test-objc.html
25562522

25572523
# WebKitTestRunner doesn't have eventSender.enableDOMUIEventLogging
25582524
platform/mac/fast/events/objc-event-api.html
25592525

25602526
# WebKitTestRunner doesn't have eventSender.fireKeyboardEventsToElement
25612527
platform/mac/fast/events/objc-keyboard-event-creation.html
2562-
2563-

WebKit2/ChangeLog

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
2010-07-21 Sam Weinig <sam@webkit.org>
2+
3+
Reviewed by Anders Carlsson.
4+
5+
Patch for https://bugs.webkit.org/show_bug.cgi?id=42539
6+
WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages
7+
8+
- Convert injected bundle UIClient functions to will-style, at least until we establish
9+
more concrete use cases for them past the TestRunner.
10+
11+
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
12+
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
13+
(WebKit::InjectedBundlePageUIClient::willAddMessageToConsole):
14+
(WebKit::InjectedBundlePageUIClient::willSetStatusbarText):
15+
(WebKit::InjectedBundlePageUIClient::willRunJavaScriptAlert):
16+
(WebKit::InjectedBundlePageUIClient::willRunJavaScriptConfirm):
17+
(WebKit::InjectedBundlePageUIClient::willRunJavaScriptPrompt):
18+
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
19+
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
20+
(WebKit::WebChromeClient::addMessageToConsole):
21+
(WebKit::WebChromeClient::runJavaScriptAlert):
22+
(WebKit::WebChromeClient::runJavaScriptConfirm):
23+
(WebKit::WebChromeClient::runJavaScriptPrompt):
24+
(WebKit::WebChromeClient::setStatusbarText):
25+
126
2010-07-21 Simon Fraser <simon.fraser@apple.com>
227

328
Windows build fix.

WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,20 @@ struct WKBundlePageLoaderClient {
6060
typedef struct WKBundlePageLoaderClient WKBundlePageLoaderClient;
6161

6262
// UI Client
63-
typedef void (*WKBundlePageAddMessageToConsoleCallback)(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo);
64-
typedef void (*WKBundlePageSetStatusbarTextCallback)(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo);
63+
typedef void (*WKBundlePageWillAddMessageToConsoleCallback)(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo);
64+
typedef void (*WKBundlePageWillSetStatusbarTextCallback)(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo);
65+
typedef void (*WKBundlePageWillRunJavaScriptAlertCallback)(WKBundlePageRef page, WKStringRef alertText, WKBundleFrameRef frame, const void *clientInfo);
66+
typedef void (*WKBundlePageWillRunJavaScriptConfirmCallback)(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo);
67+
typedef void (*WKBundlePageWillRunJavaScriptPromptCallback)(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo);
6568

6669
struct WKBundlePageUIClient {
6770
int version;
6871
const void * clientInfo;
69-
WKBundlePageAddMessageToConsoleCallback addMessageToConsole;
70-
WKBundlePageSetStatusbarTextCallback setStatusbarText;
72+
WKBundlePageWillAddMessageToConsoleCallback willAddMessageToConsole;
73+
WKBundlePageWillSetStatusbarTextCallback willSetStatusbarText;
74+
WKBundlePageWillRunJavaScriptAlertCallback willRunJavaScriptAlert;
75+
WKBundlePageWillRunJavaScriptConfirmCallback willRunJavaScriptConfirm;
76+
WKBundlePageWillRunJavaScriptPromptCallback willRunJavaScriptPrompt;
7177
};
7278
typedef struct WKBundlePageUIClient WKBundlePageUIClient;
7379

WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,34 @@ void InjectedBundlePageUIClient::initialize(WKBundlePageUIClient* client)
4646
memset(&m_client, 0, sizeof(m_client));
4747
}
4848

49-
void InjectedBundlePageUIClient::addMessageToConsole(WebPage* page, const String& message, int32_t lineNumber)
49+
void InjectedBundlePageUIClient::willAddMessageToConsole(WebPage* page, const String& message, int32_t lineNumber)
5050
{
51-
if (m_client.addMessageToConsole)
52-
m_client.addMessageToConsole(toRef(page), toRef(message.impl()), lineNumber, m_client.clientInfo);
51+
if (m_client.willAddMessageToConsole)
52+
m_client.willAddMessageToConsole(toRef(page), toRef(message.impl()), lineNumber, m_client.clientInfo);
5353
}
5454

55-
void InjectedBundlePageUIClient::setStatusbarText(WebPage* page, const String& statusbarText)
55+
void InjectedBundlePageUIClient::willSetStatusbarText(WebPage* page, const String& statusbarText)
5656
{
57-
if (m_client.setStatusbarText)
58-
m_client.setStatusbarText(toRef(page), toRef(statusbarText.impl()), m_client.clientInfo);
57+
if (m_client.willSetStatusbarText)
58+
m_client.willSetStatusbarText(toRef(page), toRef(statusbarText.impl()), m_client.clientInfo);
59+
}
60+
61+
void InjectedBundlePageUIClient::willRunJavaScriptAlert(WebPage* page, const String& alertText, WebFrame* frame)
62+
{
63+
if (m_client.willRunJavaScriptAlert)
64+
m_client.willRunJavaScriptAlert(toRef(page), toRef(alertText.impl()), toRef(frame), m_client.clientInfo);
65+
}
66+
67+
void InjectedBundlePageUIClient::willRunJavaScriptConfirm(WebPage* page, const String& message, WebFrame* frame)
68+
{
69+
if (m_client.willRunJavaScriptConfirm)
70+
m_client.willRunJavaScriptConfirm(toRef(page), toRef(message.impl()), toRef(frame), m_client.clientInfo);
71+
}
72+
73+
void InjectedBundlePageUIClient::willRunJavaScriptPrompt(WebPage* page, const String& message, const String& defaultValue, WebFrame* frame)
74+
{
75+
if (m_client.willRunJavaScriptPrompt)
76+
m_client.willRunJavaScriptPrompt(toRef(page), toRef(message.impl()), toRef(defaultValue.impl()), toRef(frame), m_client.clientInfo);
5977
}
6078

6179
} // namespace WebKit

WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,19 @@ namespace WebCore {
3434

3535
namespace WebKit {
3636

37+
class WebFrame;
3738
class WebPage;
3839

3940
class InjectedBundlePageUIClient {
4041
public:
4142
InjectedBundlePageUIClient();
4243
void initialize(WKBundlePageUIClient*);
4344

44-
void addMessageToConsole(WebPage*, const WebCore::String& message, int32_t lineNumber);
45-
void setStatusbarText(WebPage*, const WebCore::String&);
45+
void willAddMessageToConsole(WebPage*, const WebCore::String& message, int32_t lineNumber);
46+
void willSetStatusbarText(WebPage*, const WebCore::String&);
47+
void willRunJavaScriptAlert(WebPage*, const WebCore::String&, WebFrame*);
48+
void willRunJavaScriptConfirm(WebPage*, const WebCore::String&, WebFrame*);
49+
void willRunJavaScriptPrompt(WebPage*, const WebCore::String&, const WebCore::String&, WebFrame*);
4650

4751
private:
4852
WKBundlePageUIClient m_client;

0 commit comments

Comments
 (0)