<!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>[169962] 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/169962">169962</a></dd>
<dt>Author</dt> <dd>mitz@apple.com</dd>
<dt>Date</dt> <dd>2014-06-13 22:32:07 -0700 (Fri, 13 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Make GenericCallback variadic
https://bugs.webkit.org/show_bug.cgi?id=133897

Reviewed by Sam Weinig.

Also eliminated legacy callback functions and all CallbackBase derived classes outside of
GenericCallback.h.

* UIProcess/API/C/WKPage.cpp:
(WKPageValidateCommand): Changed legacy callback (with leading bool parameter) into modern
callback (with trailing error parameter).
(WKPageComputePagesForPrinting): Ditto.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _getWebArchiveDataWithCompletionHandler:]): Ditto.
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Ditto.

* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.

* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]): Ditto.
(-[WKView startSpeaking:]): Ditto.

* UIProcess/AutoCorrectionCallback.h: Replaced CallbackBase derived classes with
GenericCallback specializations.

* UIProcess/GenericCallback.h:
- Made GenericCallback variadic:
(WebKit::GenericCallback::performCallbackWithReturnValue):
(WebKit::GenericCallback::invalidate):
(WebKit::GenericAPICallback::create):

- Replaced CallbackBase derived classes with GenericCallback specializations:
(WebKit::GenericCallback::create): Deleted.
(WebKit::ComputedPagesCallback::create): Deleted.
(WebKit::ComputedPagesCallback::~ComputedPagesCallback): Deleted.
(WebKit::ComputedPagesCallback::performCallbackWithReturnValue): Deleted.
(WebKit::ComputedPagesCallback::invalidate): Deleted.
(WebKit::ComputedPagesCallback::ComputedPagesCallback): Deleted.
(WebKit::ImageCallback::create): Deleted.
(WebKit::ImageCallback::~ImageCallback): Deleted.
(WebKit::ImageCallback::performCallbackWithReturnValue): Deleted.
(WebKit::ImageCallback::invalidate): Deleted.
(WebKit::ImageCallback::ImageCallback): Deleted.

* UIProcess/WebPageProxy.h: Replaced CallbackBase derived classes with GenericCallback
specializations.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]): Changed
legacy callback (with leading bool parameter) into modern callback (with trailing error
parameter).
(-[WKContentView requestDictationContext:]): Ditto.
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): Ditto.

* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
(-[WKPrintingView _askPageToComputePageRects]): Ditto.
(-[WKPrintingView _drawPreview:]): Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKThumbnailViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAutoCorrectionCallbackh">trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessGenericCallbackh">trunk/Source/WebKit2/UIProcess/GenericCallback.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKPrintingViewmm">trunk/Source/WebKit2/UIProcess/mac/WKPrintingView.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/ChangeLog        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -1,3 +1,66 @@
</span><ins>+2014-06-13  Dan Bernstein  &lt;mitz@apple.com&gt;
+
+        Make GenericCallback variadic
+        https://bugs.webkit.org/show_bug.cgi?id=133897
+
+        Reviewed by Sam Weinig.
+
+        Also eliminated legacy callback functions and all CallbackBase derived classes outside of
+        GenericCallback.h.
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageValidateCommand): Changed legacy callback (with leading bool parameter) into modern
+        callback (with trailing error parameter).
+        (WKPageComputePagesForPrinting): Ditto.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _getWebArchiveDataWithCompletionHandler:]): Ditto.
+        (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Ditto.
+
+        * UIProcess/API/Cocoa/_WKThumbnailView.mm:
+        (-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView validateUserInterfaceItem:]): Ditto.
+        (-[WKView startSpeaking:]): Ditto.
+
+        * UIProcess/AutoCorrectionCallback.h: Replaced CallbackBase derived classes with
+        GenericCallback specializations.
+
+        * UIProcess/GenericCallback.h:
+        - Made GenericCallback variadic:
+        (WebKit::GenericCallback::performCallbackWithReturnValue):
+        (WebKit::GenericCallback::invalidate):
+        (WebKit::GenericAPICallback::create):
+
+        - Replaced CallbackBase derived classes with GenericCallback specializations:
+        (WebKit::GenericCallback::create): Deleted.
+        (WebKit::ComputedPagesCallback::create): Deleted.
+        (WebKit::ComputedPagesCallback::~ComputedPagesCallback): Deleted.
+        (WebKit::ComputedPagesCallback::performCallbackWithReturnValue): Deleted.
+        (WebKit::ComputedPagesCallback::invalidate): Deleted.
+        (WebKit::ComputedPagesCallback::ComputedPagesCallback): Deleted.
+        (WebKit::ImageCallback::create): Deleted.
+        (WebKit::ImageCallback::~ImageCallback): Deleted.
+        (WebKit::ImageCallback::performCallbackWithReturnValue): Deleted.
+        (WebKit::ImageCallback::invalidate): Deleted.
+        (WebKit::ImageCallback::ImageCallback): Deleted.
+
+        * UIProcess/WebPageProxy.h: Replaced CallbackBase derived classes with GenericCallback
+        specializations.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]): Changed
+        legacy callback (with leading bool parameter) into modern callback (with trailing error
+        parameter).
+        (-[WKContentView requestDictationContext:]): Ditto.
+        (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): Ditto.
+
+        * UIProcess/mac/WKPrintingView.mm:
+        (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
+        (-[WKPrintingView _askPageToComputePageRects]): Ditto.
+        (-[WKPrintingView _drawPreview:]): Ditto.
+
</ins><span class="cx"> 2014-06-13  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed; fix the build.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -1657,8 +1657,8 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageValidateCommand(WKPageRef pageRef, WKStringRef command, void* context, WKPageValidateCommandCallback callback)
</span><span class="cx"> {
</span><del>-    toImpl(pageRef)-&gt;validateCommand(toImpl(command)-&gt;string(), ValidateCommandCallback::create([context, callback](bool error, StringImpl* commandName, bool isEnabled, int32_t state) {
-        callback(toAPI(commandName), isEnabled, state, error ? toAPI(API::Error::create().get()) : 0, context);
</del><ins>+    toImpl(pageRef)-&gt;validateCommand(toImpl(command)-&gt;string(), ValidateCommandCallback::create([context, callback](StringImpl* commandName, bool isEnabled, int32_t state, CallbackBase::Error error) {
+        callback(toAPI(commandName), isEnabled, state, error != CallbackBase::Error::None ? toAPI(API::Error::create().get()) : 0, context);
</ins><span class="cx">     }));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1679,11 +1679,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageComputePagesForPrinting(WKPageRef page, WKFrameRef frame, WKPrintInfo printInfo, WKPageComputePagesForPrintingFunction callback, void* context)
</span><span class="cx"> {
</span><del>-    toImpl(page)-&gt;computePagesForPrinting(toImpl(frame), printInfoFromWKPrintInfo(printInfo), ComputedPagesCallback::create([context, callback](bool error, const Vector&lt;WebCore::IntRect&gt;&amp; rects, double scaleFactor) {
</del><ins>+    toImpl(page)-&gt;computePagesForPrinting(toImpl(frame), printInfoFromWKPrintInfo(printInfo), ComputedPagesCallback::create([context, callback](const Vector&lt;WebCore::IntRect&gt;&amp; rects, double scaleFactor, CallbackBase::Error error) {
</ins><span class="cx">         Vector&lt;WKRect&gt; wkRects(rects.size());
</span><span class="cx">         for (size_t i = 0; i &lt; rects.size(); ++i)
</span><span class="cx">             wkRects[i] = toAPI(rects[i]);
</span><del>-        callback(wkRects.data(), wkRects.size(), scaleFactor, error ? toAPI(API::Error::create().get()) : 0, context);
</del><ins>+        callback(wkRects.data(), wkRects.size(), scaleFactor, error != CallbackBase::Error::None ? toAPI(API::Error::create().get()) : 0, context);
</ins><span class="cx">     }));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -1520,9 +1520,9 @@
</span><span class="cx"> {
</span><span class="cx">     auto handler = adoptNS([completionHandler copy]);
</span><span class="cx"> 
</span><del>-    _page-&gt;getWebArchiveOfFrame(_page-&gt;mainFrame(), WebKit::DataCallback::create([handler](bool isError, API::Data* data) {
</del><ins>+    _page-&gt;getWebArchiveOfFrame(_page-&gt;mainFrame(), WebKit::DataCallback::create([handler](API::Data* data, WebKit::CallbackBase::Error error) {
</ins><span class="cx">         void (^completionHandlerBlock)(NSData *, NSError *) = (void (^)(NSData *, NSError *))handler.get();
</span><del>-        if (isError) {
</del><ins>+        if (error != WebKit::CallbackBase::Error::None) {
</ins><span class="cx">             // FIXME: Pipe a proper error in from the WebPageProxy.
</span><span class="cx">             RetainPtr&lt;NSError&gt; error = adoptNS([[NSError alloc] init]);
</span><span class="cx">             completionHandlerBlock(nil, error.get());
</span><span class="lines">@@ -2030,7 +2030,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     
</span><span class="cx">     void(^copiedCompletionHandler)(CGImageRef) = [completionHandler copy];
</span><del>-    _page-&gt;takeSnapshot(WebCore::enclosingIntRect(snapshotRectInContentCoordinates), WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebKit::SnapshotOptionsExcludeDeviceScaleFactor, [=](bool, const WebKit::ShareableBitmap::Handle&amp; imageHandle) {
</del><ins>+    _page-&gt;takeSnapshot(WebCore::enclosingIntRect(snapshotRectInContentCoordinates), WebCore::expandedIntSize(WebCore::FloatSize(imageSize)), WebKit::SnapshotOptionsExcludeDeviceScaleFactor, [=](const WebKit::ShareableBitmap::Handle&amp; imageHandle, CallbackBase::Error) {
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">         // Automatically delete when this goes out of scope.
</span><span class="cx">         auto uniqueActivityToken = std::unique_ptr&lt;WebKit::ProcessThrottler::BackgroundActivityToken&gt;(activityToken);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKThumbnailViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.mm (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.mm        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.mm        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">     IntSize bitmapSize = snapshotRect.size();
</span><span class="cx">     bitmapSize.scale(_scale * _webPageProxy-&gt;deviceScaleFactor());
</span><span class="cx">     _lastSnapshotScale = _scale;
</span><del>-    _webPageProxy-&gt;takeSnapshot(snapshotRect, bitmapSize, options, [thumbnailView](bool, const ShareableBitmap::Handle&amp; imageHandle) {
</del><ins>+    _webPageProxy-&gt;takeSnapshot(snapshotRect, bitmapSize, options, [thumbnailView](const ShareableBitmap::Handle&amp; imageHandle, CallbackBase::Error) {
</ins><span class="cx">         RefPtr&lt;ShareableBitmap&gt; bitmap = ShareableBitmap::create(imageHandle, SharedMemory::ReadOnly);
</span><span class="cx">         RetainPtr&lt;CGImageRef&gt; cgImage = bitmap ? bitmap-&gt;makeCGImage() : nullptr;
</span><span class="cx">         [thumbnailView _didTakeSnapshot:cgImage.get()];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -835,9 +835,9 @@
</span><span class="cx">         // If we are not already awaiting validation for this command, start the asynchronous validation process.
</span><span class="cx">         // FIXME: Theoretically, there is a race here; when we get the answer it might be old, from a previous time
</span><span class="cx">         // we asked for the same command; there is no guarantee the answer is still valid.
</span><del>-        _data-&gt;_page-&gt;validateCommand(commandName, ValidateCommandCallback::create([self](bool error, StringImpl* commandName, bool isEnabled, int32_t state) {
</del><ins>+        _data-&gt;_page-&gt;validateCommand(commandName, ValidateCommandCallback::create([self](StringImpl* commandName, bool isEnabled, int32_t state, CallbackBase::Error error) {
</ins><span class="cx">             // If the process exits before the command can be validated, we'll be called back with an error.
</span><del>-            if (error)
</del><ins>+            if (error != CallbackBase::Error::None)
</ins><span class="cx">                 return;
</span><span class="cx">             
</span><span class="cx">             [self _setUserInterfaceItemState:nsStringFromWebCoreString(commandName) enabled:isEnabled state:state];
</span><span class="lines">@@ -852,8 +852,8 @@
</span><span class="cx"> 
</span><span class="cx"> - (IBAction)startSpeaking:(id)sender
</span><span class="cx"> {
</span><del>-    _data-&gt;_page-&gt;getSelectionOrContentsAsString(StringCallback::create([self](bool error, StringImpl* string) {
-        if (error)
</del><ins>+    _data-&gt;_page-&gt;getSelectionOrContentsAsString(StringCallback::create([self](StringImpl* string, CallbackBase::Error error) {
+        if (error != CallbackBase::Error::None)
</ins><span class="cx">             return;
</span><span class="cx">         if (!string)
</span><span class="cx">             return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAutoCorrectionCallbackh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/UIProcess/AutoCorrectionCallback.h        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -35,130 +35,10 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-class AutocorrectionDataCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void (bool, const Vector&lt;WebCore::FloatRect&gt;&amp;, const String&amp;, double, uint64_t)&gt; CallbackFunction;
</del><ins>+typedef GenericCallback&lt;const Vector&lt;WebCore::FloatRect&gt;&amp;, const String&amp;, double, uint64_t&gt; AutocorrectionDataCallback;
+typedef GenericCallback&lt;const String&amp;, const String&amp;, const String&amp;, const String&amp;, uint64_t, uint64_t&gt; AutocorrectionContextCallback;
+typedef GenericCallback&lt;const String&amp;, const String&amp;, const String&amp;&gt; DictationContextCallback;
</ins><span class="cx"> 
</span><del>-    static PassRefPtr&lt;AutocorrectionDataCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new AutocorrectionDataCallback(callback));
-    }
-
-    virtual ~AutocorrectionDataCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(const Vector&lt;WebCore::FloatRect&gt;&amp; returnValue1, const String&amp; returnValue2, double returnValue3, uint64_t returnValue4)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, returnValue1, returnValue2, returnValue3, returnValue4);
-
-        m_callback = 0;
-    }
-
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        m_callback(true, Vector&lt;WebCore::FloatRect&gt;(), String(), 0, 0);
-
-        m_callback = 0;
-    }
-
-private:
-    AutocorrectionDataCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-        ASSERT(m_callback);
-    }
-    
-    CallbackFunction m_callback;
-};
-
-class AutocorrectionContextCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void (bool, const String&amp;, const String&amp;, const String&amp;, const String&amp;, uint64_t, uint64_t)&gt; CallbackFunction;
-
-    static PassRefPtr&lt;AutocorrectionContextCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new AutocorrectionContextCallback(callback));
-    }
-
-    virtual ~AutocorrectionContextCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(const String&amp; returnValue1, const String&amp; returnValue2, const String&amp; returnValue3, const String&amp; returnValue4, uint64_t returnValue5, uint64_t returnValue6)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, returnValue1, returnValue2, returnValue3, returnValue4, returnValue5, returnValue6);
-
-        m_callback = 0;
-    }
-
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        m_callback(true, String(), String(), String(), String(), 0, 0);
-
-        m_callback = 0;
-    }
-
-private:
-    AutocorrectionContextCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-        ASSERT(m_callback);
-    }
-    
-    CallbackFunction m_callback;
-};
-
-class DictationContextCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void (bool, const String&amp;, const String&amp;, const String&amp;)&gt; CallbackFunction;
-
-    static PassRefPtr&lt;DictationContextCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new DictationContextCallback(callback));
-    }
-
-    virtual ~DictationContextCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(const String&amp; returnValue1, const String&amp; returnValue2, const String&amp; returnValue3)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, returnValue1, returnValue2, returnValue3);
-        m_callback = nullptr;
-    }
-
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        m_callback(true, String(), String(), String());
-        m_callback = nullptr;
-    }
-    
-private:
-    DictationContextCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-        ASSERT(m_callback);
-    }
-    
-    CallbackFunction m_callback;
-};
-
</del><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // AutoCorrectionCallback_h
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessGenericCallbackh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/GenericCallback.h (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/GenericCallback.h        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/UIProcess/GenericCallback.h        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -124,36 +124,27 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template&lt;typename T&gt;
</del><ins>+template&lt;typename... T&gt;
</ins><span class="cx"> class GenericCallback : public CallbackBase {
</span><span class="cx"> public:
</span><del>-    typedef std::function&lt;void (T, Error)&gt; CallbackFunction;
</del><ins>+    typedef std::function&lt;void (T..., Error)&gt; CallbackFunction;
</ins><span class="cx"> 
</span><span class="cx">     static PassRefPtr&lt;GenericCallback&gt; create(CallbackFunction callback)
</span><span class="cx">     {
</span><span class="cx">         return adoptRef(new GenericCallback(callback));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // FIXME: Get rid of this legacy version.
-    typedef std::function&lt;void (bool, T)&gt; LegacyCallbackFunction;
-    static PassRefPtr&lt;GenericCallback&gt; create(LegacyCallbackFunction callback)
-    {
-        return adoptRef(new GenericCallback([callback](T t, Error error) {
-            callback(error != Error::None, std::move(t));
-        }));
-    }
-
</del><span class="cx">     virtual ~GenericCallback()
</span><span class="cx">     {
</span><span class="cx">         ASSERT(!m_callback);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    void performCallbackWithReturnValue(T returnValue)
</del><ins>+    void performCallbackWithReturnValue(T... returnValue)
</ins><span class="cx">     {
</span><span class="cx">         if (!m_callback)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        m_callback(returnValue, Error::None);
</del><ins>+        m_callback(returnValue..., Error::None);
</ins><span class="cx"> 
</span><span class="cx">         m_callback = nullptr;
</span><span class="cx">     }
</span><span class="lines">@@ -163,7 +154,7 @@
</span><span class="cx">         if (!m_callback)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        m_callback(T(), error);
</del><ins>+        m_callback(typename std::remove_reference&lt;T&gt;::type()..., error);
</ins><span class="cx"> 
</span><span class="cx">         m_callback = nullptr;
</span><span class="cx">     }
</span><span class="lines">@@ -184,99 +175,15 @@
</span><span class="cx"> 
</span><span class="cx">     static PassRefPtr&lt;GenericCallback&lt;InternalReturnValueType&gt;&gt; create(void* context, CallbackFunction callback)
</span><span class="cx">     {
</span><del>-        return GenericCallback&lt;InternalReturnValueType&gt;::create([context, callback](bool error, InternalReturnValueType returnValue) {
-            callback(toAPI(returnValue), error ? toAPI(API::Error::create().get()) : 0, context);
</del><ins>+        return GenericCallback&lt;InternalReturnValueType&gt;::create([context, callback](InternalReturnValueType returnValue, CallbackBase::Error error) {
+            callback(toAPI(returnValue), error != CallbackBase::Error::None ? toAPI(API::Error::create().get()) : 0, context);
</ins><span class="cx">         });
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-// FIXME: Make a version of GenericCallback with two arguments, and define ComputedPagesCallback as a specialization.
-class ComputedPagesCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void (bool, const Vector&lt;WebCore::IntRect&gt;&amp;, double)&gt; CallbackFunction;
</del><ins>+typedef GenericCallback&lt;const Vector&lt;WebCore::IntRect&gt;&amp;, double&gt; ComputedPagesCallback;
+typedef GenericCallback&lt;const ShareableBitmap::Handle&amp;&gt; ImageCallback;
</ins><span class="cx"> 
</span><del>-    static PassRefPtr&lt;ComputedPagesCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new ComputedPagesCallback(callback));
-    }
-
-    virtual ~ComputedPagesCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(const Vector&lt;WebCore::IntRect&gt;&amp; returnValue1, double returnValue2)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, returnValue1, returnValue2);
-
-        m_callback = 0;
-    }
-    
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        m_callback(true, Vector&lt;WebCore::IntRect&gt;(), 0);
-        
-        m_callback = 0;
-    }
-
-private:
-
-    ComputedPagesCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-    }
-
-    CallbackFunction m_callback;
-};
-
-class ImageCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void (bool, const ShareableBitmap::Handle&amp;)&gt; CallbackFunction;
-
-    static PassRefPtr&lt;ImageCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new ImageCallback(callback));
-    }
-
-    virtual ~ImageCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(const ShareableBitmap::Handle&amp; returnValue1)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, returnValue1);
-
-        m_callback = 0;
-    }
-
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        RefPtr&lt;API::Error&gt; error = API::Error::create();
-        ShareableBitmap::Handle handle;
-        m_callback(true, handle);
-
-        m_callback = 0;
-    }
-
-private:
-
-    ImageCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-    }
-    
-    CallbackFunction m_callback;
-};
-
</del><span class="cx"> template&lt;typename T&gt;
</span><span class="cx"> void invalidateCallbackMap(HashMap&lt;uint64_t, T&gt;&amp; map, CallbackBase::Error error = CallbackBase::Error::Unknown)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -204,226 +204,16 @@
</span><span class="cx"> };
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-// FIXME: Make a version of CallbackBase with three arguments, and define ValidateCommandCallback as a specialization.
-class ValidateCommandCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void (bool, StringImpl*, bool, int32_t)&gt; CallbackFunction;
</del><ins>+typedef GenericCallback&lt;StringImpl*, bool, int32_t&gt; ValidateCommandCallback;
+typedef GenericCallback&lt;const WebCore::IntRect&amp;, const EditingRange&amp;&gt; RectForCharacterRangeCallback;
</ins><span class="cx"> 
</span><del>-    static PassRefPtr&lt;ValidateCommandCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new ValidateCommandCallback(callback));
-    }
-
-    virtual ~ValidateCommandCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(StringImpl* returnValue1, bool returnValue2, int returnValue3)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, returnValue1, returnValue2, returnValue3);
-
-        m_callback = 0;
-    }
-    
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        m_callback(true, 0, 0, 0);
-        
-        m_callback = 0;
-    }
-
-private:
-
-    ValidateCommandCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-    }
-
-    CallbackFunction m_callback;
-};
-
-// FIXME: Make a version of CallbackBase with two arguments, and define RectForCharacterRangeCallback as a specialization.
-class RectForCharacterRangeCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void (bool, const WebCore::IntRect&amp;, const EditingRange&amp;)&gt; CallbackFunction;
-
-    static PassRefPtr&lt;RectForCharacterRangeCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new RectForCharacterRangeCallback(callback));
-    }
-
-    virtual ~RectForCharacterRangeCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(const WebCore::IntRect&amp; rect, const EditingRange&amp; range)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, rect, range);
-
-        m_callback = 0;
-    }
-    
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        m_callback(true, WebCore::IntRect(), EditingRange());
-
-        m_callback = 0;
-    }
-
-private:
-
-    RectForCharacterRangeCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-    }
-
-    CallbackFunction m_callback;
-};
-
</del><span class="cx"> #if PLATFORM(MAC)
</span><del>-
-// FIXME: Make a version of CallbackBase with two arguments, and define AttributedStringForCharacterRangeCallback as a specialization.
-class AttributedStringForCharacterRangeCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void (bool, const AttributedString&amp;, const EditingRange&amp;)&gt; CallbackFunction;
-
-    static PassRefPtr&lt;AttributedStringForCharacterRangeCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new AttributedStringForCharacterRangeCallback(callback));
-    }
-
-    virtual ~AttributedStringForCharacterRangeCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(const AttributedString&amp; string, const EditingRange&amp; range)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, string, range);
-
-        m_callback = 0;
-    }
-    
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        m_callback(true, AttributedString(), EditingRange());
-
-        m_callback = 0;
-    }
-
-private:
-
-    AttributedStringForCharacterRangeCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-    }
-
-    CallbackFunction m_callback;
-};
-
</del><ins>+typedef GenericCallback&lt;const AttributedString&amp;, const EditingRange&amp;&gt; AttributedStringForCharacterRangeCallback;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-class GestureCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void (bool, const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t)&gt; CallbackFunction;
-
-    static PassRefPtr&lt;GestureCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new GestureCallback(callback));
-    }
-
-    virtual ~GestureCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(const WebCore::IntPoint&amp; returnValue1, uint32_t returnValue2, uint32_t returnValue3, uint32_t returnValue4)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, returnValue1, returnValue2, returnValue3, returnValue4);
-
-        m_callback = 0;
-    }
-
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        m_callback(true, WebCore::IntPoint(), 0, 0, 0);
-
-        m_callback = 0;
-    }
-
-private:
-
-    GestureCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-        ASSERT(m_callback);
-    }
-
-    CallbackFunction m_callback;
-};
-
-class TouchesCallback : public CallbackBase {
-public:
-    typedef std::function&lt;void(bool, const WebCore::IntPoint&amp;, uint32_t)&gt; CallbackFunction;
-
-    static PassRefPtr&lt;TouchesCallback&gt; create(CallbackFunction callback)
-    {
-        return adoptRef(new TouchesCallback(callback));
-    }
-
-    virtual ~TouchesCallback()
-    {
-        ASSERT(!m_callback);
-    }
-
-    void performCallbackWithReturnValue(const WebCore::IntPoint&amp; returnValue1, uint32_t returnValue2)
-    {
-        ASSERT(m_callback);
-
-        m_callback(false, returnValue1, returnValue2);
-
-        m_callback = 0;
-    }
-
-    void invalidate()
-    {
-        ASSERT(m_callback);
-
-        RefPtr&lt;API::Error&gt; error = API::Error::create();
-        m_callback(true, WebCore::IntPoint(), 0);
-        
-        m_callback = 0;
-    }
-    
-private:
-    
-    TouchesCallback(CallbackFunction callback)
-        : m_callback(callback)
-    {
-        ASSERT(m_callback);
-    }
-    
-    CallbackFunction m_callback;
-};
</del><ins>+typedef GenericCallback&lt;const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t&gt; GestureCallback;
+typedef GenericCallback&lt;const WebCore::IntPoint&amp;, uint32_t&gt; TouchesCallback;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> struct WebPageConfiguration {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -1477,7 +1477,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _autocorrectionData.autocorrectionHandler = [completionHandler copy];
</span><del>-    _page-&gt;requestAutocorrectionData(input, AutocorrectionDataCallback::create([self](bool, const Vector&lt;FloatRect&gt;&amp; rects, const String&amp; fontName, double fontSize, uint64_t traits) {
</del><ins>+    _page-&gt;requestAutocorrectionData(input, AutocorrectionDataCallback::create([self](const Vector&lt;FloatRect&gt;&amp; rects, const String&amp; fontName, double fontSize, uint64_t traits, CallbackBase::Error) {
</ins><span class="cx">         CGRect firstRect = CGRectZero;
</span><span class="cx">         CGRect lastRect = CGRectZero;
</span><span class="cx">         if (rects.size()) {
</span><span class="lines">@@ -1540,7 +1540,7 @@
</span><span class="cx"> {
</span><span class="cx">     UIWKDictationContextHandler dictationHandler = [completionHandler copy];
</span><span class="cx"> 
</span><del>-    _page-&gt;requestDictationContext(DictationContextCallback::create([dictationHandler](bool /*error*/, const String&amp; selectedText, const String&amp; beforeText, const String&amp; afterText) {
</del><ins>+    _page-&gt;requestDictationContext(DictationContextCallback::create([dictationHandler](const String&amp; selectedText, const String&amp; beforeText, const String&amp; afterText, CallbackBase::Error) {
</ins><span class="cx">         dictationHandler(selectedText, beforeText, afterText);
</span><span class="cx">         [dictationHandler release];
</span><span class="cx">     }));
</span><span class="lines">@@ -1580,7 +1580,7 @@
</span><span class="cx">         completionHandler([WKAutocorrectionContext autocorrectionContextWithData:beforeText markedText:markedText selectedText:selectedText afterText:afterText selectedRangeInMarkedText:NSMakeRange(location, length)]);
</span><span class="cx">     } else {
</span><span class="cx">         _autocorrectionData.autocorrectionContextHandler = [completionHandler copy];
</span><del>-        _page-&gt;requestAutocorrectionContext(AutocorrectionContextCallback::create([self](bool /*error*/, const String&amp; beforeText, const String&amp; markedText, const String&amp; selectedText, const String&amp; afterText, uint64_t location, uint64_t length) {
</del><ins>+        _page-&gt;requestAutocorrectionContext(AutocorrectionContextCallback::create([self](const String&amp; beforeText, const String&amp; markedText, const String&amp; selectedText, const String&amp; afterText, uint64_t location, uint64_t length, CallbackBase::Error) {
</ins><span class="cx">             _autocorrectionData.autocorrectionContextHandler([WKAutocorrectionContext autocorrectionContextWithData:beforeText markedText:markedText selectedText:selectedText afterText:afterText selectedRangeInMarkedText:NSMakeRange(location, length)]);
</span><span class="cx">         }));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKPrintingViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WKPrintingView.mm (169961 => 169962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKPrintingView.mm        2014-06-14 05:09:37 UTC (rev 169961)
+++ trunk/Source/WebKit2/UIProcess/mac/WKPrintingView.mm        2014-06-14 05:32:07 UTC (rev 169962)
</span><span class="lines">@@ -265,7 +265,7 @@
</span><span class="cx">     _webFrame-&gt;page()-&gt;beginPrinting(_webFrame.get(), printInfo);
</span><span class="cx"> 
</span><span class="cx">     IPCCallbackContext* context = new IPCCallbackContext;
</span><del>-    RefPtr&lt;DataCallback&gt; callback = DataCallback::create([context](bool, API::Data* data) {
</del><ins>+    RefPtr&lt;DataCallback&gt; callback = DataCallback::create([context](API::Data* data, CallbackBase::Error) {
</ins><span class="cx">         ASSERT(RunLoop::isMain());
</span><span class="cx"> 
</span><span class="cx">         OwnPtr&lt;IPCCallbackContext&gt; contextDeleter = adoptPtr(context);
</span><span class="lines">@@ -340,7 +340,7 @@
</span><span class="cx">     ASSERT(!_expectedComputedPagesCallback);
</span><span class="cx"> 
</span><span class="cx">     IPCCallbackContext* context = new IPCCallbackContext;
</span><del>-    RefPtr&lt;ComputedPagesCallback&gt; callback = ComputedPagesCallback::create([context](bool, const Vector&lt;WebCore::IntRect&gt;&amp; pageRects, double totalScaleFactorForPrinting) {
</del><ins>+    RefPtr&lt;ComputedPagesCallback&gt; callback = ComputedPagesCallback::create([context](const Vector&lt;WebCore::IntRect&gt;&amp; pageRects, double totalScaleFactorForPrinting, CallbackBase::Error) {
</ins><span class="cx">         OwnPtr&lt;IPCCallbackContext&gt; contextDeleter = adoptPtr(context);
</span><span class="cx">         pageDidComputePageRects(pageRects, totalScaleFactorForPrinting, context);
</span><span class="cx">     });
</span><span class="lines">@@ -492,7 +492,7 @@
</span><span class="cx">                 _webFrame-&gt;page()-&gt;beginPrinting(_webFrame.get(), PrintInfo([_printOperation printInfo]));
</span><span class="cx"> 
</span><span class="cx">                 IPCCallbackContext* context = new IPCCallbackContext;
</span><del>-                RefPtr&lt;ImageCallback&gt; callback = ImageCallback::create([context](bool, const ShareableBitmap::Handle&amp; imageHandle) {
</del><ins>+                RefPtr&lt;ImageCallback&gt; callback = ImageCallback::create([context](const ShareableBitmap::Handle&amp; imageHandle, CallbackBase::Error) {
</ins><span class="cx">                     OwnPtr&lt;IPCCallbackContext&gt; contextDeleter = adoptPtr(context);
</span><span class="cx">                     pageDidDrawToImage(imageHandle, context);
</span><span class="cx">                 });
</span></span></pre>
</div>
</div>

</body>
</html>