Diff
Modified: trunk/LayoutTests/ChangeLog (208512 => 208513)
--- trunk/LayoutTests/ChangeLog 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/ChangeLog 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1,3 +1,16 @@
+2016-11-09 Alex Christensen <[email protected]>
+
+ Unreviewed, rolling out r208438.
+
+ crashes
+
+ Reverted changeset:
+
+ "[WK2][NETWORK_SESSION] Add support for downloading file
+ backed blobs"
+ https://bugs.webkit.org/show_bug.cgi?id=164458
+ http://trac.webkit.org/changeset/208438
+
2016-11-09 Ryan Haddad <[email protected]>
Marking two media/modern-media-controls tests as flaky.
Deleted: trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-expected.txt (208512 => 208513)
--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-expected.txt 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download-expected.txt 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1,6 +0,0 @@
-Download started.
-Downloading URL with suggested filename "unknown"
-Download completed.
-The download should succeed.
-
-File backed blob URL
Deleted: trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html (208512 => 208513)
--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script type='text/_javascript_'>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
- testRunner.setShouldDownloadUndisplayableMIMETypes(true);
-}
-</script>
-</head>
-<body>
-<p>The download should succeed.</p>
-<a id="blob-url">File backed blob URL</a>
-<script>
-function click(elmt)
-{
- if (!window.eventSender) {
- alert('Click the link to run the test.');
- return;
- }
- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
- eventSender.mouseDown();
- eventSender.mouseUp();
-}
-
-function runTest()
-{
- file = internals.createFile("../../../resources/Ahem.otf");
- var link = document.getElementById("blob-url");
- link.href = ""
- click(link);
-}
-runTest();
-</script>
-</body>
-</html>
Deleted: trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-expected.txt (208512 => 208513)
--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-expected.txt 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-expected.txt 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1,6 +0,0 @@
-Download started.
-Downloading URL with suggested filename "abe.png"
-Download completed.
-The suggested filename above should be "abe.png" and the download should succeed.
-
-File backed blob URL
Deleted: trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download.html (208512 => 208513)
--- trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download.html 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download.html 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1,36 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script type='text/_javascript_'>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-</script>
-</head>
-<body>
-<p>The suggested filename above should be "abe.png" and the download should succeed.</p>
-<a id="blob-url" download="abe.png">File backed blob URL</a>
-<script>
-function click(elmt)
-{
- if (!window.eventSender) {
- alert('Click the link to run the test.');
- return;
- }
- eventSender.mouseMoveTo(elmt.offsetLeft + 5, elmt.offsetTop + 5);
- eventSender.mouseDown();
- eventSender.mouseUp();
-}
-
-function runTest()
-{
- file = internals.createFile("../resources/abe.png");
- var link = document.getElementById("blob-url");
- link.href = ""
- click(link);
-}
-runTest();
-</script>
-</body>
-</html>
Modified: trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations (208512 => 208513)
--- trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1332,7 +1332,6 @@
# <a download> is not supported in WK1 yet.
webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ]
webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html [ Skip ]
-webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-file-blob-download.html [ Skip ]
webkit.org/b/156069 http/tests/download/area-download.html [ Skip ]
webkit.org/b/156069 http/tests/security/anchor-download-allow-blob.html [ Skip ]
webkit.org/b/156069 http/tests/security/anchor-download-allow-data.html [ Skip ]
@@ -1339,9 +1338,6 @@
webkit.org/b/156069 http/tests/security/anchor-download-allow-sameorigin.html [ Skip ]
webkit.org/b/156069 http/tests/security/anchor-download-block-crossorigin.html [ Skip ]
-# testRunner.setShouldDownloadUndisplayableMIMETypes() is not supported on WK1.
-fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html [ Skip ]
-
webkit.org/b/137572 scrollbars/scrollbar-iframe-click-does-not-blur-content.html [ Failure ]
# This test relies on a settings option that we can only set with WKRT.
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (208512 => 208513)
--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1815,8 +1815,6 @@
# <a download> does not work on iOS.
webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-unset.html [ Skip ]
webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download.html [ Skip ]
-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html [ Skip ]
-webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-file-blob-download.html [ Skip ]
webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload-set.html [ Skip ]
webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload.html [ Skip ]
webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ]
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (208512 => 208513)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-11-10 01:21:56 UTC (rev 208513)
@@ -197,7 +197,6 @@
webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download.html [ Failure ]
webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ]
webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html [ Skip ]
-webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-file-blob-download.html [ Skip ]
webkit.org/b/156069 http/tests/download/area-download.html [ Skip ]
webkit.org/b/156069 http/tests/security/anchor-download-allow-blob.html [ Skip ]
webkit.org/b/156069 http/tests/security/anchor-download-allow-data.html [ Skip ]
@@ -204,9 +203,6 @@
webkit.org/b/156069 http/tests/security/anchor-download-allow-sameorigin.html [ Skip ]
webkit.org/b/156069 http/tests/security/anchor-download-block-crossorigin.html [ Skip ]
-# testRunner.setShouldDownloadUndisplayableMIMETypes() is not supported on WK1.
-fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html [ Skip ]
-
webkit.org/b/156629 imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/sizes/parse-a-sizes-attribute.html [ Pass Failure ]
webkit.org/b/157007 fast/layers/no-clipping-overflow-hidden-added-after-transform.html [ Pass ImageOnlyFailure ]
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (208512 => 208513)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2016-11-10 01:21:56 UTC (rev 208513)
@@ -494,10 +494,6 @@
# rdar://problem/26885345
[ Sierra+ ] media/click-placeholder-not-pausing.html [ Pass ]
-# Download of file backed blob URLs is broken for !NETWORK_SESSION code path.
-webkit.org/b/164522 [ Yosemite ElCapitan ] fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html [ Failure ]
-webkit.org/b/164522 [ Yosemite ElCapitan ] fast/dom/HTMLAnchorElement/anchor-file-blob-download.html [ Failure ]
-
# RTL Scrollbars are enabled on Sierra WebKit2.
[ Sierra+ ] fast/scrolling/rtl-scrollbars.html [ Pass ]
[ Sierra+ ] fast/scrolling/rtl-scrollbars-simple.html [ Pass ]
Modified: trunk/LayoutTests/platform/win/TestExpectations (208512 => 208513)
--- trunk/LayoutTests/platform/win/TestExpectations 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/LayoutTests/platform/win/TestExpectations 2016-11-10 01:21:56 UTC (rev 208513)
@@ -447,14 +447,10 @@
fast/dom/HTMLAnchorElement/anchor-download-unset.html [ Skip ]
fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ]
fast/dom/HTMLAnchorElement/anchor-download-user-triggered-synthetic-click.html [ Skip ]
-fast/dom/HTMLAnchorElement/anchor-file-blob-download.html [ Skip ]
http/tests/download/area-download.html [ Skip ]
http/tests/security/anchor-download-allow-data.html [ Skip ]
http/tests/security/anchor-download-allow-sameorigin.html [ Skip ]
-# testRunner.setShouldDownloadUndisplayableMIMETypes() is not supported on WK1.
-fast/dom/HTMLAnchorElement/anchor-file-blob-convert-to-download.html [ Skip ]
-
# TODO Expose title direction in WebKit API (Chromium Only)
webkit.org/b/58845 fast/dom/title-directionality.html [ Skip ]
webkit.org/b/58845 fast/dom/title-directionality-removeChild.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (208512 => 208513)
--- trunk/Source/WebCore/ChangeLog 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebCore/ChangeLog 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1,3 +1,16 @@
+2016-11-09 Alex Christensen <[email protected]>
+
+ Unreviewed, rolling out r208438.
+
+ crashes
+
+ Reverted changeset:
+
+ "[WK2][NETWORK_SESSION] Add support for downloading file
+ backed blobs"
+ https://bugs.webkit.org/show_bug.cgi?id=164458
+ http://trac.webkit.org/changeset/208438
+
2016-11-09 Said Abou-Hallawa <[email protected]>
Change the decoding for some animated images to be asynchronous
Modified: trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp (208512 => 208513)
--- trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -150,7 +150,6 @@
void BlobResourceHandle::cancel()
{
m_asyncStream = nullptr;
- m_fileOpened = false;
m_aborted = true;
Modified: trunk/Source/WebKit2/ChangeLog (208512 => 208513)
--- trunk/Source/WebKit2/ChangeLog 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/ChangeLog 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1,3 +1,16 @@
+2016-11-09 Alex Christensen <[email protected]>
+
+ Unreviewed, rolling out r208438.
+
+ crashes
+
+ Reverted changeset:
+
+ "[WK2][NETWORK_SESSION] Add support for downloading file
+ backed blobs"
+ https://bugs.webkit.org/show_bug.cgi?id=164458
+ http://trac.webkit.org/changeset/208438
+
2016-11-04 Brent Fulgham <[email protected]>
Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked
Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -27,7 +27,6 @@
#include "DownloadManager.h"
#include "Download.h"
-#include "NetworkBlobRegistry.h"
#include "NetworkLoad.h"
#include "NetworkSession.h"
#include "PendingDownload.h"
@@ -45,20 +44,16 @@
{
}
-void DownloadManager::startDownload(NetworkConnectionToWebProcess* connection, SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
+void DownloadManager::startDownload(SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
{
#if USE(NETWORK_SESSION)
auto* networkSession = SessionTracker::networkSession(sessionID);
if (!networkSession)
return;
-
NetworkLoadParameters parameters;
parameters.sessionID = sessionID;
parameters.request = request;
parameters.clientCredentialPolicy = ClientCredentialPolicy::MayAskClientForCredentials;
- if (request.url().protocolIsBlob() && connection)
- parameters.blobFileReferences = NetworkBlobRegistry::singleton().filesInBlob(*connection, parameters.request.url());
-
m_pendingDownloads.add(downloadID, std::make_unique<PendingDownload>(WTFMove(parameters), downloadID, *networkSession, suggestedName));
#else
auto download = std::make_unique<Download>(*this, downloadID, request, suggestedName);
Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.h (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.h 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.h 2016-11-10 01:21:56 UTC (rev 208513)
@@ -51,7 +51,6 @@
class AuthenticationManager;
class Download;
-class NetworkConnectionToWebProcess;
class PendingDownload;
class DownloadManager {
@@ -73,7 +72,7 @@
explicit DownloadManager(Client&);
- void startDownload(NetworkConnectionToWebProcess*, WebCore::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { });
+ void startDownload(WebCore::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { });
#if USE(NETWORK_SESSION)
void dataTaskBecameDownloadTask(DownloadID, std::unique_ptr<Download>&&);
#if USE(PROTECTION_SPACE_AUTH_CALLBACK)
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -189,7 +189,7 @@
void NetworkConnectionToWebProcess::startDownload(SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedName)
{
- NetworkProcess::singleton().downloadManager().startDownload(this, sessionID, downloadID, request, suggestedName);
+ NetworkProcess::singleton().downloadManager().startDownload(sessionID, downloadID, request, suggestedName);
}
void NetworkConnectionToWebProcess::convertMainResourceLoadToDownload(SessionID sessionID, uint64_t mainResourceLoadIdentifier, DownloadID downloadID, const ResourceRequest& request, const ResourceResponse& response)
@@ -196,7 +196,7 @@
{
auto& networkProcess = NetworkProcess::singleton();
if (!mainResourceLoadIdentifier) {
- networkProcess.downloadManager().startDownload(this, sessionID, downloadID, request);
+ networkProcess.downloadManager().startDownload(sessionID, downloadID, request);
return;
}
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkDataTask.cpp (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/NetworkDataTask.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkDataTask.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -29,7 +29,6 @@
#if USE(NETWORK_SESSION)
#include "NetworkDataTaskBlob.h"
-#include "NetworkLoadParameters.h"
#include "NetworkSession.h"
#include <wtf/MainThread.h>
@@ -44,16 +43,16 @@
namespace WebKit {
-Ref<NetworkDataTask> NetworkDataTask::create(NetworkSession& session, NetworkDataTaskClient& client, const NetworkLoadParameters& parameters)
+Ref<NetworkDataTask> NetworkDataTask::create(NetworkSession& session, NetworkDataTaskClient& client, const ResourceRequest& request, StoredCredentials storedCredentials, ContentSniffingPolicy shouldContentSniff, bool shouldClearReferrerOnHTTPSToHTTPRedirect)
{
- if (parameters.request.url().protocolIsBlob())
- return NetworkDataTaskBlob::create(session, client, parameters.request, parameters.contentSniffingPolicy, parameters.blobFileReferences);
+ if (request.url().protocolIsBlob())
+ return NetworkDataTaskBlob::create(session, client, request, shouldContentSniff);
#if PLATFORM(COCOA)
- return NetworkDataTaskCocoa::create(session, client, parameters.request, parameters.allowStoredCredentials, parameters.contentSniffingPolicy, parameters.shouldClearReferrerOnHTTPSToHTTPRedirect);
+ return NetworkDataTaskCocoa::create(session, client, request, storedCredentials, shouldContentSniff, shouldClearReferrerOnHTTPSToHTTPRedirect);
#endif
#if USE(SOUP)
- return NetworkDataTaskSoup::create(session, client, parameters.request, parameters.allowStoredCredentials, parameters.contentSniffingPolicy, parameters.shouldClearReferrerOnHTTPSToHTTPRedirect);
+ return NetworkDataTaskSoup::create(session, client, request, storedCredentials, shouldContentSniff, shouldClearReferrerOnHTTPSToHTTPRedirect);
#endif
}
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkDataTask.h (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/NetworkDataTask.h 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkDataTask.h 2016-11-10 01:21:56 UTC (rev 208513)
@@ -48,7 +48,6 @@
namespace WebKit {
class Download;
-class NetworkLoadParameters;
class NetworkSession;
class PendingDownload;
enum class AuthenticationChallengeDisposition;
@@ -74,7 +73,7 @@
class NetworkDataTask : public RefCounted<NetworkDataTask> {
public:
- static Ref<NetworkDataTask> create(NetworkSession&, NetworkDataTaskClient&, const NetworkLoadParameters&);
+ static Ref<NetworkDataTask> create(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, WebCore::StoredCredentials, WebCore::ContentSniffingPolicy, bool shouldClearReferrerOnHTTPSToHTTPRedirect);
virtual ~NetworkDataTask();
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkDataTaskBlob.cpp (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/NetworkDataTaskBlob.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkDataTaskBlob.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -73,16 +73,11 @@
static const char* const webKitBlobResourceDomain = "WebKitBlobResource";
-NetworkDataTaskBlob::NetworkDataTaskBlob(NetworkSession& session, NetworkDataTaskClient& client, const ResourceRequest& request, ContentSniffingPolicy shouldContentSniff, const Vector<RefPtr<WebCore::BlobDataFileReference>>& fileReferences)
+NetworkDataTaskBlob::NetworkDataTaskBlob(NetworkSession& session, NetworkDataTaskClient& client, const ResourceRequest& request, ContentSniffingPolicy shouldContentSniff)
: NetworkDataTask(session, client, request, DoNotAllowStoredCredentials, false)
+ , m_blobData(static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(request.url()))
, m_stream(std::make_unique<AsyncFileStream>(*this))
- , m_fileReferences(fileReferences)
{
- for (auto& fileReference : m_fileReferences)
- fileReference->prepareForFileAccess();
-
- m_blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(request.url());
-
m_session->registerNetworkDataTask(*this);
LOG(NetworkSession, "%p - Created NetworkDataTaskBlob for %s", this, request.url().string().utf8().data());
}
@@ -89,9 +84,6 @@
NetworkDataTaskBlob::~NetworkDataTaskBlob()
{
- for (auto& fileReference : m_fileReferences)
- fileReference->revokeFileAccess();
-
clearStream();
m_session->unregisterNetworkDataTask(*this);
}
@@ -480,8 +472,8 @@
downloadManager.dataTaskBecameDownloadTask(m_pendingDownloadID, WTFMove(download));
downloadPtr->didCreateDestination(m_pendingDownloadLocation);
- if (m_client)
- m_client->didBecomeDownload();
+ ASSERT(m_client);
+ m_client->didBecomeDownload();
m_buffer.resize(bufferSize);
read();
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkDataTaskBlob.h (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/NetworkDataTaskBlob.h 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkDataTaskBlob.h 2016-11-10 01:21:56 UTC (rev 208513)
@@ -39,7 +39,6 @@
namespace WebCore {
class AsyncFileStream;
-class BlobDataFileReference;
class BlobData;
class BlobDataItem;
}
@@ -48,15 +47,15 @@
class NetworkDataTaskBlob final : public NetworkDataTask, public WebCore::FileStreamClient {
public:
- static Ref<NetworkDataTask> create(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& request, WebCore::ContentSniffingPolicy shouldContentSniff, const Vector<RefPtr<WebCore::BlobDataFileReference>>& fileReferences)
+ static Ref<NetworkDataTask> create(NetworkSession& session, NetworkDataTaskClient& client, const WebCore::ResourceRequest& request, WebCore::ContentSniffingPolicy shouldContentSniff)
{
- return adoptRef(*new NetworkDataTaskBlob(session, client, request, shouldContentSniff, fileReferences));
+ return adoptRef(*new NetworkDataTaskBlob(session, client, request, shouldContentSniff));
}
~NetworkDataTaskBlob();
private:
- NetworkDataTaskBlob(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, WebCore::ContentSniffingPolicy, const Vector<RefPtr<WebCore::BlobDataFileReference>>&);
+ NetworkDataTaskBlob(NetworkSession&, NetworkDataTaskClient&, const WebCore::ResourceRequest&, WebCore::ContentSniffingPolicy);
void suspend() override;
void cancel() override;
@@ -114,8 +113,6 @@
unsigned m_readItemCount { 0 };
bool m_fileOpened { false };
WebCore::PlatformFileHandle m_downloadFile { WebCore::invalidPlatformFileHandle };
-
- Vector<RefPtr<WebCore::BlobDataFileReference>> m_fileReferences;
RefPtr<SandboxExtension> m_sandboxExtension;
};
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkLoad.cpp (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/NetworkLoad.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkLoad.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -67,7 +67,7 @@
, m_parameters(WTFMove(parameters))
, m_currentRequest(m_parameters.request)
{
- m_task = NetworkDataTask::create(networkSession, *this, m_parameters);
+ m_task = NetworkDataTask::create(networkSession, *this, m_parameters.request, m_parameters.allowStoredCredentials, m_parameters.contentSniffingPolicy, m_parameters.shouldClearReferrerOnHTTPSToHTTPRedirect);
if (!m_parameters.defersLoading)
m_task->resume();
}
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkLoadParameters.h (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/NetworkLoadParameters.h 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkLoadParameters.h 2016-11-10 01:21:56 UTC (rev 208513)
@@ -26,7 +26,6 @@
#ifndef NetworkLoadParameters_h
#define NetworkLoadParameters_h
-#include <WebCore/BlobDataFileReference.h>
#include <WebCore/ResourceLoaderOptions.h>
#include <WebCore/ResourceRequest.h>
#include <WebCore/SessionID.h>
@@ -46,9 +45,6 @@
bool shouldClearReferrerOnHTTPSToHTTPRedirect { true };
bool defersLoading { false };
bool needsCertificateInfo { false };
-#if USE(NETWORK_SESSION)
- Vector<RefPtr<WebCore::BlobDataFileReference>> blobFileReferences;
-#endif
};
} // namespace WebKit
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -466,7 +466,7 @@
void NetworkProcess::downloadRequest(SessionID sessionID, DownloadID downloadID, const ResourceRequest& request, const String& suggestedFilename)
{
- downloadManager().startDownload(nullptr, sessionID, downloadID, request, suggestedFilename);
+ downloadManager().startDownload(sessionID, downloadID, request, suggestedFilename);
}
void NetworkProcess::resumeDownload(SessionID sessionID, DownloadID downloadID, const IPC::DataReference& resumeData, const String& path, const WebKit::SandboxExtension::Handle& sandboxExtensionHandle)
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -98,14 +98,11 @@
}
}
-#if !USE(NETWORK_SESSION)
if (originalRequest().url().protocolIsBlob()) {
ASSERT(!m_parameters.resourceSandboxExtension);
m_fileReferences.appendVector(NetworkBlobRegistry::singleton().filesInBlob(connection, originalRequest().url()));
}
-#endif
-
if (synchronousReply)
m_synchronousLoadData = std::make_unique<SynchronousLoadData>(WTFMove(synchronousReply));
}
@@ -222,9 +219,6 @@
parameters.request = request;
#if USE(NETWORK_SESSION)
- if (request.url().protocolIsBlob())
- parameters.blobFileReferences = NetworkBlobRegistry::singleton().filesInBlob(m_connection, originalRequest().url());
-
auto* networkSession = SessionTracker::networkSession(parameters.sessionID);
if (!networkSession) {
WTFLogAlways("Attempted to create a NetworkLoad with a session (id=%" PRIu64 ") that does not exist.", parameters.sessionID.sessionID());
Modified: trunk/Source/WebKit2/NetworkProcess/PingLoad.h (208512 => 208513)
--- trunk/Source/WebKit2/NetworkProcess/PingLoad.h 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Source/WebKit2/NetworkProcess/PingLoad.h 2016-11-10 01:21:56 UTC (rev 208513)
@@ -39,7 +39,7 @@
, m_shouldFollowRedirects(parameters.shouldFollowRedirects)
{
if (auto* networkSession = SessionTracker::networkSession(parameters.sessionID)) {
- m_task = NetworkDataTask::create(*networkSession, *this, parameters);
+ m_task = NetworkDataTask::create(*networkSession, *this, parameters.request, parameters.allowStoredCredentials, parameters.contentSniffingPolicy, parameters.shouldClearReferrerOnHTTPSToHTTPRedirect);
m_task->resume();
} else
ASSERT_NOT_REACHED();
Modified: trunk/Tools/ChangeLog (208512 => 208513)
--- trunk/Tools/ChangeLog 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Tools/ChangeLog 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1,3 +1,16 @@
+2016-11-09 Alex Christensen <[email protected]>
+
+ Unreviewed, rolling out r208438.
+
+ crashes
+
+ Reverted changeset:
+
+ "[WK2][NETWORK_SESSION] Add support for downloading file
+ backed blobs"
+ https://bugs.webkit.org/show_bug.cgi?id=164458
+ http://trac.webkit.org/changeset/208438
+
2016-11-04 Brent Fulgham <[email protected]>
Local HTML should be blocked from localStorage access unless "Disable Local File Restrictions" is checked
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (208512 => 208513)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2016-11-10 01:21:56 UTC (rev 208513)
@@ -82,7 +82,6 @@
void setShouldDecideNavigationPolicyAfterDelay(boolean value);
void setNavigationGesturesEnabled(boolean value);
void setIgnoresViewportScaleLimits(boolean value);
- void setShouldDownloadUndisplayableMIMETypes(boolean value);
// Special DOM functions.
void clearBackForwardList();
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (208512 => 208513)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -1028,13 +1028,6 @@
WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get());
}
-void TestRunner::setShouldDownloadUndisplayableMIMETypes(bool value)
-{
- WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetShouldDownloadUndisplayableMIMETypes"));
- WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(value));
- WKBundlePagePostMessage(InjectedBundle::singleton().page()->page(), messageName.get(), messageBody.get());
-}
-
static unsigned nextUIScriptCallbackID()
{
static unsigned callbackID = FirstUIScriptCallbackID;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (208512 => 208513)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2016-11-10 01:21:56 UTC (rev 208513)
@@ -312,7 +312,6 @@
void setShouldDecideNavigationPolicyAfterDelay(bool);
void setNavigationGesturesEnabled(bool);
void setIgnoresViewportScaleLimits(bool);
- void setShouldDownloadUndisplayableMIMETypes(bool);
void runUIScript(JSStringRef script, JSValueRef callback);
void runUIScriptCallback(unsigned callbackID, JSStringRef result);
Modified: trunk/Tools/WebKitTestRunner/TestController.cpp (208512 => 208513)
--- trunk/Tools/WebKitTestRunner/TestController.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Tools/WebKitTestRunner/TestController.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -2061,10 +2061,7 @@
return;
}
- if (m_shouldDownloadUndisplayableMIMETypes)
- WKFramePolicyListenerDownload(listener);
- else
- WKFramePolicyListenerIgnore(listener);
+ WKFramePolicyListenerIgnore(listener);
}
void TestController::didNavigateWithNavigationData(WKContextRef, WKPageRef, WKNavigationDataRef navigationData, WKFrameRef frame, const void* clientInfo)
Modified: trunk/Tools/WebKitTestRunner/TestController.h (208512 => 208513)
--- trunk/Tools/WebKitTestRunner/TestController.h 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Tools/WebKitTestRunner/TestController.h 2016-11-10 01:21:56 UTC (rev 208513)
@@ -142,8 +142,6 @@
void setNavigationGesturesEnabled(bool value);
void setIgnoresViewportScaleLimits(bool);
- void setShouldDownloadUndisplayableMIMETypes(bool value) { m_shouldDownloadUndisplayableMIMETypes = value; }
-
private:
WKRetainPtr<WKPageConfigurationRef> generatePageConfiguration(WKContextConfigurationRef);
WKRetainPtr<WKContextConfigurationRef> generateContextConfiguration() const;
@@ -326,7 +324,6 @@
bool m_policyDelegateEnabled { false };
bool m_policyDelegatePermissive { false };
- bool m_shouldDownloadUndisplayableMIMETypes { false };
bool m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges { false };
bool m_handlesAuthenticationChallenges { false };
Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (208512 => 208513)
--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2016-11-10 01:16:20 UTC (rev 208512)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp 2016-11-10 01:21:56 UTC (rev 208513)
@@ -687,13 +687,6 @@
return;
}
- if (WKStringIsEqualToUTF8CString(messageName, "SetShouldDownloadUndisplayableMIMETypes")) {
- ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
- WKBooleanRef value = static_cast<WKBooleanRef>(messageBody);
- TestController::singleton().setShouldDownloadUndisplayableMIMETypes(WKBooleanGetValue(value));
- return;
- }
-
if (WKStringIsEqualToUTF8CString(messageName, "RunUIProcessScript")) {
WKDictionaryRef messageBodyDictionary = static_cast<WKDictionaryRef>(messageBody);
WKRetainPtr<WKStringRef> scriptKey(AdoptWK, WKStringCreateWithUTF8CString("Script"));