<!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>[202747] trunk</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/202747">202747</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-07-01 12:10:35 -0700 (Fri, 01 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Blob content type not preserved when retrieving blobs from IndexedDB.
&lt;rdar://problem/27057357&gt; and https://bugs.webkit.org/show_bug.cgi?id=159360

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/blob-svg-image.html

* fileapi/Blob.cpp:
(WebCore::Blob::Blob):

* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::postToMainThread):
(WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked): Pass along the content type
  to the blob registry so that if the file-backed blob takes over, it has the content type.
(WebCore::threadableQueue): Deleted.
* fileapi/ThreadableBlobRegistry.h:

* platform/network/BlobRegistry.h:

* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::registerBlobURL):
(WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked):
* platform/network/BlobRegistryImpl.h:

Source/WebKit2:

* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
* WebProcess/FileAPI/BlobRegistryProxy.h:

LayoutTests:

* storage/indexeddb/modern/blob-svg-image-expected.txt: Added.
* storage/indexeddb/modern/blob-svg-image.html: Added.
* storage/indexeddb/modern/resources/blob-svg-image.js: Added.
* storage/indexeddb/modern/resources/blob-svg-image1.html: Added.
* storage/indexeddb/modern/resources/blob-svg-image2.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorefileapiBlobcpp">trunk/Source/WebCore/fileapi/Blob.cpp</a></li>
<li><a href="#trunkSourceWebCorefileapiThreadableBlobRegistrycpp">trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp</a></li>
<li><a href="#trunkSourceWebCorefileapiThreadableBlobRegistryh">trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobRegistryh">trunk/Source/WebCore/platform/network/BlobRegistry.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobRegistryImplcpp">trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobRegistryImplh">trunk/Source/WebCore/platform/network/BlobRegistryImpl.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessFileAPINetworkBlobRegistrycpp">trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessFileAPINetworkBlobRegistryh">trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessh">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessFileAPIBlobRegistryProxycpp">trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessFileAPIBlobRegistryProxyh">trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernblobsvgimageexpectedtxt">trunk/LayoutTests/storage/indexeddb/modern/blob-svg-image-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernblobsvgimagehtml">trunk/LayoutTests/storage/indexeddb/modern/blob-svg-image.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesblobsvgimagejs">trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image.js</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesblobsvgimage1html">trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image1.html</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbmodernresourcesblobsvgimage2html">trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image2.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/LayoutTests/ChangeLog        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-07-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Blob content type not preserved when retrieving blobs from IndexedDB.
+        &lt;rdar://problem/27057357&gt; and https://bugs.webkit.org/show_bug.cgi?id=159360
+
+        Reviewed by Alex Christensen.
+
+        * storage/indexeddb/modern/blob-svg-image-expected.txt: Added.
+        * storage/indexeddb/modern/blob-svg-image.html: Added.
+        * storage/indexeddb/modern/resources/blob-svg-image.js: Added.
+        * storage/indexeddb/modern/resources/blob-svg-image1.html: Added.
+        * storage/indexeddb/modern/resources/blob-svg-image2.html: Added.
+
</ins><span class="cx"> 2016-07-01  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Cleanup inspector/console/console-message.html
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernblobsvgimageexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/blob-svg-image-expected.txt (0 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/blob-svg-image-expected.txt                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/blob-svg-image-expected.txt        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Now let's retrieve the svg image blob.
+  Result is [object Blob]
+Image loaded successfully
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernblobsvgimagehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/blob-svg-image.html (0 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/blob-svg-image.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/blob-svg-image.html        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;html&gt;
+&lt;body&gt;
+&lt;script&gt;
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+    testRunner.setCanOpenWindows();
+    window.open(&quot;resources/blob-svg-image1.html&quot;);
+}
+&lt;/script&gt;
+&lt;button id=&quot;button&quot; onclick='window.open(&quot;resources/blob-svg-image1.html&quot;, &quot;childWindow&quot;);'&gt;Click to start test in new window&lt;/button&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesblobsvgimagejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image.js (0 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image.js                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image.js        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+description(&quot;This tests that retrieving blobs from IDB successfully registers their content type&quot;);
+
+indexedDBTest(prepareDatabase);
+
+var testGenerator;
+var svgData = [&quot;&lt;svg xmlns='http://www.w3.org/2000/svg'&gt;&lt;circle r='200' cx='200' cy='200' stroke='red' stroke-width='1' fill='yellow' /&gt;&lt;/svg&gt;&quot;];
+
+function continueWithEvent(event)
+{
+    testGenerator.next(event);
+}
+
+function asyncContinue()
+{
+    setTimeout(&quot;testGenerator.next();&quot;, 0);
+}
+
+function idbRequest(request)
+{
+    request.onerror = continueWithEvent;
+    request.onsuccess = continueWithEvent;
+}
+
+var db;
+
+function prepareDatabase(event)
+{
+    debug(&quot;Initial upgrade needed: Old version - &quot; + event.oldVersion + &quot; New version - &quot; + event.newVersion);
+    debug(event.target.result.name);
+    db = event.target.result;
+    db.createObjectStore(&quot;TestObjectStore&quot;);
+    event.target.onsuccess = function() {
+        testGenerator = testSteps();
+        testGenerator.next();
+    };
+}
+
+function* testSteps()
+{
+    debug(&quot;Let's create an svg blob and store it in IndexedDB.&quot;);
+
+    blob = new Blob(svgData, { type: &quot;image/svg+xml&quot; });
+
+    var transaction = db.transaction(&quot;TestObjectStore&quot;, &quot;readwrite&quot;);
+    transaction.oncomplete = continueWithEvent;
+    
+    idbRequest(transaction.objectStore(&quot;TestObjectStore&quot;).add(blob, &quot;foo&quot;));
+    event = yield;
+    debug(&quot;Added blob to database&quot;);
+
+    event = yield;
+    debug(&quot;Transaction complete. Now let's navigate the original window to continue the test&quot;);
+
+    blob = null;
+
+    window.opener.location.href = &quot;blob-svg-image2.html&quot;;
+}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesblobsvgimage1html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image1.html (0 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image1.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image1.html        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -0,0 +1,9 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;blob-svg-image.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbmodernresourcesblobsvgimage2html"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image2.html (0 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image2.html                                (rev 0)
+++ trunk/LayoutTests/storage/indexeddb/modern/resources/blob-svg-image2.html        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+&lt;script src=&quot;../../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../resources/shared.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+
+var child;
+
+function waitForChildToBeClosed()
+{
+    if (child &amp;&amp; !child.closed) {
+        setTimeout(waitForChildToBeClosed, 0);
+        return;
+    }
+
+    if (window.testRunner) {
+        gc();
+        finishTheTest();
+    } else {
+        debug(&quot;The original blob object we created will go away after garbage collection. Since we can't reliably cause synchronous GC in the browser, we'll wait 5 seconds before continuing the test.&quot;);
+        setTimeout(finishTheTest, 5000);
+    }
+}
+
+child = window.open(&quot;&quot;, &quot;childWindow&quot;);
+if (child) {
+    child.close();
+    setTimeout(waitForChildToBeClosed, 0);
+}
+
+var testGenerator;
+
+function continueWithEvent(event)
+{
+    testGenerator.next(event);
+}
+
+function asyncContinue()
+{
+    setTimeout(&quot;testGenerator.next();&quot;, 0);
+}
+
+function idbRequest(request)
+{
+    request.onerror = continueWithEvent;
+    request.onsuccess = continueWithEvent;
+}
+
+var db;
+
+function finishTheTest()
+{
+    request = window.indexedDB.open(&quot;blob-svg-image1.html&quot;);
+    request.onsuccess = function(event) {
+        db = event.target.result;
+        testGenerator = testSteps();
+        testGenerator.next();
+    }
+}
+
+function* testSteps()
+{
+    debug(&quot;Now let's retrieve the svg image blob.&quot;);
+
+    objectStore = db.transaction(&quot;TestObjectStore&quot;).objectStore(&quot;TestObjectStore&quot;);
+    idbRequest(objectStore.get(&quot;foo&quot;));
+    event = yield;
+    
+    var blob = event.target.result;
+
+    debug(&quot;  Result is &quot; + blob);
+
+    const url = URL.createObjectURL(blob);
+
+    img = document.createElement(&quot;img&quot;);
+    img.onload = function(event) {
+        debug(&quot;Image loaded successfully&quot;);
+        URL.revokeObjectURL(url);
+        asyncContinue();
+    }
+    img.onerror = function(event) {
+        debug(&quot;Image failed to load&quot;);
+        URL.revokeObjectURL(url);
+        asyncContinue();
+    }
+    
+    img.src = url;
+    document.body.appendChild(img);        
+
+    yield;
+    
+    finishJSTest();
+ }
+ &lt;/script&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebCore/ChangeLog        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2016-07-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Blob content type not preserved when retrieving blobs from IndexedDB.
+        &lt;rdar://problem/27057357&gt; and https://bugs.webkit.org/show_bug.cgi?id=159360
+
+        Reviewed by Alex Christensen.
+
+        Test: storage/indexeddb/modern/blob-svg-image.html
+
+        * fileapi/Blob.cpp:
+        (WebCore::Blob::Blob):
+
+        * fileapi/ThreadableBlobRegistry.cpp:
+        (WebCore::postToMainThread):
+        (WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked): Pass along the content type
+          to the blob registry so that if the file-backed blob takes over, it has the content type.
+        (WebCore::threadableQueue): Deleted.
+        * fileapi/ThreadableBlobRegistry.h:
+
+        * platform/network/BlobRegistry.h:
+
+        * platform/network/BlobRegistryImpl.cpp:
+        (WebCore::BlobRegistryImpl::registerBlobURL):
+        (WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked):
+        * platform/network/BlobRegistryImpl.h:
+
</ins><span class="cx"> 2016-07-01  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make ResourceLoaderOptions derive from FetchOptions
</span></span></pre></div>
<a id="trunkSourceWebCorefileapiBlobcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/fileapi/Blob.cpp (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/fileapi/Blob.cpp        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebCore/fileapi/Blob.cpp        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -103,7 +103,7 @@
</span><span class="cx">     if (fileBackedPath.isEmpty())
</span><span class="cx">         ThreadableBlobRegistry::registerBlobURL(nullptr, m_internalURL, srcURL);
</span><span class="cx">     else
</span><del>-        ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(m_internalURL, srcURL, fileBackedPath);
</del><ins>+        ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(m_internalURL, srcURL, fileBackedPath, m_type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Blob::Blob(const URL&amp; srcURL, long long start, long long end, const String&amp; type)
</span></span></pre></div>
<a id="trunkSourceWebCorefileapiThreadableBlobRegistrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2010 Google Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2013, 2014, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -64,7 +65,7 @@
</span><span class="cx">     return *map;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static CrossThreadQueue&lt;CrossThreadTask&gt;&amp; threadableQueue()
</del><ins>+static void postToMainThread(CrossThreadTask&amp;&amp; task)
</ins><span class="cx"> {
</span><span class="cx">     static std::once_flag onceFlag;
</span><span class="cx">     static CrossThreadQueue&lt;CrossThreadTask&gt;* queue;
</span><span class="lines">@@ -72,7 +73,13 @@
</span><span class="cx">         queue = new CrossThreadQueue&lt;CrossThreadTask&gt;;
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    return *queue;
</del><ins>+    queue-&gt;append(WTFMove(task));
+
+    callOnMainThread([] {
+        auto task = queue-&gt;tryGetMessage();
+        ASSERT(task);
+        task-&gt;performTask();
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ThreadableBlobRegistry::registerFileBlobURL(const URL&amp; url, const String&amp; path, const String&amp; contentType)
</span><span class="lines">@@ -114,19 +121,12 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(const URL&amp; url, const URL&amp; srcURL, const String&amp; fileBackedPath)
</del><ins>+void ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(const URL&amp; url, const URL&amp; srcURL, const String&amp; fileBackedPath, const String&amp; contentType)
</ins><span class="cx"> {
</span><span class="cx">     if (isMainThread())
</span><del>-        blobRegistry().registerBlobURLOptionallyFileBacked(url, srcURL, BlobDataFileReference::create(fileBackedPath));
-    else {
-        threadableQueue().append(createCrossThreadTask(ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked, url, srcURL, fileBackedPath));
-
-        callOnMainThread([] {
-            auto task = threadableQueue().tryGetMessage();
-            ASSERT(task);
-            task-&gt;performTask();
-        });
-    }
</del><ins>+        blobRegistry().registerBlobURLOptionallyFileBacked(url, srcURL, BlobDataFileReference::create(fileBackedPath), contentType);
+    else
+        postToMainThread(createCrossThreadTask(ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked, url, srcURL, fileBackedPath, contentType));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ThreadableBlobRegistry::registerBlobURLForSlice(const URL&amp; newURL, const URL&amp; srcURL, long long start, long long end)
</span></span></pre></div>
<a id="trunkSourceWebCorefileapiThreadableBlobRegistryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.h (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.h        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.h        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2010 Google Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2013, 2014, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -28,8 +29,7 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef ThreadableBlobRegistry_h
-#define ThreadableBlobRegistry_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx">     static void registerFileBlobURL(const URL&amp;, const String&amp; path, const String&amp; contentType);
</span><span class="cx">     static void registerBlobURL(const URL&amp;, Vector&lt;BlobPart&gt; blobParts, const String&amp; contentType);
</span><span class="cx">     static void registerBlobURL(SecurityOrigin*, const URL&amp;, const URL&amp; srcURL);
</span><del>-    static void registerBlobURLOptionallyFileBacked(const URL&amp;, const URL&amp; srcURL, const String&amp; fileBackedPath);
</del><ins>+    static void registerBlobURLOptionallyFileBacked(const URL&amp;, const URL&amp; srcURL, const String&amp; fileBackedPath, const String&amp; contentType);
</ins><span class="cx">     static void registerBlobURLForSlice(const URL&amp; newURL, const URL&amp; srcURL, long long start, long long end);
</span><span class="cx">     static void unregisterBlobURL(const URL&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -57,5 +57,3 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // ThreadableBlobRegistry_h
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobRegistryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobRegistry.h (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobRegistry.h        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebCore/platform/network/BlobRegistry.h        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2010 Google Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2013, 2014, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -58,7 +59,7 @@
</span><span class="cx">     virtual void registerBlobURL(const URL&amp;, const URL&amp; srcURL) = 0;
</span><span class="cx"> 
</span><span class="cx">     // Registers a new blob URL referring to the blob data identified by the specified srcURL or, if none found, referring to the file found at the given path.
</span><del>-    virtual void registerBlobURLOptionallyFileBacked(const URL&amp;, const URL&amp; srcURL, RefPtr&lt;BlobDataFileReference&gt;&amp;&amp;) = 0;
</del><ins>+    virtual void registerBlobURLOptionallyFileBacked(const URL&amp;, const URL&amp; srcURL, RefPtr&lt;BlobDataFileReference&gt;&amp;&amp;, const String&amp; contentType) = 0;
</ins><span class="cx"> 
</span><span class="cx">     // Negative start and end values select from the end.
</span><span class="cx">     virtual void registerBlobURLForSlice(const URL&amp;, const URL&amp; srcURL, long long start, long long end) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobRegistryImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -156,10 +156,10 @@
</span><span class="cx"> 
</span><span class="cx"> void BlobRegistryImpl::registerBlobURL(const URL&amp; url, const URL&amp; srcURL)
</span><span class="cx"> {
</span><del>-    registerBlobURLOptionallyFileBacked(url, srcURL, nullptr);
</del><ins>+    registerBlobURLOptionallyFileBacked(url, srcURL, nullptr, { });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void BlobRegistryImpl::registerBlobURLOptionallyFileBacked(const URL&amp; url, const URL&amp; srcURL, RefPtr&lt;BlobDataFileReference&gt;&amp;&amp; file)
</del><ins>+void BlobRegistryImpl::registerBlobURLOptionallyFileBacked(const URL&amp; url, const URL&amp; srcURL, RefPtr&lt;BlobDataFileReference&gt;&amp;&amp; file, const String&amp; contentType)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMainThread());
</span><span class="cx">     registerBlobResourceHandleConstructor();
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx">     if (!file || file-&gt;path().isEmpty())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    auto backingFile = BlobData::create({ });
</del><ins>+    auto backingFile = BlobData::create(contentType);
</ins><span class="cx">     backingFile-&gt;appendFile(file.releaseNonNull());
</span><span class="cx"> 
</span><span class="cx">     m_blobs.set(url.string(), WTFMove(backingFile));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobRegistryImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobRegistryImpl.h (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobRegistryImpl.h        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebCore/platform/network/BlobRegistryImpl.h        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,5 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  * Copyright (C) 2010 Google Inc. All rights reserved.
</span><ins>+ * Copyright (C) 2013, 2014, 2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions are
</span><span class="lines">@@ -60,7 +61,7 @@
</span><span class="cx">     void registerFileBlobURL(const URL&amp;, Ref&lt;BlobDataFileReference&gt;&amp;&amp;, const String&amp; contentType) override;
</span><span class="cx">     void registerBlobURL(const URL&amp;, Vector&lt;BlobPart&gt;, const String&amp; contentType) override;
</span><span class="cx">     void registerBlobURL(const URL&amp;, const URL&amp; srcURL) override;
</span><del>-    void registerBlobURLOptionallyFileBacked(const URL&amp;, const URL&amp; srcURL, RefPtr&lt;BlobDataFileReference&gt;&amp;&amp;) override;
</del><ins>+    void registerBlobURLOptionallyFileBacked(const URL&amp;, const URL&amp; srcURL, RefPtr&lt;BlobDataFileReference&gt;&amp;&amp;, const String&amp; contentType) override;
</ins><span class="cx">     void registerBlobURLForSlice(const URL&amp;, const URL&amp; srcURL, long long start, long long end) override;
</span><span class="cx">     void unregisterBlobURL(const URL&amp;) override;
</span><span class="cx">     bool isBlobRegistryImpl() const override { return true; }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebKit2/ChangeLog        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-07-01  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Blob content type not preserved when retrieving blobs from IndexedDB.
+        &lt;rdar://problem/27057357&gt; and https://bugs.webkit.org/show_bug.cgi?id=159360
+
+        Reviewed by Alex Christensen.
+
+        * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
+        (WebKit::NetworkBlobRegistry::registerBlobURLOptionallyFileBacked):
+        * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
+
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked):
+        * NetworkProcess/NetworkConnectionToWebProcess.h:
+        * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
+
+        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
+        (WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
+        * WebProcess/FileAPI/BlobRegistryProxy.h:
+
</ins><span class="cx"> 2016-07-01  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Cocoa] Get rid of WK_NULLABLE_SPECIFIER now that all supported compilers understand _Nullable
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessFileAPINetworkBlobRegistrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -84,12 +84,12 @@
</span><span class="cx">     mapIterator-&gt;value.add(url);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkBlobRegistry::registerBlobURLOptionallyFileBacked(NetworkConnectionToWebProcess* connection, const URL&amp; url, const URL&amp; srcURL, const String&amp; fileBackedPath)
</del><ins>+void NetworkBlobRegistry::registerBlobURLOptionallyFileBacked(NetworkConnectionToWebProcess* connection, const URL&amp; url, const URL&amp; srcURL, const String&amp; fileBackedPath, const String&amp; contentType)
</ins><span class="cx"> {
</span><span class="cx">     auto fileReference = connection-&gt;getBlobDataFileReferenceForPath(fileBackedPath);
</span><span class="cx">     ASSERT(fileReference);
</span><span class="cx"> 
</span><del>-    blobRegistry().registerBlobURLOptionallyFileBacked(url, srcURL, WTFMove(fileReference));
</del><ins>+    blobRegistry().registerBlobURLOptionallyFileBacked(url, srcURL, WTFMove(fileReference), contentType);
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(!m_blobsForConnection.get(connection).contains(url));
</span><span class="cx">     BlobForConnectionMap::iterator mapIterator = m_blobsForConnection.find(connection);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessFileAPINetworkBlobRegistryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef NetworkBlobRegistry_h
-#define NetworkBlobRegistry_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/URLHash.h&gt;
</span><span class="cx"> #include &lt;wtf/Function.h&gt;
</span><span class="lines">@@ -50,7 +49,7 @@
</span><span class="cx">     void registerFileBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&amp;, const String&amp; path, RefPtr&lt;SandboxExtension&gt;&amp;&amp;, const String&amp; contentType);
</span><span class="cx">     void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&amp;, Vector&lt;WebCore::BlobPart&gt;, const String&amp; contentType);
</span><span class="cx">     void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&amp;, const WebCore::URL&amp; srcURL);
</span><del>-    void registerBlobURLOptionallyFileBacked(NetworkConnectionToWebProcess*, const WebCore::URL&amp;, const WebCore::URL&amp; srcURL, const String&amp; fileBackedPath);
</del><ins>+    void registerBlobURLOptionallyFileBacked(NetworkConnectionToWebProcess*, const WebCore::URL&amp;, const WebCore::URL&amp; srcURL, const String&amp; fileBackedPath, const String&amp; contentType);
</ins><span class="cx">     void registerBlobURLForSlice(NetworkConnectionToWebProcess*, const WebCore::URL&amp;, const WebCore::URL&amp; srcURL, int64_t start, int64_t end);
</span><span class="cx">     void unregisterBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&amp;);
</span><span class="cx">     uint64_t blobSize(NetworkConnectionToWebProcess*, const WebCore::URL&amp;);
</span><span class="lines">@@ -68,5 +67,3 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span><del>-
-#endif // NetworkBlobRegistry_h
</del></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -286,9 +286,9 @@
</span><span class="cx">     return m_blobDataFileReferences.get(path);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked(const URL&amp; url, const URL&amp; srcURL, const String&amp; fileBackedPath)
</del><ins>+void NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked(const URL&amp; url, const URL&amp; srcURL, const String&amp; fileBackedPath, const String&amp; contentType)
</ins><span class="cx"> {
</span><del>-    NetworkBlobRegistry::singleton().registerBlobURLOptionallyFileBacked(this, url, srcURL, fileBackedPath);
</del><ins>+    NetworkBlobRegistry::singleton().registerBlobURLOptionallyFileBacked(this, url, srcURL, fileBackedPath, contentType);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void NetworkConnectionToWebProcess::registerBlobURLForSlice(const URL&amp; url, const URL&amp; srcURL, int64_t start, int64_t end)
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef NetworkConnectionToWebProcess_h
-#define NetworkConnectionToWebProcess_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;BlockingResponseMap.h&quot;
</span><span class="cx"> #include &quot;Connection.h&quot;
</span><span class="lines">@@ -95,7 +94,7 @@
</span><span class="cx">     void registerBlobURL(const WebCore::URL&amp;, Vector&lt;WebCore::BlobPart&gt;, const String&amp; contentType);
</span><span class="cx">     void registerBlobURLFromURL(const WebCore::URL&amp;, const WebCore::URL&amp; srcURL);
</span><span class="cx">     void preregisterSandboxExtensionsForOptionallyFileBackedBlob(const Vector&lt;String&gt;&amp; fileBackedPath, const SandboxExtension::HandleArray&amp;);
</span><del>-    void registerBlobURLOptionallyFileBacked(const WebCore::URL&amp;, const WebCore::URL&amp; srcURL, const String&amp; fileBackedPath);
</del><ins>+    void registerBlobURLOptionallyFileBacked(const WebCore::URL&amp;, const WebCore::URL&amp; srcURL, const String&amp; fileBackedPath, const String&amp; contentType);
</ins><span class="cx">     void registerBlobURLForSlice(const WebCore::URL&amp;, const WebCore::URL&amp; srcURL, int64_t start, int64_t end);
</span><span class="cx">     void blobSize(const WebCore::URL&amp;, uint64_t&amp; resultSize);
</span><span class="cx">     void unregisterBlobURL(const WebCore::URL&amp;);
</span><span class="lines">@@ -110,5 +109,3 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><del>-
-#endif // NetworkConnectionToWebProcess_h
</del></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">     RegisterBlobURL(WebCore::URL url, Vector&lt;WebCore::BlobPart&gt; blobParts, String contentType)
</span><span class="cx">     RegisterBlobURLFromURL(WebCore::URL url, WebCore::URL srcURL)
</span><span class="cx">     PreregisterSandboxExtensionsForOptionallyFileBackedBlob(Vector&lt;String&gt; filePaths, WebKit::SandboxExtension::HandleArray extensionHandles)
</span><del>-    RegisterBlobURLOptionallyFileBacked(WebCore::URL url, WebCore::URL srcURL, String fileBackedPath)
</del><ins>+    RegisterBlobURLOptionallyFileBacked(WebCore::URL url, WebCore::URL srcURL, String fileBackedPath, String contentType)
</ins><span class="cx">     RegisterBlobURLForSlice(WebCore::URL url, WebCore::URL srcURL, int64_t start, int64_t end)
</span><span class="cx">     UnregisterBlobURL(WebCore::URL url)
</span><span class="cx">     BlobSize(WebCore::URL url) -&gt; (uint64_t resultSize)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessFileAPIBlobRegistryProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -57,10 +57,10 @@
</span><span class="cx">     WebProcess::singleton().networkConnection()-&gt;connection()-&gt;send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL(url, srcURL), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void BlobRegistryProxy::registerBlobURLOptionallyFileBacked(const URL&amp; url, const URL&amp; srcURL, RefPtr&lt;WebCore::BlobDataFileReference&gt;&amp;&amp; file)
</del><ins>+void BlobRegistryProxy::registerBlobURLOptionallyFileBacked(const URL&amp; url, const URL&amp; srcURL, RefPtr&lt;WebCore::BlobDataFileReference&gt;&amp;&amp; file, const String&amp; contentType)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(file);
</span><del>-    WebProcess::singleton().networkConnection()-&gt;connection()-&gt;send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLOptionallyFileBacked(url, srcURL, file-&gt;path()), 0);
</del><ins>+    WebProcess::singleton().networkConnection()-&gt;connection()-&gt;send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLOptionallyFileBacked(url, srcURL, file-&gt;path(), contentType), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void BlobRegistryProxy::unregisterBlobURL(const URL&amp; url)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessFileAPIBlobRegistryProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h (202746 => 202747)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h        2016-07-01 19:07:20 UTC (rev 202746)
+++ trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h        2016-07-01 19:10:35 UTC (rev 202747)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef BlobRegistryProxy_h
-#define BlobRegistryProxy_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/BlobRegistry.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -35,7 +34,7 @@
</span><span class="cx">     void registerFileBlobURL(const WebCore::URL&amp;, Ref&lt;WebCore::BlobDataFileReference&gt;&amp;&amp;, const String&amp; contentType) override;
</span><span class="cx">     void registerBlobURL(const WebCore::URL&amp;, Vector&lt;WebCore::BlobPart&gt;, const String&amp; contentType) override;
</span><span class="cx">     void registerBlobURL(const WebCore::URL&amp;, const WebCore::URL&amp; srcURL) override;
</span><del>-    void registerBlobURLOptionallyFileBacked(const WebCore::URL&amp;, const WebCore::URL&amp; srcURL, RefPtr&lt;WebCore::BlobDataFileReference&gt;&amp;&amp;) override;
</del><ins>+    void registerBlobURLOptionallyFileBacked(const WebCore::URL&amp;, const WebCore::URL&amp; srcURL, RefPtr&lt;WebCore::BlobDataFileReference&gt;&amp;&amp;, const String&amp; contentType) override;
</ins><span class="cx">     void unregisterBlobURL(const WebCore::URL&amp;) override;
</span><span class="cx">     void registerBlobURLForSlice(const WebCore::URL&amp;, const WebCore::URL&amp; srcURL, long long start, long long end) override;
</span><span class="cx">     unsigned long long blobSize(const WebCore::URL&amp;) override;
</span><span class="lines">@@ -43,5 +42,3 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span><del>-
-#endif // BlobRegistryProxy_h
</del></span></pre>
</div>
</div>

</body>
</html>