<!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.
<rdar://problem/27057357> 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 <beidson@apple.com>
+
+ Blob content type not preserved when retrieving blobs from IndexedDB.
+ <rdar://problem/27057357> 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 <pecoraro@apple.com>
</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>+<html>
+<body>
+<script>
+if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ testRunner.setCanOpenWindows();
+ window.open("resources/blob-svg-image1.html");
+}
+</script>
+<button id="button" onclick='window.open("resources/blob-svg-image1.html", "childWindow");'>Click to start test in new window</button>
+</body>
+</html>
</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("This tests that retrieving blobs from IDB successfully registers their content type");
+
+indexedDBTest(prepareDatabase);
+
+var testGenerator;
+var svgData = ["<svg xmlns='http://www.w3.org/2000/svg'><circle r='200' cx='200' cy='200' stroke='red' stroke-width='1' fill='yellow' /></svg>"];
+
+function continueWithEvent(event)
+{
+ testGenerator.next(event);
+}
+
+function asyncContinue()
+{
+ setTimeout("testGenerator.next();", 0);
+}
+
+function idbRequest(request)
+{
+ request.onerror = continueWithEvent;
+ request.onsuccess = continueWithEvent;
+}
+
+var db;
+
+function prepareDatabase(event)
+{
+ debug("Initial upgrade needed: Old version - " + event.oldVersion + " New version - " + event.newVersion);
+ debug(event.target.result.name);
+ db = event.target.result;
+ db.createObjectStore("TestObjectStore");
+ event.target.onsuccess = function() {
+ testGenerator = testSteps();
+ testGenerator.next();
+ };
+}
+
+function* testSteps()
+{
+ debug("Let's create an svg blob and store it in IndexedDB.");
+
+ blob = new Blob(svgData, { type: "image/svg+xml" });
+
+ var transaction = db.transaction("TestObjectStore", "readwrite");
+ transaction.oncomplete = continueWithEvent;
+
+ idbRequest(transaction.objectStore("TestObjectStore").add(blob, "foo"));
+ event = yield;
+ debug("Added blob to database");
+
+ event = yield;
+ debug("Transaction complete. Now let's navigate the original window to continue the test");
+
+ blob = null;
+
+ window.opener.location.href = "blob-svg-image2.html";
+}
</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>+<html>
+<head>
+<script src="../../../../resources/js-test.js"></script>
+<script src="../../resources/shared.js"></script>
+</head>
+<body>
+<script src="blob-svg-image.js"></script>
+</body>
+</html>
</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>+<script src="../../../../resources/js-test.js"></script>
+<script src="../../resources/shared.js"></script>
+<script>
+
+var child;
+
+function waitForChildToBeClosed()
+{
+ if (child && !child.closed) {
+ setTimeout(waitForChildToBeClosed, 0);
+ return;
+ }
+
+ if (window.testRunner) {
+ gc();
+ finishTheTest();
+ } else {
+ debug("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.");
+ setTimeout(finishTheTest, 5000);
+ }
+}
+
+child = window.open("", "childWindow");
+if (child) {
+ child.close();
+ setTimeout(waitForChildToBeClosed, 0);
+}
+
+var testGenerator;
+
+function continueWithEvent(event)
+{
+ testGenerator.next(event);
+}
+
+function asyncContinue()
+{
+ setTimeout("testGenerator.next();", 0);
+}
+
+function idbRequest(request)
+{
+ request.onerror = continueWithEvent;
+ request.onsuccess = continueWithEvent;
+}
+
+var db;
+
+function finishTheTest()
+{
+ request = window.indexedDB.open("blob-svg-image1.html");
+ request.onsuccess = function(event) {
+ db = event.target.result;
+ testGenerator = testSteps();
+ testGenerator.next();
+ }
+}
+
+function* testSteps()
+{
+ debug("Now let's retrieve the svg image blob.");
+
+ objectStore = db.transaction("TestObjectStore").objectStore("TestObjectStore");
+ idbRequest(objectStore.get("foo"));
+ event = yield;
+
+ var blob = event.target.result;
+
+ debug(" Result is " + blob);
+
+ const url = URL.createObjectURL(blob);
+
+ img = document.createElement("img");
+ img.onload = function(event) {
+ debug("Image loaded successfully");
+ URL.revokeObjectURL(url);
+ asyncContinue();
+ }
+ img.onerror = function(event) {
+ debug("Image failed to load");
+ URL.revokeObjectURL(url);
+ asyncContinue();
+ }
+
+ img.src = url;
+ document.body.appendChild(img);
+
+ yield;
+
+ finishJSTest();
+ }
+ </script>
</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 <beidson@apple.com>
+
+ Blob content type not preserved when retrieving blobs from IndexedDB.
+ <rdar://problem/27057357> 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 <youenn@apple.com>
</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& srcURL, long long start, long long end, const String& 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<CrossThreadTask>& threadableQueue()
</del><ins>+static void postToMainThread(CrossThreadTask&& task)
</ins><span class="cx"> {
</span><span class="cx"> static std::once_flag onceFlag;
</span><span class="cx"> static CrossThreadQueue<CrossThreadTask>* queue;
</span><span class="lines">@@ -72,7 +73,13 @@
</span><span class="cx"> queue = new CrossThreadQueue<CrossThreadTask>;
</span><span class="cx"> });
</span><span class="cx">
</span><del>- return *queue;
</del><ins>+ queue->append(WTFMove(task));
+
+ callOnMainThread([] {
+ auto task = queue->tryGetMessage();
+ ASSERT(task);
+ task->performTask();
+ });
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ThreadableBlobRegistry::registerFileBlobURL(const URL& url, const String& path, const String& 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& url, const URL& srcURL, const String& fileBackedPath)
</del><ins>+void ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, const String& fileBackedPath, const String& 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->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& newURL, const URL& 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 <wtf/Forward.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> static void registerFileBlobURL(const URL&, const String& path, const String& contentType);
</span><span class="cx"> static void registerBlobURL(const URL&, Vector<BlobPart> blobParts, const String& contentType);
</span><span class="cx"> static void registerBlobURL(SecurityOrigin*, const URL&, const URL& srcURL);
</span><del>- static void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, const String& fileBackedPath);
</del><ins>+ static void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, const String& fileBackedPath, const String& contentType);
</ins><span class="cx"> static void registerBlobURLForSlice(const URL& newURL, const URL& srcURL, long long start, long long end);
</span><span class="cx"> static void unregisterBlobURL(const URL&);
</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&, const URL& 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&, const URL& srcURL, RefPtr<BlobDataFileReference>&&) = 0;
</del><ins>+ virtual void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& 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&, const URL& 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& url, const URL& 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& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& file)
</del><ins>+void BlobRegistryImpl::registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& file, const String& 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->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->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&, Ref<BlobDataFileReference>&&, const String& contentType) override;
</span><span class="cx"> void registerBlobURL(const URL&, Vector<BlobPart>, const String& contentType) override;
</span><span class="cx"> void registerBlobURL(const URL&, const URL& srcURL) override;
</span><del>- void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&) override;
</del><ins>+ void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& contentType) override;
</ins><span class="cx"> void registerBlobURLForSlice(const URL&, const URL& srcURL, long long start, long long end) override;
</span><span class="cx"> void unregisterBlobURL(const URL&) 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 <beidson@apple.com>
+
+ Blob content type not preserved when retrieving blobs from IndexedDB.
+ <rdar://problem/27057357> 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 <mitz@apple.com>
</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->value.add(url);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void NetworkBlobRegistry::registerBlobURLOptionallyFileBacked(NetworkConnectionToWebProcess* connection, const URL& url, const URL& srcURL, const String& fileBackedPath)
</del><ins>+void NetworkBlobRegistry::registerBlobURLOptionallyFileBacked(NetworkConnectionToWebProcess* connection, const URL& url, const URL& srcURL, const String& fileBackedPath, const String& contentType)
</ins><span class="cx"> {
</span><span class="cx"> auto fileReference = connection->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 <WebCore/URLHash.h>
</span><span class="cx"> #include <wtf/Function.h>
</span><span class="lines">@@ -50,7 +49,7 @@
</span><span class="cx"> void registerFileBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, const String& path, RefPtr<SandboxExtension>&&, const String& contentType);
</span><span class="cx"> void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, Vector<WebCore::BlobPart>, const String& contentType);
</span><span class="cx"> void registerBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&, const WebCore::URL& srcURL);
</span><del>- void registerBlobURLOptionallyFileBacked(NetworkConnectionToWebProcess*, const WebCore::URL&, const WebCore::URL& srcURL, const String& fileBackedPath);
</del><ins>+ void registerBlobURLOptionallyFileBacked(NetworkConnectionToWebProcess*, const WebCore::URL&, const WebCore::URL& srcURL, const String& fileBackedPath, const String& contentType);
</ins><span class="cx"> void registerBlobURLForSlice(NetworkConnectionToWebProcess*, const WebCore::URL&, const WebCore::URL& srcURL, int64_t start, int64_t end);
</span><span class="cx"> void unregisterBlobURL(NetworkConnectionToWebProcess*, const WebCore::URL&);
</span><span class="cx"> uint64_t blobSize(NetworkConnectionToWebProcess*, const WebCore::URL&);
</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& url, const URL& srcURL, const String& fileBackedPath)
</del><ins>+void NetworkConnectionToWebProcess::registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, const String& fileBackedPath, const String& 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& url, const URL& 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 "BlockingResponseMap.h"
</span><span class="cx"> #include "Connection.h"
</span><span class="lines">@@ -95,7 +94,7 @@
</span><span class="cx"> void registerBlobURL(const WebCore::URL&, Vector<WebCore::BlobPart>, const String& contentType);
</span><span class="cx"> void registerBlobURLFromURL(const WebCore::URL&, const WebCore::URL& srcURL);
</span><span class="cx"> void preregisterSandboxExtensionsForOptionallyFileBackedBlob(const Vector<String>& fileBackedPath, const SandboxExtension::HandleArray&);
</span><del>- void registerBlobURLOptionallyFileBacked(const WebCore::URL&, const WebCore::URL& srcURL, const String& fileBackedPath);
</del><ins>+ void registerBlobURLOptionallyFileBacked(const WebCore::URL&, const WebCore::URL& srcURL, const String& fileBackedPath, const String& contentType);
</ins><span class="cx"> void registerBlobURLForSlice(const WebCore::URL&, const WebCore::URL& srcURL, int64_t start, int64_t end);
</span><span class="cx"> void blobSize(const WebCore::URL&, uint64_t& resultSize);
</span><span class="cx"> void unregisterBlobURL(const WebCore::URL&);
</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<WebCore::BlobPart> blobParts, String contentType)
</span><span class="cx"> RegisterBlobURLFromURL(WebCore::URL url, WebCore::URL srcURL)
</span><span class="cx"> PreregisterSandboxExtensionsForOptionallyFileBackedBlob(Vector<String> 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) -> (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()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL(url, srcURL), 0);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void BlobRegistryProxy::registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<WebCore::BlobDataFileReference>&& file)
</del><ins>+void BlobRegistryProxy::registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<WebCore::BlobDataFileReference>&& file, const String& contentType)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(file);
</span><del>- WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLOptionallyFileBacked(url, srcURL, file->path()), 0);
</del><ins>+ WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLOptionallyFileBacked(url, srcURL, file->path(), contentType), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void BlobRegistryProxy::unregisterBlobURL(const URL& 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 <WebCore/BlobRegistry.h>
</span><span class="cx">
</span><span class="lines">@@ -35,7 +34,7 @@
</span><span class="cx"> void registerFileBlobURL(const WebCore::URL&, Ref<WebCore::BlobDataFileReference>&&, const String& contentType) override;
</span><span class="cx"> void registerBlobURL(const WebCore::URL&, Vector<WebCore::BlobPart>, const String& contentType) override;
</span><span class="cx"> void registerBlobURL(const WebCore::URL&, const WebCore::URL& srcURL) override;
</span><del>- void registerBlobURLOptionallyFileBacked(const WebCore::URL&, const WebCore::URL& srcURL, RefPtr<WebCore::BlobDataFileReference>&&) override;
</del><ins>+ void registerBlobURLOptionallyFileBacked(const WebCore::URL&, const WebCore::URL& srcURL, RefPtr<WebCore::BlobDataFileReference>&&, const String& contentType) override;
</ins><span class="cx"> void unregisterBlobURL(const WebCore::URL&) override;
</span><span class="cx"> void registerBlobURLForSlice(const WebCore::URL&, const WebCore::URL& srcURL, long long start, long long end) override;
</span><span class="cx"> unsigned long long blobSize(const WebCore::URL&) 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>