<!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>[210480] trunk/Source</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/210480">210480</a></dd>
<dt>Author</dt> <dd>aestes@apple.com</dd>
<dt>Date</dt> <dd>2017-01-07 13:00:30 -0800 (Sat, 07 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>[QuickLook] Consolidate usage of QuickLookHandle into SubresourceLoader
https://bugs.webkit.org/show_bug.cgi?id=166713
Reviewed by Alex Christensen.
Source/WebCore:
QuickLook conversion was originally implemented by intercepting document loads at the
ResourceHandle level, with separate paths for NSURLConnection and CFURLConnection handles.
When QuickLook was ported to WebKit2, a third path was added in WebResourceLoader.
This change removes these three separate paths and implements a single conversion path in
SubresourceLoader, where QuickLook can intercept document loads regardless of the networking
API being used.
No change in behavior. Covered by existing tests.
* loader/ResourceLoader.h: Removed override from didCreateQuickLookHandle() since this
function is no longer declared in ResourceHandleClient.
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::shouldCreateQuickLookHandleForResponse): Added a helper
function to check if a QuickLookHandle should be created for a response.
(WebCore::SubresourceLoader::didReceiveResponse): Created a QuickLookHandle if necessary
and stored it in the DocumentLoader.
(WebCore::SubresourceLoader::didReceiveData): If there is a QuickLookHandle, call
QuickLookHandle::didReceiveBuffer(), and return early if QuickLook is converting.
(WebCore::SubresourceLoader::didReceiveBuffer): Ditto for QuickLookHandle::didReceiveBuffer().
(WebCore::SubresourceLoader::didFinishLoading): Ditto for QuickLookHandle::didFinishLoading().
(WebCore::SubresourceLoader::didFail): If there is a QuickLookHandle, call QuickLookHandle::didFail().
* loader/SubresourceLoader.h: Declared shouldCreateQuickLookHandleForResponse().
* loader/ios/QuickLook.h: Removed declarations used by the ResourceHandles and declared new
functions used by SubresourceLoader.
* loader/ios/QuickLook.mm:
(WebCore::QuickLookHandle::QuickLookHandle): Removed the NSURLConnection * parameter, since
we’d now always pass nil.
(WebCore::QuickLookHandle::create): Removed create() functions used by ResourceHandles.
(WebCore::QuickLookHandle::didReceiveData): Added. Copies the data into an NSData, wraps it
in an NSArray, and passes it to didReceiveDataArray().
(WebCore::QuickLookHandle::didReceiveBuffer): Added. Creates a NSArray of NSData from the
SharedBuffer and passes it to didReceiveDataArray().
(-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]): Deleted.
(-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]): Deleted.
(-[WebQuickLookHandleAsDelegate connection:didFailWithError:]): Deleted.
(-[WebQuickLookHandleAsDelegate detachHandle]): Deleted.
(WebCore::QuickLookHandle::cfResponse): Deleted.
(WebCore::QuickLookHandle::didReceiveDataArray): Passed dataArray to m_converter and m_client.
* platform/SharedBuffer.h: Const-qualified createNSDataArray().
* platform/cocoa/SharedBufferCocoa.mm:
(WebCore::SharedBuffer::createNSDataArray): Ditto.
* platform/network/ResourceHandle.cpp: Stopped including QuickLook.h.
* platform/network/ResourceHandle.h: Removed m_quickLook.
(WebCore::ResourceHandle::quickLookHandle): Deleted.
* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::didCreateQuickLookHandle): Deleted.
* platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): Removed QuickLook code.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData): Ditto.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading): Ditto.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail): Ditto.
(WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray): Ditto.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::setQuickLookHandle): Deleted.
* platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Removed QuickLook code.
(-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]): Ditto.
(-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]): Ditto.
(-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]): Ditto.
(-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]): Ditto.
Source/WebKit2:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse): Removed QuickLook code.
(WebKit::WebResourceLoader::didReceiveData): Ditto.
(WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
(WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
(WebKit::WebResourceLoader::didReceiveResource): Ditto.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoaderh">trunk/Source/WebCore/loader/ResourceLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceLoadercpp">trunk/Source/WebCore/loader/SubresourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceLoaderh">trunk/Source/WebCore/loader/SubresourceLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderiosQuickLookh">trunk/Source/WebCore/loader/ios/QuickLook.h</a></li>
<li><a href="#trunkSourceWebCoreloaderiosQuickLookmm">trunk/Source/WebCore/loader/ios/QuickLook.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformSharedBufferh">trunk/Source/WebCore/platform/SharedBuffer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformcocoaSharedBufferCocoamm">trunk/Source/WebCore/platform/cocoa/SharedBufferCocoa.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandlecpp">trunk/Source/WebCore/platform/network/ResourceHandle.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandleh">trunk/Source/WebCore/platform/network/ResourceHandle.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkResourceHandleClienth">trunk/Source/WebCore/platform/network/ResourceHandleClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp">trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacResourceHandleMacmm">trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm">trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessNetworkWebResourceLoadercpp">trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/ChangeLog        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,3 +1,74 @@
</span><ins>+2017-01-07 Andy Estes <aestes@apple.com>
+
+ [QuickLook] Consolidate usage of QuickLookHandle into SubresourceLoader
+ https://bugs.webkit.org/show_bug.cgi?id=166713
+
+ Reviewed by Alex Christensen.
+
+ QuickLook conversion was originally implemented by intercepting document loads at the
+ ResourceHandle level, with separate paths for NSURLConnection and CFURLConnection handles.
+ When QuickLook was ported to WebKit2, a third path was added in WebResourceLoader.
+
+ This change removes these three separate paths and implements a single conversion path in
+ SubresourceLoader, where QuickLook can intercept document loads regardless of the networking
+ API being used.
+
+ No change in behavior. Covered by existing tests.
+
+ * loader/ResourceLoader.h: Removed override from didCreateQuickLookHandle() since this
+ function is no longer declared in ResourceHandleClient.
+ * loader/SubresourceLoader.cpp:
+ (WebCore::SubresourceLoader::shouldCreateQuickLookHandleForResponse): Added a helper
+ function to check if a QuickLookHandle should be created for a response.
+ (WebCore::SubresourceLoader::didReceiveResponse): Created a QuickLookHandle if necessary
+ and stored it in the DocumentLoader.
+ (WebCore::SubresourceLoader::didReceiveData): If there is a QuickLookHandle, call
+ QuickLookHandle::didReceiveBuffer(), and return early if QuickLook is converting.
+ (WebCore::SubresourceLoader::didReceiveBuffer): Ditto for QuickLookHandle::didReceiveBuffer().
+ (WebCore::SubresourceLoader::didFinishLoading): Ditto for QuickLookHandle::didFinishLoading().
+ (WebCore::SubresourceLoader::didFail): If there is a QuickLookHandle, call QuickLookHandle::didFail().
+ * loader/SubresourceLoader.h: Declared shouldCreateQuickLookHandleForResponse().
+ * loader/ios/QuickLook.h: Removed declarations used by the ResourceHandles and declared new
+ functions used by SubresourceLoader.
+ * loader/ios/QuickLook.mm:
+ (WebCore::QuickLookHandle::QuickLookHandle): Removed the NSURLConnection * parameter, since
+ we’d now always pass nil.
+ (WebCore::QuickLookHandle::create): Removed create() functions used by ResourceHandles.
+ (WebCore::QuickLookHandle::didReceiveData): Added. Copies the data into an NSData, wraps it
+ in an NSArray, and passes it to didReceiveDataArray().
+ (WebCore::QuickLookHandle::didReceiveBuffer): Added. Creates a NSArray of NSData from the
+ SharedBuffer and passes it to didReceiveDataArray().
+ (-[WebQuickLookHandleAsDelegate initWithConnectionDelegate:]): Deleted.
+ (-[WebQuickLookHandleAsDelegate connection:didReceiveDataArray:]): Deleted.
+ (-[WebQuickLookHandleAsDelegate connection:didReceiveData:lengthReceived:]): Deleted.
+ (-[WebQuickLookHandleAsDelegate connectionDidFinishLoading:]): Deleted.
+ (-[WebQuickLookHandleAsDelegate connection:didFailWithError:]): Deleted.
+ (-[WebQuickLookHandleAsDelegate detachHandle]): Deleted.
+ (WebCore::QuickLookHandle::cfResponse): Deleted.
+ (WebCore::QuickLookHandle::didReceiveDataArray): Passed dataArray to m_converter and m_client.
+ * platform/SharedBuffer.h: Const-qualified createNSDataArray().
+ * platform/cocoa/SharedBufferCocoa.mm:
+ (WebCore::SharedBuffer::createNSDataArray): Ditto.
+ * platform/network/ResourceHandle.cpp: Stopped including QuickLook.h.
+ * platform/network/ResourceHandle.h: Removed m_quickLook.
+ (WebCore::ResourceHandle::quickLookHandle): Deleted.
+ * platform/network/ResourceHandleClient.h:
+ (WebCore::ResourceHandleClient::didCreateQuickLookHandle): Deleted.
+ * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp:
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveResponse): Removed QuickLook code.
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData): Ditto.
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading): Ditto.
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didFail): Ditto.
+ (WebCore::SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray): Ditto.
+ * platform/network/mac/ResourceHandleMac.mm:
+ (WebCore::ResourceHandle::setQuickLookHandle): Deleted.
+ * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Removed QuickLook code.
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]): Ditto.
+ (-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]): Ditto.
+ (-[WebCoreResourceHandleAsDelegate connectionDidFinishLoading:]): Ditto.
+ (-[WebCoreResourceHandleAsDelegate connection:didFailWithError:]): Ditto.
+
</ins><span class="cx"> 2017-01-06 Daniel Bates <dabates@apple.com>
</span><span class="cx">
</span><span class="cx"> Ensure navigation only allowed for documents not in the page cache
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.h (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.h        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/loader/ResourceLoader.h        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2006, 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005-2017 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">@@ -50,12 +50,9 @@
</span><span class="cx"> class DocumentLoader;
</span><span class="cx"> class Frame;
</span><span class="cx"> class FrameLoader;
</span><ins>+class QuickLookHandle;
</ins><span class="cx"> class URL;
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
-class QuickLookHandle;
-#endif
-
</del><span class="cx"> class ResourceLoader : public RefCounted<ResourceLoader>, protected ResourceHandleClient {
</span><span class="cx"> public:
</span><span class="cx"> virtual ~ResourceLoader() = 0;
</span><span class="lines">@@ -119,7 +116,7 @@
</span><span class="cx"> virtual void receivedCancellation(const AuthenticationChallenge&);
</span><span class="cx">
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>- void didCreateQuickLookHandle(QuickLookHandle&) override;
</del><ins>+ void didCreateQuickLookHandle(QuickLookHandle&);
</ins><span class="cx"> #endif
</span><span class="cx"> bool isQuickLookResource() { return m_isQuickLookResource; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.cpp        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006-2007, 2009, 2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006-2017 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,6 +57,10 @@
</span><span class="cx"> #include "ResourceLoadInfo.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if USE(QUICK_LOOK)
+#include "QuickLook.h"
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, subresourceLoaderCounter, ("SubresourceLoader"));
</span><span class="lines">@@ -247,11 +251,31 @@
</span><span class="cx"> m_resource->didSendData(bytesSent, totalBytesToBeSent);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if USE(QUICK_LOOK)
+bool SubresourceLoader::shouldCreateQuickLookHandleForResponse(const ResourceResponse& response) const
+{
+ if (m_resource->type() != CachedResource::MainResource)
+ return false;
+
+ if (m_documentLoader->quickLookHandle())
+ return false;
+
+ return QuickLookHandle::shouldCreateForMIMEType(response.mimeType());
+}
+#endif
+
</ins><span class="cx"> void SubresourceLoader::didReceiveResponse(const ResourceResponse& response)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!response.isNull());
</span><span class="cx"> ASSERT(m_state == Initialized);
</span><span class="cx">
</span><ins>+#if USE(QUICK_LOOK)
+ if (shouldCreateQuickLookHandleForResponse(response)) {
+ m_documentLoader->setQuickLookHandle(QuickLookHandle::create(*this, response));
+ return;
+ }
+#endif
+
</ins><span class="cx"> // We want redirect responses to be processed through willSendRequestInternal. The only exception is redirection with no Location headers.
</span><span class="cx"> ASSERT(response.httpStatusCode() < 300 || response.httpStatusCode() >= 400 || response.httpStatusCode() == 304 || !response.httpHeaderField(HTTPHeaderName::Location));
</span><span class="cx">
</span><span class="lines">@@ -325,11 +349,25 @@
</span><span class="cx">
</span><span class="cx"> void SubresourceLoader::didReceiveData(const char* data, unsigned length, long long encodedDataLength, DataPayloadType dataPayloadType)
</span><span class="cx"> {
</span><ins>+#if USE(QUICK_LOOK)
+ if (auto quickLookHandle = m_documentLoader->quickLookHandle()) {
+ if (quickLookHandle->didReceiveData(data, length))
+ return;
+ }
+#endif
+
</ins><span class="cx"> didReceiveDataOrBuffer(data, length, nullptr, encodedDataLength, dataPayloadType);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SubresourceLoader::didReceiveBuffer(Ref<SharedBuffer>&& buffer, long long encodedDataLength, DataPayloadType dataPayloadType)
</span><span class="cx"> {
</span><ins>+#if USE(QUICK_LOOK)
+ if (auto quickLookHandle = m_documentLoader->quickLookHandle()) {
+ if (quickLookHandle->didReceiveBuffer(buffer.get()))
+ return;
+ }
+#endif
+
</ins><span class="cx"> didReceiveDataOrBuffer(nullptr, 0, WTFMove(buffer), encodedDataLength, dataPayloadType);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -468,6 +506,13 @@
</span><span class="cx">
</span><span class="cx"> void SubresourceLoader::didFinishLoading(double finishTime)
</span><span class="cx"> {
</span><ins>+#if USE(QUICK_LOOK)
+ if (auto quickLookHandle = m_documentLoader->quickLookHandle()) {
+ if (quickLookHandle->didFinishLoading())
+ return;
+ }
+#endif
+
</ins><span class="cx"> if (m_state != Initialized)
</span><span class="cx"> return;
</span><span class="cx"> ASSERT(!reachedTerminalState());
</span><span class="lines">@@ -510,6 +555,11 @@
</span><span class="cx">
</span><span class="cx"> void SubresourceLoader::didFail(const ResourceError& error)
</span><span class="cx"> {
</span><ins>+#if USE(QUICK_LOOK)
+ if (auto quickLookHandle = m_documentLoader->quickLookHandle())
+ quickLookHandle->didFail();
+#endif
+
</ins><span class="cx"> if (m_state != Initialized)
</span><span class="cx"> return;
</span><span class="cx"> ASSERT(!reachedTerminalState());
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.h (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.h        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/loader/SubresourceLoader.h        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2006, 2009 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005-2017 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">@@ -101,6 +101,10 @@
</span><span class="cx">
</span><span class="cx"> void notifyDone();
</span><span class="cx">
</span><ins>+#if USE(QUICK_LOOK)
+ bool shouldCreateQuickLookHandleForResponse(const ResourceResponse&) const;
+#endif
+
</ins><span class="cx"> enum SubresourceLoaderState {
</span><span class="cx"> Uninitialized,
</span><span class="cx"> Initialized,
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderiosQuickLookh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ios/QuickLook.h (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ios/QuickLook.h        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/loader/ios/QuickLook.h        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2009-2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2009-2017 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">@@ -33,6 +33,7 @@
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><ins>+OBJC_CLASS NSArray;
</ins><span class="cx"> OBJC_CLASS NSData;
</span><span class="cx"> OBJC_CLASS NSDictionary;
</span><span class="cx"> OBJC_CLASS NSFileHandle;
</span><span class="lines">@@ -39,7 +40,6 @@
</span><span class="cx"> OBJC_CLASS NSSet;
</span><span class="cx"> OBJC_CLASS NSString;
</span><span class="cx"> OBJC_CLASS NSURL;
</span><del>-OBJC_CLASS NSURLConnection;
</del><span class="cx"> OBJC_CLASS NSURLRequest;
</span><span class="cx"> OBJC_CLASS NSURLResponse;
</span><span class="cx"> OBJC_CLASS QLPreviewConverter;
</span><span class="lines">@@ -46,10 +46,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-class ResourceHandle;
</del><span class="cx"> class ResourceLoader;
</span><span class="cx"> class ResourceResponse;
</span><del>-class SynchronousResourceHandleCFURLConnectionDelegate;
</del><ins>+class SharedBuffer;
</ins><span class="cx"> class URL;
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT NSSet *QLPreviewGetSupportedMIMETypesSet();
</span><span class="lines">@@ -74,26 +73,16 @@
</span><span class="cx"> class QuickLookHandle {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(QuickLookHandle);
</span><span class="cx"> public:
</span><del>- WEBCORE_EXPORT static bool shouldCreateForMIMEType(const String&);
</del><ins>+ static bool shouldCreateForMIMEType(const String&);
+ static std::unique_ptr<QuickLookHandle> create(ResourceLoader&, const ResourceResponse&);
+ ~QuickLookHandle();
</ins><span class="cx">
</span><del>- static std::unique_ptr<QuickLookHandle> create(ResourceHandle*, NSURLConnection *, NSURLResponse *, id delegate);
-#if USE(CFURLCONNECTION)
- static std::unique_ptr<QuickLookHandle> create(ResourceHandle*, SynchronousResourceHandleCFURLConnectionDelegate*, CFURLResponseRef);
-#endif
- // FIXME: Use of ResourceLoader here is a platform violation.
- WEBCORE_EXPORT static std::unique_ptr<QuickLookHandle> create(ResourceLoader&, const ResourceResponse&);
</del><ins>+ bool didReceiveData(const char* data, unsigned length);
+ bool didReceiveBuffer(const SharedBuffer&);
+ bool didFinishLoading();
+ void didFail();
</ins><span class="cx">
</span><del>- WEBCORE_EXPORT ~QuickLookHandle();
-
- WEBCORE_EXPORT bool didReceiveDataArray(CFArrayRef);
- WEBCORE_EXPORT bool didReceiveData(CFDataRef);
- WEBCORE_EXPORT bool didFinishLoading();
- WEBCORE_EXPORT void didFail();
-
</del><span class="cx"> WEBCORE_EXPORT NSURLResponse *nsResponse();
</span><del>-#if USE(CFURLCONNECTION)
- CFURLResponseRef cfResponse();
-#endif
</del><span class="cx">
</span><span class="cx"> void setClient(PassRefPtr<QuickLookHandleClient> client) { m_client = client; }
</span><span class="cx">
</span><span class="lines">@@ -104,8 +93,10 @@
</span><span class="cx"> QLPreviewConverter *converter() const { return m_converter.get(); }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- QuickLookHandle(NSURL *, NSURLConnection *, NSURLResponse *, id delegate);
</del><ins>+ QuickLookHandle(NSURL *, NSURLResponse *, id delegate);
</ins><span class="cx">
</span><ins>+ void didReceiveDataArray(NSArray *);
+
</ins><span class="cx"> RetainPtr<NSURL> m_firstRequestURL;
</span><span class="cx"> RetainPtr<QLPreviewConverter> m_converter;
</span><span class="cx"> RetainPtr<id> m_delegate;
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderiosQuickLookmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ios/QuickLook.mm (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ios/QuickLook.mm        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/loader/ios/QuickLook.mm        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2009-2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2009-2017 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">@@ -28,21 +28,15 @@
</span><span class="cx">
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx">
</span><del>-#import "DocumentLoader.h"
</del><span class="cx"> #import "FileSystemIOS.h"
</span><span class="cx"> #import "Logging.h"
</span><span class="cx"> #import "NSFileManagerSPI.h"
</span><span class="cx"> #import "ResourceError.h"
</span><del>-#import "ResourceHandle.h"
</del><span class="cx"> #import "ResourceLoader.h"
</span><del>-#import "RuntimeApplicationChecks.h"
-#import "SynchronousResourceHandleCFURLConnectionDelegate.h"
</del><ins>+#import "SharedBuffer.h"
</ins><span class="cx"> #import "WebCoreResourceHandleAsDelegate.h"
</span><del>-#import "WebCoreURLResponseIOS.h"
</del><span class="cx"> #import <Foundation/Foundation.h>
</span><span class="cx"> #import <wtf/NeverDestroyed.h>
</span><del>-#import <wtf/StdLibExtras.h>
-#import <wtf/Threading.h>
</del><span class="cx"> #import <wtf/Vector.h>
</span><span class="cx"> #import <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="lines">@@ -185,81 +179,6 @@
</span><span class="cx"> return previewProtocol.get().data();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if USE(CFURLCONNECTION)
-// The way QuickLook works is we pass it an NSURLConnectionDelegate callback object at creation
-// time. Then we pass it all the data as we receive it. Once we've downloaded the full URL,
-// QuickLook turns around and send us, through this delegate, the HTML version of the file which we
-// pass on to WebCore. The flag m_finishedLoadingDataIntoConverter in QuickLookHandle decides
-// whether to pass the data to QuickLook or WebCore.
-//
-// This works fine when using NS APIs, but when using CFNetwork, we don't have a NSURLConnectionDelegate.
-// So we create WebQuickLookHandleAsDelegate as an intermediate delegate object and pass it to
-// QLPreviewConverter. The proxy delegate then forwards the messages on to the CFNetwork code.
-@interface WebQuickLookHandleAsDelegate : NSObject <NSURLConnectionDelegate, WebCoreResourceLoaderDelegate> {
- RefPtr<SynchronousResourceHandleCFURLConnectionDelegate> m_connectionDelegate;
-}
-
-- (id)initWithConnectionDelegate:(SynchronousResourceHandleCFURLConnectionDelegate*)connectionDelegate;
-@end
-
-@implementation WebQuickLookHandleAsDelegate
-- (id)initWithConnectionDelegate:(SynchronousResourceHandleCFURLConnectionDelegate*)connectionDelegate
-{
- self = [super init];
- if (!self)
- return nil;
- m_connectionDelegate = connectionDelegate;
- return self;
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveDataArray:(NSArray *)dataArray
-{
- UNUSED_PARAM(connection);
- if (!m_connectionDelegate)
- return;
- LOG(Network, "WebQuickLookHandleAsDelegate::didReceiveDataArray()");
- m_connectionDelegate->didReceiveDataArray(reinterpret_cast<CFArrayRef>(dataArray));
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data lengthReceived:(long long)lengthReceived
-{
- UNUSED_PARAM(connection);
- if (!m_connectionDelegate)
- return;
- LOG(Network, "WebQuickLookHandleAsDelegate::didReceiveData() - data length = %ld", (long)[data length]);
-
- // QuickLook code sends us a nil data at times. The check below is the same as the one in
- // ResourceHandleMac.cpp added for a different bug.
- if (![data length])
- return;
- m_connectionDelegate->didReceiveData(reinterpret_cast<CFDataRef>(data), static_cast<int>(lengthReceived));
-}
-
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
-{
- UNUSED_PARAM(connection);
- if (!m_connectionDelegate)
- return;
- LOG(Network, "WebQuickLookHandleAsDelegate::didFinishLoading()");
- m_connectionDelegate->didFinishLoading();
-}
-
-- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
-{
- UNUSED_PARAM(connection);
- if (!m_connectionDelegate)
- return;
- LOG(Network, "WebQuickLookHandleAsDelegate::didFail()");
- m_connectionDelegate->didFail(reinterpret_cast<CFErrorRef>(error));
-}
-
-- (void)detachHandle
-{
- m_connectionDelegate = nullptr;
-}
-@end
-#endif
-
</del><span class="cx"> @interface WebResourceLoaderQuickLookDelegate : NSObject <NSURLConnectionDelegate, WebCoreResourceLoaderDelegate> {
</span><span class="cx"> RefPtr<ResourceLoader> _resourceLoader;
</span><span class="cx"> BOOL _hasSentDidReceiveResponse;
</span><span class="lines">@@ -392,9 +311,9 @@
</span><span class="cx"> return &emptyClient.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-QuickLookHandle::QuickLookHandle(NSURL *firstRequestURL, NSURLConnection *connection, NSURLResponse *nsResponse, id delegate)
</del><ins>+QuickLookHandle::QuickLookHandle(NSURL *firstRequestURL, NSURLResponse *nsResponse, id delegate)
</ins><span class="cx"> : m_firstRequestURL(firstRequestURL)
</span><del>- , m_converter(adoptNS([allocQLPreviewConverterInstance() initWithConnection:connection delegate:delegate response:nsResponse options:nil]))
</del><ins>+ , m_converter(adoptNS([allocQLPreviewConverterInstance() initWithConnection:nil delegate:delegate response:nsResponse options:nil]))
</ins><span class="cx"> , m_delegate(delegate)
</span><span class="cx"> , m_finishedLoadingDataIntoConverter(false)
</span><span class="cx"> , m_nsResponse([m_converter previewResponse])
</span><span class="lines">@@ -403,37 +322,6 @@
</span><span class="cx"> LOG(Network, "QuickLookHandle::QuickLookHandle() - previewFileName: %s", [m_converter previewFileName]);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-std::unique_ptr<QuickLookHandle> QuickLookHandle::create(ResourceHandle* handle, NSURLConnection *connection, NSURLResponse *nsResponse, id delegate)
-{
- ASSERT_ARG(handle, handle);
- if (handle->firstRequest().requester() != ResourceRequest::Requester::Main || ![QLPreviewGetSupportedMIMETypesSet() containsObject:[nsResponse MIMEType]])
- return nullptr;
-
- std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([handle->firstRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], connection, nsResponse, delegate));
- handle->client()->didCreateQuickLookHandle(*quickLookHandle);
- return quickLookHandle;
-}
-
-#if USE(CFURLCONNECTION)
-std::unique_ptr<QuickLookHandle> QuickLookHandle::create(ResourceHandle* handle, SynchronousResourceHandleCFURLConnectionDelegate* connectionDelegate, CFURLResponseRef cfResponse)
-{
- ASSERT_ARG(handle, handle);
- if (handle->firstRequest().requester() != ResourceRequest::Requester::Main || ![QLPreviewGetSupportedMIMETypesSet() containsObject:(NSString *)CFURLResponseGetMIMEType(cfResponse)])
- return nullptr;
-
- NSURLResponse *nsResponse = [NSURLResponse _responseWithCFURLResponse:cfResponse];
- WebQuickLookHandleAsDelegate *delegate = [[[WebQuickLookHandleAsDelegate alloc] initWithConnectionDelegate:connectionDelegate] autorelease];
- std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([handle->firstRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], nil, nsResponse, delegate));
- handle->client()->didCreateQuickLookHandle(*quickLookHandle);
- return quickLookHandle;
-}
-
-CFURLResponseRef QuickLookHandle::cfResponse()
-{
- return [m_nsResponse _CFURLResponse];
-}
-#endif
-
</del><span class="cx"> bool QuickLookHandle::shouldCreateForMIMEType(const String& mimeType)
</span><span class="cx"> {
</span><span class="cx"> return [QLPreviewGetSupportedMIMETypesSet() containsObject:mimeType];
</span><span class="lines">@@ -444,7 +332,7 @@
</span><span class="cx"> ASSERT(shouldCreateForMIMEType(response.mimeType()));
</span><span class="cx">
</span><span class="cx"> RetainPtr<WebResourceLoaderQuickLookDelegate> delegate = adoptNS([[WebResourceLoaderQuickLookDelegate alloc] initWithResourceLoader:&loader]);
</span><del>- std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([loader.originalRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], nil, response.nsURLResponse(), delegate.get()));
</del><ins>+ std::unique_ptr<QuickLookHandle> quickLookHandle(new QuickLookHandle([loader.originalRequest().nsURLRequest(DoNotUpdateHTTPBody) URL], response.nsURLResponse(), delegate.get()));
</ins><span class="cx"> [delegate setQuickLookHandle:quickLookHandle.get()];
</span><span class="cx"> loader.didCreateQuickLookHandle(*quickLookHandle);
</span><span class="cx"> return quickLookHandle;
</span><span class="lines">@@ -455,25 +343,32 @@
</span><span class="cx"> return m_nsResponse.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool QuickLookHandle::didReceiveDataArray(CFArrayRef cfDataArray)
</del><ins>+bool QuickLookHandle::didReceiveData(const char* data, unsigned length)
</ins><span class="cx"> {
</span><span class="cx"> if (m_finishedLoadingDataIntoConverter)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- LOG(Network, "QuickLookHandle::didReceiveDataArray()");
- [m_converter appendDataArray:(NSArray *)cfDataArray];
- m_client->didReceiveDataArray(cfDataArray);
</del><ins>+ didReceiveDataArray(@[ [NSData dataWithBytes:data length:length] ]);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool QuickLookHandle::didReceiveData(CFDataRef cfData)
</del><ins>+bool QuickLookHandle::didReceiveBuffer(const SharedBuffer& buffer)
</ins><span class="cx"> {
</span><span class="cx"> if (m_finishedLoadingDataIntoConverter)
</span><span class="cx"> return false;
</span><del>-
- return didReceiveDataArray(adoptCF(CFArrayCreate(kCFAllocatorDefault, (const void**)&cfData, 1, &kCFTypeArrayCallBacks)).get());
</del><ins>+
+ didReceiveDataArray(buffer.createNSDataArray().get());
+ return true;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+void QuickLookHandle::didReceiveDataArray(NSArray *dataArray)
+{
+ ASSERT(!m_finishedLoadingDataIntoConverter);
+ LOG(Network, "QuickLookHandle::didReceiveDataArray()");
+ [m_converter appendDataArray:dataArray];
+ m_client->didReceiveDataArray((CFArrayRef)dataArray);
+}
+
</ins><span class="cx"> bool QuickLookHandle::didFinishLoading()
</span><span class="cx"> {
</span><span class="cx"> if (m_finishedLoadingDataIntoConverter)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformSharedBufferh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/SharedBuffer.h (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/SharedBuffer.h        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/platform/SharedBuffer.h        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">
</span><span class="cx"> #if USE(FOUNDATION)
</span><span class="cx"> WEBCORE_EXPORT RetainPtr<NSData> createNSData();
</span><del>- WEBCORE_EXPORT RetainPtr<NSArray> createNSDataArray();
</del><ins>+ WEBCORE_EXPORT RetainPtr<NSArray> createNSDataArray() const;
</ins><span class="cx"> WEBCORE_EXPORT static Ref<SharedBuffer> wrapNSData(NSData *);
</span><span class="cx"> #endif
</span><span class="cx"> #if USE(CF)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformcocoaSharedBufferCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/cocoa/SharedBufferCocoa.mm (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/cocoa/SharedBufferCocoa.mm        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/platform/cocoa/SharedBufferCocoa.mm        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RetainPtr<NSArray> SharedBuffer::createNSDataArray()
</del><ins>+RetainPtr<NSArray> SharedBuffer::createNSDataArray() const
</ins><span class="cx"> {
</span><span class="cx"> if (auto platformData = (NSData *)m_cfData.get())
</span><span class="cx"> return @[ platformData ];
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandle.cpp (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandle.cpp        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.cpp        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2017 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">@@ -38,10 +38,6 @@
</span><span class="cx"> #include <wtf/text/AtomicStringHash.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
-#include "QuickLook.h"
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> static bool shouldForceContentSniffing;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandle.h (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandle.h        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.h        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2004, 2006, 2011, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2017 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">@@ -147,11 +147,6 @@
</span><span class="cx"> static void setClientCertificate(const String& host, CFDataRef);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- QuickLookHandle* quickLookHandle() { return m_quickLook.get(); }
- void setQuickLookHandle(std::unique_ptr<QuickLookHandle>);
-#endif
-
</del><span class="cx"> #if PLATFORM(WIN) && USE(CURL)
</span><span class="cx"> static void setHostAllowsAnyHTTPSCertificate(const String&);
</span><span class="cx"> static void setClientCertificateInfo(const String&, const String&, const String&);
</span><span class="lines">@@ -280,10 +275,6 @@
</span><span class="cx">
</span><span class="cx"> friend class ResourceHandleInternal;
</span><span class="cx"> std::unique_ptr<ResourceHandleInternal> d;
</span><del>-
-#if USE(QUICK_LOOK)
- std::unique_ptr<QuickLookHandle> m_quickLook;
-#endif
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandleClient.h (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandleClient.h        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/platform/network/ResourceHandleClient.h        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,6 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006 Apple Inc. All rights reserved.
- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006-2017 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">@@ -53,10 +52,6 @@
</span><span class="cx"> class ResourceResponse;
</span><span class="cx"> class SharedBuffer;
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- class QuickLookHandle;
-#endif
-
</del><span class="cx"> enum CacheStoragePolicy {
</span><span class="cx"> StorageAllowed,
</span><span class="cx"> StorageAllowedInMemoryOnly,
</span><span class="lines">@@ -131,10 +126,6 @@
</span><span class="cx"> #elif PLATFORM(COCOA)
</span><span class="cx"> virtual NSCachedURLResponse *willCacheResponse(ResourceHandle*, NSCachedURLResponse *response) { return response; }
</span><span class="cx"> #endif
</span><del>-
-#if USE(QUICK_LOOK)
- virtual void didCreateQuickLookHandle(QuickLookHandle&) { }
-#endif
</del><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfSynchronousResourceHandleCFURLConnectionDelegatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2004-2013, 2015 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2017 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">@@ -167,15 +167,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- bool isQuickLookPreview = false;
- m_handle->setQuickLookHandle(QuickLookHandle::create(m_handle, this, cfResponse));
- if (m_handle->quickLookHandle()) {
- cfResponse = m_handle->quickLookHandle()->cfResponse();
- isQuickLookPreview = true;
- }
-#endif
-
</del><span class="cx"> ResourceResponse resourceResponse(cfResponse);
</span><span class="cx"> #if PLATFORM(COCOA) && ENABLE(WEB_TIMING)
</span><span class="cx"> ResourceHandle::getConnectionTimingData(connection, resourceResponse.networkLoadTiming());
</span><span class="lines">@@ -183,10 +174,6 @@
</span><span class="cx"> UNUSED_PARAM(connection);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- resourceResponse.setIsQuickLook(isQuickLookPreview);
-#endif
-
</del><span class="cx"> m_handle->client()->didReceiveResponse(m_handle, WTFMove(resourceResponse));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -194,11 +181,6 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(Network, "CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didReceiveData(handle=%p, bytes=%ld) (%s)", m_handle, CFDataGetLength(data), m_handle->firstRequest().url().string().utf8().data());
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (m_handle->quickLookHandle() && m_handle->quickLookHandle()->didReceiveData(data))
- return;
-#endif
-
</del><span class="cx"> if (ResourceHandleClient* client = m_handle->client())
</span><span class="cx"> client->didReceiveBuffer(m_handle, SharedBuffer::wrapCFData(data), originalLength);
</span><span class="cx"> }
</span><span class="lines">@@ -207,11 +189,6 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(Network, "CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading(handle=%p) (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (m_handle->quickLookHandle() && m_handle->quickLookHandle()->didFinishLoading())
- return;
-#endif
-
</del><span class="cx"> if (ResourceHandleClient* client = m_handle->client())
</span><span class="cx"> client->didFinishLoading(m_handle, 0);
</span><span class="cx"> }
</span><span class="lines">@@ -220,11 +197,6 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(Network, "CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didFail(handle=%p, error = %p) (%s)", m_handle, error, m_handle->firstRequest().url().string().utf8().data());
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (QuickLookHandle* quickLookHandle = m_handle->quickLookHandle())
- quickLookHandle->didFail();
-#endif
-
</del><span class="cx"> if (ResourceHandleClient* client = m_handle->client())
</span><span class="cx"> client->didFail(m_handle, ResourceError(error));
</span><span class="cx"> }
</span><span class="lines">@@ -306,11 +278,6 @@
</span><span class="cx">
</span><span class="cx"> LOG(Network, "CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didReceiveDataArray(handle=%p, arrayLength=%ld) (%s)", m_handle, CFArrayGetCount(dataArray), m_handle->firstRequest().url().string().utf8().data());
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (m_handle->quickLookHandle() && m_handle->quickLookHandle()->didReceiveDataArray(dataArray))
- return;
-#endif
-
</del><span class="cx"> if (ResourceHandleClient* client = m_handle->client())
</span><span class="cx"> client->didReceiveBuffer(m_handle, SharedBuffer::wrapCFDataArray(dataArray), -1);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacResourceHandleMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2017 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">@@ -77,10 +77,6 @@
</span><span class="cx"> @end
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
-#import "QuickLook.h"
-#endif
-
</del><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> @interface NSURLConnection ()
</span><span class="lines">@@ -752,12 +748,5 @@
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(WEB_TIMING)
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
-void ResourceHandle::setQuickLookHandle(std::unique_ptr<QuickLookHandle> handle)
-{
- m_quickLook = WTFMove(handle);
-}
-#endif
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacWebCoreResourceHandleAsDelegatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004-2017 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">@@ -39,10 +39,6 @@
</span><span class="cx"> #import "SharedBuffer.h"
</span><span class="cx"> #import "WebCoreURLResponse.h"
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
-#import "QuickLook.h"
-#endif
-
</del><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> @implementation WebCoreResourceHandleAsDelegate
</span><span class="lines">@@ -146,20 +142,8 @@
</span><span class="cx"> [response _setMIMEType:@"text/html"];
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- bool isQuickLookPreview = false;
- m_handle->setQuickLookHandle(QuickLookHandle::create(m_handle, connection, response, self));
- if (m_handle->quickLookHandle()) {
- response = m_handle->quickLookHandle()->nsResponse();
- isQuickLookPreview = true;
- }
-#endif
-
</del><span class="cx"> ResourceResponse resourceResponse(response);
</span><span class="cx"> resourceResponse.setSource(ResourceResponse::Source::Network);
</span><del>-#if USE(QUICK_LOOK)
- resourceResponse.setIsQuickLook(isQuickLookPreview);
-#endif
</del><span class="cx"> #if ENABLE(WEB_TIMING)
</span><span class="cx"> ResourceHandle::getConnectionTimingData(connection, resourceResponse.networkLoadTiming());
</span><span class="cx"> #else
</span><span class="lines">@@ -181,11 +165,6 @@
</span><span class="cx"> if (!m_handle || !m_handle->client())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (m_handle->quickLookHandle() && m_handle->quickLookHandle()->didReceiveDataArray(reinterpret_cast<CFArrayRef>(dataArray)))
- return;
-#endif
-
</del><span class="cx"> m_handle->client()->didReceiveBuffer(m_handle, SharedBuffer::wrapCFDataArray(reinterpret_cast<CFArrayRef>(dataArray)), -1);
</span><span class="cx"> // The call to didReceiveData above can cancel a load, and if so, the delegate (self) could have been deallocated by this point.
</span><span class="cx"> }
</span><span class="lines">@@ -209,11 +188,6 @@
</span><span class="cx"> // However, with today's computers and networking speeds, this won't happen in practice.
</span><span class="cx"> // Could be an issue with a giant local file.
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (m_handle->quickLookHandle() && m_handle->quickLookHandle()->didReceiveData(reinterpret_cast<CFDataRef>(data)))
- return;
-#endif
-
</del><span class="cx"> // FIXME: https://bugs.webkit.org/show_bug.cgi?id=19793
</span><span class="cx"> // -1 means we do not provide any data about transfer size to inspector so it would use
</span><span class="cx"> // Content-Length headers or content size to show transfer size.
</span><span class="lines">@@ -241,11 +215,6 @@
</span><span class="cx"> if (!m_handle || !m_handle->client())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (m_handle->quickLookHandle() && m_handle->quickLookHandle()->didFinishLoading())
- return;
-#endif
-
</del><span class="cx"> m_handle->client()->didFinishLoading(m_handle, 0);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -258,11 +227,6 @@
</span><span class="cx"> if (!m_handle || !m_handle->client())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (m_handle->quickLookHandle())
- m_handle->quickLookHandle()->didFail();
-#endif
-
</del><span class="cx"> m_handle->client()->didFail(m_handle, error);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebKit2/ChangeLog        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2017-01-07 Andy Estes <aestes@apple.com>
+
+ [QuickLook] Consolidate usage of QuickLookHandle into SubresourceLoader
+ https://bugs.webkit.org/show_bug.cgi?id=166713
+
+ Reviewed by Alex Christensen.
+
+ * WebProcess/Network/WebResourceLoader.cpp:
+ (WebKit::WebResourceLoader::didReceiveResponse): Removed QuickLook code.
+ (WebKit::WebResourceLoader::didReceiveData): Ditto.
+ (WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
+ (WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
+ (WebKit::WebResourceLoader::didReceiveResource): Ditto.
+
</ins><span class="cx"> 2017-01-06 Daniel Bates <dabates@apple.com>
</span><span class="cx">
</span><span class="cx"> Attempt to fix the EFL build following <http://trac.webkit.org/changeset/210461>
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessNetworkWebResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp (210479 => 210480)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp        2017-01-07 18:51:46 UTC (rev 210479)
+++ trunk/Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp        2017-01-07 21:00:30 UTC (rev 210480)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2012-2017 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">@@ -44,10 +44,6 @@
</span><span class="cx"> #include <WebCore/ResourceLoader.h>
</span><span class="cx"> #include <WebCore/SubresourceLoader.h>
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
-#include <WebCore/QuickLook.h>
-#endif
-
</del><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> #define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), Network, "%p - WebResourceLoader::" fmt, this, ##__VA_ARGS__)
</span><span class="lines">@@ -117,19 +113,7 @@
</span><span class="cx"> if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForResponse(m_coreLoader.get(), response))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- bool shoudCallCoreLoaderDidReceiveResponse = true;
-#if USE(QUICK_LOOK)
- // Refrain from calling didReceiveResponse if QuickLook will convert this response, since the MIME type of the
- // converted resource isn't yet known. WebResourceLoaderQuickLookDelegate will later call didReceiveResponse upon
- // receiving the converted data.
- bool isMainLoad = m_coreLoader->documentLoader()->mainResourceLoader() == m_coreLoader;
- if (isMainLoad && QuickLookHandle::shouldCreateForMIMEType(response.mimeType())) {
- m_coreLoader->documentLoader()->setQuickLookHandle(QuickLookHandle::create(*m_coreLoader, response));
- shoudCallCoreLoaderDidReceiveResponse = false;
- }
-#endif
- if (shoudCallCoreLoaderDidReceiveResponse)
- m_coreLoader->didReceiveResponse(response);
</del><ins>+ m_coreLoader->didReceiveResponse(response);
</ins><span class="cx">
</span><span class="cx"> // If m_coreLoader becomes null as a result of the didReceiveResponse callback, we can't use the send function().
</span><span class="cx"> if (!m_coreLoader)
</span><span class="lines">@@ -148,12 +132,6 @@
</span><span class="cx"> m_hasReceivedData = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle()) {
- if (quickLookHandle->didReceiveData(adoptCF(CFDataCreate(kCFAllocatorDefault, data.data(), data.size())).get()))
- return;
- }
-#endif
</del><span class="cx"> m_coreLoader->didReceiveData(reinterpret_cast<const char*>(data.data()), data.size(), encodedDataLength, DataPayloadBytes);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -162,12 +140,6 @@
</span><span class="cx"> LOG(Network, "(WebProcess) WebResourceLoader::didFinishResourceLoad for '%s'", m_coreLoader->url().string().latin1().data());
</span><span class="cx"> RELEASE_LOG_IF_ALLOWED("didFinishResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID);
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle()) {
- if (quickLookHandle->didFinishLoading())
- return;
- }
-#endif
</del><span class="cx"> m_coreLoader->didFinishLoading(finishTime);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -176,10 +148,6 @@
</span><span class="cx"> LOG(Network, "(WebProcess) WebResourceLoader::didFailResourceLoad for '%s'", m_coreLoader->url().string().latin1().data());
</span><span class="cx"> RELEASE_LOG_IF_ALLOWED("didFailResourceLoad: (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID);
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle())
- quickLookHandle->didFail();
-#endif
</del><span class="cx"> if (m_coreLoader->documentLoader()->applicationCacheHost()->maybeLoadFallbackForError(m_coreLoader.get(), error))
</span><span class="cx"> return;
</span><span class="cx"> m_coreLoader->didFail(error);
</span><span class="lines">@@ -193,18 +161,6 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<SharedBuffer> buffer = handle.tryWrapInSharedBuffer();
</span><span class="cx">
</span><del>-#if USE(QUICK_LOOK)
- if (QuickLookHandle* quickLookHandle = m_coreLoader->documentLoader()->quickLookHandle()) {
- if (buffer) {
- if (quickLookHandle->didReceiveData(buffer->existingCFData())) {
- quickLookHandle->didFinishLoading();
- return;
- }
- } else
- quickLookHandle->didFail();
- }
-#endif
-
</del><span class="cx"> if (!buffer) {
</span><span class="cx"> LOG_ERROR("Unable to create buffer from ShareableResource sent from the network process.");
</span><span class="cx"> RELEASE_LOG_IF_ALLOWED("didReceiveResource: Unable to create SharedBuffer (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ")", m_trackingParameters.pageID, m_trackingParameters.frameID, m_trackingParameters.resourceID);
</span></span></pre>
</div>
</div>
</body>
</html>