<!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>[191408] 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/191408">191408</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-10-21 15:30:01 -0700 (Wed, 21 Oct 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Get rid of useBinaryEncoding from WKPageGetContentsAsMHTMLData
https://bugs.webkit.org/show_bug.cgi?id=150417

Reviewed by Tim Horton.

The useBinaryEncoding parameter is always false, so just get rid of it.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetContentsAsMHTMLData):
* UIProcess/API/C/WKPage.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_page_contents_get):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_save):
(webkit_web_view_save_to_file):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getContentsAsMHTMLData):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::getContentsAsMHTMLData):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:</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="#trunkSourceWebKit2UIProcessAPICWKPageh">trunk/Source/WebKit2/UIProcess/API/C/WKPage.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflewk_viewcpp">trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.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="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.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 (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/ChangeLog        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -1,5 +1,30 @@
</span><span class="cx"> 2015-10-21  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Get rid of useBinaryEncoding from WKPageGetContentsAsMHTMLData
+        https://bugs.webkit.org/show_bug.cgi?id=150417
+
+        Reviewed by Tim Horton.
+
+        The useBinaryEncoding parameter is always false, so just get rid of it.
+
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageGetContentsAsMHTMLData):
+        * UIProcess/API/C/WKPage.h:
+        * UIProcess/API/efl/ewk_view.cpp:
+        (ewk_view_page_contents_get):
+        * UIProcess/API/gtk/WebKitWebView.cpp:
+        (webkit_web_view_save):
+        (webkit_web_view_save_to_file):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::getContentsAsMHTMLData):
+        * UIProcess/WebPageProxy.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::getContentsAsMHTMLData):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+
+2015-10-21  Anders Carlsson  &lt;andersca@apple.com&gt;
+
</ins><span class="cx">         WebContextMenuProxyMac::setupServicesMenu doesn't need to take a context parameter
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=150418
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -2185,13 +2185,12 @@
</span><span class="cx">     toImpl(pageRef)-&gt;getSelectionAsWebArchiveData(toGenericCallbackFunction(context, callback));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageGetContentsAsMHTMLData(WKPageRef pageRef, bool useBinaryEncoding, void* context, WKPageGetContentsAsMHTMLDataFunction callback)
</del><ins>+void WKPageGetContentsAsMHTMLData(WKPageRef pageRef, void* context, WKPageGetContentsAsMHTMLDataFunction callback)
</ins><span class="cx"> {
</span><span class="cx"> #if ENABLE(MHTML)
</span><del>-    toImpl(pageRef)-&gt;getContentsAsMHTMLData(toGenericCallbackFunction(context, callback), useBinaryEncoding);
</del><ins>+    toImpl(pageRef)-&gt;getContentsAsMHTMLData(toGenericCallbackFunction(context, callback));
</ins><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(pageRef);
</span><del>-    UNUSED_PARAM(useBinaryEncoding);
</del><span class="cx">     UNUSED_PARAM(context);
</span><span class="cx">     UNUSED_PARAM(callback);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.h (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.h        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.h        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx"> WK_EXPORT void WKPageGetContentsAsString(WKPageRef page, void* context, WKPageGetContentsAsStringFunction function);
</span><span class="cx"> 
</span><span class="cx"> typedef void (*WKPageGetContentsAsMHTMLDataFunction)(WKDataRef, WKErrorRef, void*);
</span><del>-WK_EXPORT void WKPageGetContentsAsMHTMLData(WKPageRef page, bool useBinaryEncoding, void* context, WKPageGetContentsAsMHTMLDataFunction function);
</del><ins>+WK_EXPORT void WKPageGetContentsAsMHTMLData(WKPageRef page, void* context, WKPageGetContentsAsMHTMLDataFunction function);
</ins><span class="cx"> 
</span><span class="cx"> typedef void (*WKPageGetSelectionAsWebArchiveDataFunction)(WKDataRef, WKErrorRef, void*);
</span><span class="cx"> WK_EXPORT void WKPageGetSelectionAsWebArchiveData(WKPageRef page, void* context, WKPageGetSelectionAsWebArchiveDataFunction function);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflewk_viewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -644,7 +644,7 @@
</span><span class="cx"> 
</span><span class="cx">     switch (context-&gt;type) {
</span><span class="cx">     case EWK_PAGE_CONTENTS_TYPE_MHTML:
</span><del>-        WKPageGetContentsAsMHTMLData(impl-&gt;wkPage(), false, context, ewkViewPageContentsAsMHTMLCallback);
</del><ins>+        WKPageGetContentsAsMHTMLData(impl-&gt;wkPage(), context, ewkViewPageContentsAsMHTMLCallback);
</ins><span class="cx">         break;
</span><span class="cx">     case EWK_PAGE_CONTENTS_TYPE_STRING:
</span><span class="cx">         WKPageGetContentsAsString(impl-&gt;wkPage(), context, ewkViewPageContentsAsStringCallback);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -3328,7 +3328,7 @@
</span><span class="cx">     g_task_set_task_data(task, createViewSaveAsyncData(), reinterpret_cast&lt;GDestroyNotify&gt;(destroyViewSaveAsyncData));
</span><span class="cx">     getPage(webView)-&gt;getContentsAsMHTMLData([task](API::Data* data, WebKit::CallbackBase::Error) {
</span><span class="cx">         getContentsAsMHTMLDataCallback(data, task);
</span><del>-    }, false);
</del><ins>+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -3393,7 +3393,7 @@
</span><span class="cx"> 
</span><span class="cx">     getPage(webView)-&gt;getContentsAsMHTMLData([task](API::Data* data, WebKit::CallbackBase::Error) {
</span><span class="cx">         getContentsAsMHTMLDataCallback(data, task);
</span><del>-    }, false);
</del><ins>+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -2639,7 +2639,7 @@
</span><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> #if ENABLE(MHTML)
</span><del>-void WebPageProxy::getContentsAsMHTMLData(std::function&lt;void (API::Data*, CallbackBase::Error)&gt; callbackFunction, bool useBinaryEncoding)
</del><ins>+void WebPageProxy::getContentsAsMHTMLData(std::function&lt;void (API::Data*, CallbackBase::Error)&gt; callbackFunction)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid()) {
</span><span class="cx">         callbackFunction(nullptr, CallbackBase::Error::Unknown);
</span><span class="lines">@@ -2647,7 +2647,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     uint64_t callbackID = m_callbacks.put(WTF::move(callbackFunction), m_process-&gt;throttler().backgroundActivityToken());
</span><del>-    m_process-&gt;send(Messages::WebPage::GetContentsAsMHTMLData(callbackID, useBinaryEncoding), m_pageID);
</del><ins>+    m_process-&gt;send(Messages::WebPage::GetContentsAsMHTMLData(callbackID), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -752,7 +752,7 @@
</span><span class="cx">     void getBytecodeProfile(std::function&lt;void (const String&amp;, CallbackBase::Error)&gt;);
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MHTML)
</span><del>-    void getContentsAsMHTMLData(std::function&lt;void (API::Data*, CallbackBase::Error)&gt;, bool useBinaryEncoding);
</del><ins>+    void getContentsAsMHTMLData(std::function&lt;void (API::Data*, CallbackBase::Error)&gt;);
</ins><span class="cx"> #endif
</span><span class="cx">     void getMainResourceDataOfFrame(WebFrameProxy*, std::function&lt;void (API::Data*, CallbackBase::Error)&gt;);
</span><span class="cx">     void getResourceDataFromFrame(WebFrameProxy*, API::URL*, std::function&lt;void (API::Data*, CallbackBase::Error)&gt;);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -2524,11 +2524,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(MHTML)
</span><del>-void WebPage::getContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding)
</del><ins>+void WebPage::getContentsAsMHTMLData(uint64_t callbackID)
</ins><span class="cx"> {
</span><del>-    RefPtr&lt;SharedBuffer&gt; buffer = useBinaryEncoding
-        ? MHTMLArchive::generateMHTMLDataUsingBinaryEncoding(m_page.get())
-        : MHTMLArchive::generateMHTMLData(m_page.get());
</del><ins>+    RefPtr&lt;SharedBuffer&gt; buffer = MHTMLArchive::generateMHTMLData(m_page.get());
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Use SharedBufferDataReference.
</span><span class="cx">     IPC::DataReference dataReference;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -1038,7 +1038,7 @@
</span><span class="cx"> 
</span><span class="cx">     void getContentsAsString(uint64_t callbackID);
</span><span class="cx"> #if ENABLE(MHTML)
</span><del>-    void getContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding);
</del><ins>+    void getContentsAsMHTMLData(uint64_t callbackID);
</ins><span class="cx"> #endif
</span><span class="cx">     void getMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID);
</span><span class="cx">     void getResourceDataFromFrame(uint64_t frameID, const String&amp; resourceURL, uint64_t callbackID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (191407 => 191408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2015-10-21 22:17:03 UTC (rev 191407)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2015-10-21 22:30:01 UTC (rev 191408)
</span><span class="lines">@@ -149,7 +149,7 @@
</span><span class="cx">     # Callbacks.
</span><span class="cx">     GetContentsAsString(uint64_t callbackID)
</span><span class="cx"> #if ENABLE(MHTML)
</span><del>-    GetContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding)
</del><ins>+    GetContentsAsMHTMLData(uint64_t callbackID)
</ins><span class="cx"> #endif
</span><span class="cx">     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
</span><span class="cx">     GetResourceDataFromFrame(uint64_t frameID, String resourceURL, uint64_t callbackID)
</span></span></pre>
</div>
</div>

</body>
</html>