<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[164450] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/164450">164450</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2014-02-20 15:04:31 -0800 (Thu, 20 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make it possible to reply asynchronously to JavaScript panels and alerts
https://bugs.webkit.org/show_bug.cgi?id=129116
Reviewed by Dan Bernstein.
* Scripts/webkit2/LegacyMessageReceiver-expected.cpp:
(Messages::WebPage::GetPluginProcessConnection::DelayedReply::send):
(Messages::WebPage::TestMultipleAttributes::DelayedReply::send):
* Scripts/webkit2/MessageReceiver-expected.cpp:
(Messages::WebPage::GetPluginProcessConnection::DelayedReply::send):
(Messages::WebPage::TestMultipleAttributes::DelayedReply::send):
* Scripts/webkit2/messages.py:
(generate_message_handler):
* UIProcess/API/APIUIClient.h:
(API::UIClient::runJavaScriptAlert):
(API::UIClient::runJavaScriptConfirm):
(API::UIClient::runJavaScriptPrompt):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runJavaScriptAlert):
(WebKit::WebPageProxy::runJavaScriptConfirm):
(WebKit::WebPageProxy::runJavaScriptPrompt):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2LegacyMessageReceiverexpectedcpp">trunk/Source/WebKit2/Scripts/webkit2/LegacyMessageReceiver-expected.cpp</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2MessageReceiverexpectedcpp">trunk/Source/WebKit2/Scripts/webkit2/MessageReceiver-expected.cpp</a></li>
<li><a href="#trunkSourceWebKit2Scriptswebkit2messagespy">trunk/Source/WebKit2/Scripts/webkit2/messages.py</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIUIClienth">trunk/Source/WebKit2/UIProcess/API/APIUIClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (164449 => 164450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-02-20 23:04:20 UTC (rev 164449)
+++ trunk/Source/WebKit2/ChangeLog        2014-02-20 23:04:31 UTC (rev 164450)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2014-02-20 Anders Carlsson <andersca@apple.com>
+
+ Make it possible to reply asynchronously to JavaScript panels and alerts
+ https://bugs.webkit.org/show_bug.cgi?id=129116
+
+ Reviewed by Dan Bernstein.
+
+ * Scripts/webkit2/LegacyMessageReceiver-expected.cpp:
+ (Messages::WebPage::GetPluginProcessConnection::DelayedReply::send):
+ (Messages::WebPage::TestMultipleAttributes::DelayedReply::send):
+ * Scripts/webkit2/MessageReceiver-expected.cpp:
+ (Messages::WebPage::GetPluginProcessConnection::DelayedReply::send):
+ (Messages::WebPage::TestMultipleAttributes::DelayedReply::send):
+ * Scripts/webkit2/messages.py:
+ (generate_message_handler):
+ * UIProcess/API/APIUIClient.h:
+ (API::UIClient::runJavaScriptAlert):
+ (API::UIClient::runJavaScriptConfirm):
+ (API::UIClient::runJavaScriptPrompt):
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageSetPageUIClient):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::runJavaScriptAlert):
+ (WebKit::WebPageProxy::runJavaScriptConfirm):
+ (WebKit::WebPageProxy::runJavaScriptPrompt):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+
</ins><span class="cx"> 2014-02-20 Enrique Ocaña González <eocanha@igalia.com>
</span><span class="cx">
</span><span class="cx"> WebKitGTK+ should stop using COMPILE_ASSERT_MATCHING_ENUM macros
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2LegacyMessageReceiverexpectedcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/LegacyMessageReceiver-expected.cpp (164449 => 164450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/LegacyMessageReceiver-expected.cpp        2014-02-20 23:04:20 UTC (rev 164449)
+++ trunk/Source/WebKit2/Scripts/webkit2/LegacyMessageReceiver-expected.cpp        2014-02-20 23:04:31 UTC (rev 164450)
</span><span class="lines">@@ -74,9 +74,9 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_encoder);
</span><span class="cx"> *m_encoder << connectionHandle;
</span><del>- bool result = m_connection->sendSyncReply(std::move(m_encoder));
</del><ins>+ bool _result = m_connection->sendSyncReply(std::move(m_encoder));
</ins><span class="cx"> m_connection = nullptr;
</span><del>- return result;
</del><ins>+ return _result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> TestMultipleAttributes::DelayedReply::DelayedReply(PassRefPtr<IPC::Connection> connection, std::unique_ptr<IPC::MessageEncoder> encoder)
</span><span class="lines">@@ -93,9 +93,9 @@
</span><span class="cx"> bool TestMultipleAttributes::DelayedReply::send()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_encoder);
</span><del>- bool result = m_connection->sendSyncReply(std::move(m_encoder));
</del><ins>+ bool _result = m_connection->sendSyncReply(std::move(m_encoder));
</ins><span class="cx"> m_connection = nullptr;
</span><del>- return result;
</del><ins>+ return _result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebPage
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2MessageReceiverexpectedcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/MessageReceiver-expected.cpp (164449 => 164450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/MessageReceiver-expected.cpp        2014-02-20 23:04:20 UTC (rev 164449)
+++ trunk/Source/WebKit2/Scripts/webkit2/MessageReceiver-expected.cpp        2014-02-20 23:04:31 UTC (rev 164450)
</span><span class="lines">@@ -74,9 +74,9 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_encoder);
</span><span class="cx"> *m_encoder << connectionHandle;
</span><del>- bool result = m_connection->sendSyncReply(std::move(m_encoder));
</del><ins>+ bool _result = m_connection->sendSyncReply(std::move(m_encoder));
</ins><span class="cx"> m_connection = nullptr;
</span><del>- return result;
</del><ins>+ return _result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> TestMultipleAttributes::DelayedReply::DelayedReply(PassRefPtr<IPC::Connection> connection, std::unique_ptr<IPC::MessageEncoder> encoder)
</span><span class="lines">@@ -93,9 +93,9 @@
</span><span class="cx"> bool TestMultipleAttributes::DelayedReply::send()
</span><span class="cx"> {
</span><span class="cx"> ASSERT(m_encoder);
</span><del>- bool result = m_connection->sendSyncReply(std::move(m_encoder));
</del><ins>+ bool _result = m_connection->sendSyncReply(std::move(m_encoder));
</ins><span class="cx"> m_connection = nullptr;
</span><del>- return result;
</del><ins>+ return _result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebPage
</span></span></pre></div>
<a id="trunkSourceWebKit2Scriptswebkit2messagespy"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Scripts/webkit2/messages.py (164449 => 164450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Scripts/webkit2/messages.py        2014-02-20 23:04:20 UTC (rev 164449)
+++ trunk/Source/WebKit2/Scripts/webkit2/messages.py        2014-02-20 23:04:31 UTC (rev 164450)
</span><span class="lines">@@ -573,9 +573,9 @@
</span><span class="cx"> result.append('{\n')
</span><span class="cx"> result.append(' ASSERT(m_encoder);\n')
</span><span class="cx"> result += [' *m_encoder << %s;\n' % x.name for x in message.reply_parameters]
</span><del>- result.append(' bool result = m_connection->sendSyncReply(std::move(m_encoder));\n')
</del><ins>+ result.append(' bool _result = m_connection->sendSyncReply(std::move(m_encoder));\n')
</ins><span class="cx"> result.append(' m_connection = nullptr;\n')
</span><del>- result.append(' return result;\n')
</del><ins>+ result.append(' return _result;\n')
</ins><span class="cx"> result.append('}\n')
</span><span class="cx"> result.append('\n')
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIUIClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIUIClient.h (164449 => 164450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIUIClient.h        2014-02-20 23:04:20 UTC (rev 164449)
+++ trunk/Source/WebKit2/UIProcess/API/APIUIClient.h        2014-02-20 23:04:31 UTC (rev 164450)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "WebEvent.h"
</span><span class="cx"> #include "WebHitTestResult.h"
</span><span class="cx"> #include <WebCore/FloatRect.h>
</span><ins>+#include <functional>
</ins><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -68,9 +69,9 @@
</span><span class="cx"> virtual void focus(WebKit::WebPageProxy*) { }
</span><span class="cx"> virtual void unfocus(WebKit::WebPageProxy*) { }
</span><span class="cx">
</span><del>- virtual void runJavaScriptAlert(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*) { }
- virtual bool runJavaScriptConfirm(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*) { return false; }
- virtual WTF::String runJavaScriptPrompt(WebKit::WebPageProxy*, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy*) { return WTF::String(); }
</del><ins>+ virtual void runJavaScriptAlert(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*, std::function<void ()> completionHandler) { completionHandler(); }
+ virtual void runJavaScriptConfirm(WebKit::WebPageProxy*, const WTF::String&, WebKit::WebFrameProxy*, std::function<void (bool)> completionHandler) { completionHandler(false); }
+ virtual void runJavaScriptPrompt(WebKit::WebPageProxy*, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy*, std::function<void (const WTF::String&)> completionHandler) { completionHandler(WTF::String()); }
</ins><span class="cx">
</span><span class="cx"> virtual void setStatusText(WebKit::WebPageProxy*, const WTF::String&) { }
</span><span class="cx"> virtual void mouseDidMoveOverElement(WebKit::WebPageProxy*, const WebKit::WebHitTestResult::Data&, WebKit::WebEvent::Modifiers, API::Object*) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (164449 => 164450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-02-20 23:04:20 UTC (rev 164449)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-02-20 23:04:31 UTC (rev 164450)
</span><span class="lines">@@ -1148,35 +1148,41 @@
</span><span class="cx"> m_client.unfocus(toAPI(page), m_client.base.clientInfo);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void runJavaScriptAlert(WebPageProxy* page, const String& message, WebFrameProxy* frame) override
</del><ins>+ virtual void runJavaScriptAlert(WebPageProxy* page, const String& message, WebFrameProxy* frame, std::function<void ()> completionHandler) override
</ins><span class="cx"> {
</span><del>- if (!m_client.runJavaScriptAlert)
</del><ins>+ if (!m_client.runJavaScriptAlert) {
+ completionHandler();
</ins><span class="cx"> return;
</span><ins>+ }
</ins><span class="cx">
</span><span class="cx"> m_client.runJavaScriptAlert(toAPI(page), toAPI(message.impl()), toAPI(frame), m_client.base.clientInfo);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool runJavaScriptConfirm(WebPageProxy* page, const String& message, WebFrameProxy* frame) override
</del><ins>+ virtual void runJavaScriptConfirm(WebPageProxy* page, const String& message, WebFrameProxy* frame, std::function<void (bool)> completionHandler) override
</ins><span class="cx"> {
</span><del>- if (!m_client.runJavaScriptConfirm)
- return false;
</del><ins>+ if (!m_client.runJavaScriptConfirm) {
+ completionHandler(false);
+ return;
+ }
</ins><span class="cx">
</span><del>- return m_client.runJavaScriptConfirm(toAPI(page), toAPI(message.impl()), toAPI(frame), m_client.base.clientInfo);
</del><ins>+ bool result = m_client.runJavaScriptConfirm(toAPI(page), toAPI(message.impl()), toAPI(frame), m_client.base.clientInfo);
+ completionHandler(result);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual String runJavaScriptPrompt(WebPageProxy* page, const String& message, const String& defaultValue, WebFrameProxy* frame) override
</del><ins>+ virtual void runJavaScriptPrompt(WebPageProxy* page, const String& message, const String& defaultValue, WebFrameProxy* frame, std::function<void (const String&)> completionHandler) override
</ins><span class="cx"> {
</span><del>- if (!m_client.runJavaScriptPrompt)
- return String();
</del><ins>+ if (!m_client.runJavaScriptPrompt) {
+ completionHandler(String());
+ return;
+ }
</ins><span class="cx">
</span><del>- API::String* string = toImpl(m_client.runJavaScriptPrompt(toAPI(page), toAPI(message.impl()), toAPI(defaultValue.impl()), toAPI(frame), m_client.base.clientInfo));
- if (!string)
- return String();
</del><ins>+ RefPtr<API::String> string = adoptRef(toImpl(m_client.runJavaScriptPrompt(toAPI(page), toAPI(message.impl()), toAPI(defaultValue.impl()), toAPI(frame), m_client.base.clientInfo)));
+ if (!string) {
+ completionHandler(String());
+ return;
+ }
</ins><span class="cx">
</span><del>- String result = string->string();
- string->deref();
-
- return result;
</del><ins>+ completionHandler(string->string());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual void setStatusText(WebPageProxy* page, const String& text) override
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (164449 => 164450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-02-20 23:04:20 UTC (rev 164449)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-02-20 23:04:31 UTC (rev 164450)
</span><span class="lines">@@ -2642,7 +2642,7 @@
</span><span class="cx"> m_uiClient->close(this);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::runJavaScriptAlert(uint64_t frameID, const String& message)
</del><ins>+void WebPageProxy::runJavaScriptAlert(uint64_t frameID, const String& message, RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply> reply)
</ins><span class="cx"> {
</span><span class="cx"> WebFrameProxy* frame = m_process->webFrame(frameID);
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="lines">@@ -2650,10 +2650,10 @@
</span><span class="cx"> // Since runJavaScriptAlert() can spin a nested run loop we need to turn off the responsiveness timer.
</span><span class="cx"> m_process->responsivenessTimer()->stop();
</span><span class="cx">
</span><del>- m_uiClient->runJavaScriptAlert(this, message, frame);
</del><ins>+ m_uiClient->runJavaScriptAlert(this, message, frame, [reply]{ reply->send(); });
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::runJavaScriptConfirm(uint64_t frameID, const String& message, bool& result)
</del><ins>+void WebPageProxy::runJavaScriptConfirm(uint64_t frameID, const String& message, RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply> reply)
</ins><span class="cx"> {
</span><span class="cx"> WebFrameProxy* frame = m_process->webFrame(frameID);
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="lines">@@ -2661,10 +2661,10 @@
</span><span class="cx"> // Since runJavaScriptConfirm() can spin a nested run loop we need to turn off the responsiveness timer.
</span><span class="cx"> m_process->responsivenessTimer()->stop();
</span><span class="cx">
</span><del>- result = m_uiClient->runJavaScriptConfirm(this, message, frame);
</del><ins>+ m_uiClient->runJavaScriptConfirm(this, message, frame, [reply](bool result) { reply->send(result); });
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::runJavaScriptPrompt(uint64_t frameID, const String& message, const String& defaultValue, String& result)
</del><ins>+void WebPageProxy::runJavaScriptPrompt(uint64_t frameID, const String& message, const String& defaultValue, RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply> reply)
</ins><span class="cx"> {
</span><span class="cx"> WebFrameProxy* frame = m_process->webFrame(frameID);
</span><span class="cx"> MESSAGE_CHECK(frame);
</span><span class="lines">@@ -2672,7 +2672,7 @@
</span><span class="cx"> // Since runJavaScriptPrompt() can spin a nested run loop we need to turn off the responsiveness timer.
</span><span class="cx"> m_process->responsivenessTimer()->stop();
</span><span class="cx">
</span><del>- result = m_uiClient->runJavaScriptPrompt(this, message, defaultValue, frame);
</del><ins>+ m_uiClient->runJavaScriptPrompt(this, message, defaultValue, frame, [reply](const String& result) { reply->send(result); });
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::shouldInterruptJavaScript(bool& result)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (164449 => 164450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-02-20 23:04:20 UTC (rev 164449)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-02-20 23:04:31 UTC (rev 164450)
</span><span class="lines">@@ -956,9 +956,9 @@
</span><span class="cx"> void createNewPage(const WebCore::ResourceRequest&, const WebCore::WindowFeatures&, uint32_t modifiers, int32_t mouseButton, uint64_t& newPageID, WebPageCreationParameters&);
</span><span class="cx"> void showPage();
</span><span class="cx"> void closePage(bool stopResponsivenessTimer);
</span><del>- void runJavaScriptAlert(uint64_t frameID, const String&);
- void runJavaScriptConfirm(uint64_t frameID, const String&, bool& result);
- void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, String& result);
</del><ins>+ void runJavaScriptAlert(uint64_t frameID, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptAlert::DelayedReply>);
+ void runJavaScriptConfirm(uint64_t frameID, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptConfirm::DelayedReply>);
+ void runJavaScriptPrompt(uint64_t frameID, const String&, const String&, RefPtr<Messages::WebPageProxy::RunJavaScriptPrompt::DelayedReply>);
</ins><span class="cx"> void shouldInterruptJavaScript(bool& result);
</span><span class="cx"> void setStatusText(const String&);
</span><span class="cx"> void mouseDidMoveOverElement(const WebHitTestResult::Data& hitTestResultData, uint32_t modifiers, IPC::MessageDecoder&);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (164449 => 164450)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-02-20 23:04:20 UTC (rev 164449)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-02-20 23:04:31 UTC (rev 164450)
</span><span class="lines">@@ -25,9 +25,9 @@
</span><span class="cx"> CreateNewPage(WebCore::ResourceRequest request, WebCore::WindowFeatures windowFeatures, uint32_t modifiers, int32_t mouseButton) -> (uint64_t newPageID, WebKit::WebPageCreationParameters newPageParameters)
</span><span class="cx"> ShowPage()
</span><span class="cx"> ClosePage(bool stopResponsivenessTimer)
</span><del>- RunJavaScriptAlert(uint64_t frameID, String message) -> ()
- RunJavaScriptConfirm(uint64_t frameID, String message) -> (bool result)
- RunJavaScriptPrompt(uint64_t frameID, String message, String defaultValue) -> (String result)
</del><ins>+ RunJavaScriptAlert(uint64_t frameID, String message) -> () Delayed
+ RunJavaScriptConfirm(uint64_t frameID, String message) -> (bool result) Delayed
+ RunJavaScriptPrompt(uint64_t frameID, String message, String defaultValue) -> (String result) Delayed
</ins><span class="cx"> ShouldInterruptJavaScript() -> (bool shouldInterupt)
</span><span class="cx"> MouseDidMoveOverElement(WebKit::WebHitTestResult::Data hitTestResultData, uint32_t modifiers, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span></span></pre>
</div>
</div>
</body>
</html>