<!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>[214266] 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/214266">214266</a></dd>
<dt>Author</dt> <dd>aestes@apple.com</dd>
<dt>Date</dt> <dd>2017-03-22 11:11:08 -0700 (Wed, 22 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[QuickLook] Rename QuickLookHandle to PreviewLoader
https://bugs.webkit.org/show_bug.cgi?id=169961

Reviewed by Andreas Kling.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::isQuickLookResource):
* loader/ResourceLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::shouldCreatePreviewLoaderForResponse):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didReceiveData):
(WebCore::SubresourceLoader::didReceiveBuffer):
(WebCore::SubresourceLoader::didFinishLoading):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::shouldCreateQuickLookHandleForResponse): Deleted.
* loader/SubresourceLoader.h:
* loader/ios/PreviewLoader.h: Copied from Source/WebCore/loader/ios/QuickLook.h.
* loader/ios/PreviewLoader.mm: Added.
(testingClient):
(emptyClient):
(-[WebPreviewLoader initWithResourceLoader:resourceResponse:]):
(-[WebPreviewLoader appendDataArray:]):
(-[WebPreviewLoader finishedAppending]):
(-[WebPreviewLoader failed]):
(-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]):
(-[WebPreviewLoader connection:didReceiveData:lengthReceived:]):
(-[WebPreviewLoader connectionDidFinishLoading:]):
(isQuickLookPasswordError):
(-[WebPreviewLoader connection:didFailWithError:]):
(WebCore::PreviewLoader::PreviewLoader):
(WebCore::PreviewLoader::~PreviewLoader):
(WebCore::PreviewLoader::shouldCreateForMIMEType):
(WebCore::PreviewLoader::create):
(WebCore::PreviewLoader::didReceiveData):
(WebCore::PreviewLoader::didReceiveBuffer):
(WebCore::PreviewLoader::didFinishLoading):
(WebCore::PreviewLoader::didFail):
(WebCore::PreviewLoader::setClientForTesting):
* loader/ios/QuickLook.h:
(): Deleted.
* loader/ios/QuickLook.mm:
(WebCore::QLPreviewGetSupportedMIMETypesSet):
(WebCore::removeQLPreviewConverterForURL):
(WebCore::registerQLPreviewConverterIfNeeded):
(WebCore::QLPreviewProtocol):
(WebCore::isQuickLookPreviewURL):
(qlPreviewConverterDictionaryMutex): Deleted.
(QLPreviewConverterDictionary): Deleted.
(QLContentDictionary): Deleted.
(addQLPreviewConverterWithFileForURL): Deleted.
(createQLPreviewProtocol): Deleted.
(testingClient): Deleted.
(emptyClient): Deleted.
(-[WebPreviewLoader initWithResourceLoader:resourceResponse:quickLookHandle:]): Deleted.
(-[WebPreviewLoader appendDataArray:]): Deleted.
(-[WebPreviewLoader finishedAppending]): Deleted.
(-[WebPreviewLoader failed]): Deleted.
(-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]): Deleted.
(-[WebPreviewLoader connection:didReceiveData:lengthReceived:]): Deleted.
(-[WebPreviewLoader connectionDidFinishLoading:]): Deleted.
(isQuickLookPasswordError): Deleted.
(-[WebPreviewLoader connection:didFailWithError:]): Deleted.
(WebCore::QuickLookHandle::QuickLookHandle): Deleted.
(WebCore::QuickLookHandle::~QuickLookHandle): Deleted.
(WebCore::QuickLookHandle::shouldCreateForMIMEType): Deleted.
(WebCore::QuickLookHandle::create): Deleted.
(WebCore::QuickLookHandle::didReceiveData): Deleted.
(WebCore::QuickLookHandle::didReceiveBuffer): Deleted.
(WebCore::QuickLookHandle::didFinishLoading): Deleted.
(WebCore::QuickLookHandle::didFail): Deleted.
(WebCore::QuickLookHandle::setClientForTesting): Deleted.
* platform/network/ResourceHandle.h:
* platform/network/ios/PreviewLoaderClient.h: Renamed from Source/WebCore/platform/network/ios/QuickLookHandleClient.h.
(WebCore::PreviewLoaderClient::~PreviewLoaderClient):
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setQuickLookPassword):
* testing/MockPreviewLoaderClient.cpp: Renamed from Source/WebCore/testing/MockQuickLookHandleClient.cpp.
(WebCore::MockPreviewLoaderClient::singleton):
(WebCore::MockPreviewLoaderClient::didRequestPassword):
* testing/MockPreviewLoaderClient.h: Renamed from Source/WebCore/testing/MockQuickLookHandleClient.h.

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createPreviewLoaderClient):
(WebFrameLoaderClient::createQuickLookHandleClient): Deleted.

Source/WebKit2:

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::createPreviewLoaderClient):
(WebKit::WebFrameLoaderClient::createQuickLookHandleClient): Deleted.
* WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp.
(WebKit::WebPreviewLoaderClient::WebPreviewLoaderClient):
(WebKit::WebPreviewLoaderClient::~WebPreviewLoaderClient):
(WebKit::WebPreviewLoaderClient::didReceiveDataArray):
(WebKit::WebPreviewLoaderClient::didFinishLoading):
(WebKit::WebPreviewLoaderClient::didFail):
(WebKit::WebPreviewLoaderClient::didRequestPassword):
(WebKit::WebPreviewLoaderClient::didReceivePassword):
* WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didReceivePasswordForQuickLookDocument):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientscpp">trunk/Source/WebCore/loader/EmptyClients.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderFrameLoaderClienth">trunk/Source/WebCore/loader/FrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadercpp">trunk/Source/WebCore/loader/ResourceLoader.cpp</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="#trunkSourceWebCoreplatformnetworkResourceHandleh">trunk/Source/WebCore/platform/network/ResourceHandle.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebFrameLoaderClientIOSmm">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreloaderiosPreviewLoaderh">trunk/Source/WebCore/loader/ios/PreviewLoader.h</a></li>
<li><a href="#trunkSourceWebCoreloaderiosPreviewLoadermm">trunk/Source/WebCore/loader/ios/PreviewLoader.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkiosPreviewLoaderClienth">trunk/Source/WebCore/platform/network/ios/PreviewLoaderClient.h</a></li>
<li><a href="#trunkSourceWebCoretestingMockPreviewLoaderClientcpp">trunk/Source/WebCore/testing/MockPreviewLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingMockPreviewLoaderClienth">trunk/Source/WebCore/testing/MockPreviewLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebPreviewLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebPreviewLoaderClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformnetworkiosQuickLookHandleClienth">trunk/Source/WebCore/platform/network/ios/QuickLookHandleClient.h</a></li>
<li><a href="#trunkSourceWebCoretestingMockQuickLookHandleClientcpp">trunk/Source/WebCore/testing/MockQuickLookHandleClient.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingMockQuickLookHandleClienth">trunk/Source/WebCore/testing/MockQuickLookHandleClient.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebQuickLookHandleClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportiosWebQuickLookHandleClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/ChangeLog        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -1,3 +1,91 @@
</span><ins>+2017-03-22  Andy Estes  &lt;aestes@apple.com&gt;
+
+        [QuickLook] Rename QuickLookHandle to PreviewLoader
+        https://bugs.webkit.org/show_bug.cgi?id=169961
+
+        Reviewed by Andreas Kling.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/EmptyClients.cpp:
+        * loader/FrameLoaderClient.h:
+        * loader/ResourceLoader.cpp:
+        (WebCore::ResourceLoader::isQuickLookResource):
+        * loader/ResourceLoader.h:
+        * loader/SubresourceLoader.cpp:
+        (WebCore::SubresourceLoader::shouldCreatePreviewLoaderForResponse):
+        (WebCore::SubresourceLoader::didReceiveResponse):
+        (WebCore::SubresourceLoader::didReceiveData):
+        (WebCore::SubresourceLoader::didReceiveBuffer):
+        (WebCore::SubresourceLoader::didFinishLoading):
+        (WebCore::SubresourceLoader::didFail):
+        (WebCore::SubresourceLoader::shouldCreateQuickLookHandleForResponse): Deleted.
+        * loader/SubresourceLoader.h:
+        * loader/ios/PreviewLoader.h: Copied from Source/WebCore/loader/ios/QuickLook.h.
+        * loader/ios/PreviewLoader.mm: Added.
+        (testingClient):
+        (emptyClient):
+        (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]):
+        (-[WebPreviewLoader appendDataArray:]):
+        (-[WebPreviewLoader finishedAppending]):
+        (-[WebPreviewLoader failed]):
+        (-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]):
+        (-[WebPreviewLoader connection:didReceiveData:lengthReceived:]):
+        (-[WebPreviewLoader connectionDidFinishLoading:]):
+        (isQuickLookPasswordError):
+        (-[WebPreviewLoader connection:didFailWithError:]):
+        (WebCore::PreviewLoader::PreviewLoader):
+        (WebCore::PreviewLoader::~PreviewLoader):
+        (WebCore::PreviewLoader::shouldCreateForMIMEType):
+        (WebCore::PreviewLoader::create):
+        (WebCore::PreviewLoader::didReceiveData):
+        (WebCore::PreviewLoader::didReceiveBuffer):
+        (WebCore::PreviewLoader::didFinishLoading):
+        (WebCore::PreviewLoader::didFail):
+        (WebCore::PreviewLoader::setClientForTesting):
+        * loader/ios/QuickLook.h:
+        (): Deleted.
+        * loader/ios/QuickLook.mm:
+        (WebCore::QLPreviewGetSupportedMIMETypesSet):
+        (WebCore::removeQLPreviewConverterForURL):
+        (WebCore::registerQLPreviewConverterIfNeeded):
+        (WebCore::QLPreviewProtocol):
+        (WebCore::isQuickLookPreviewURL):
+        (qlPreviewConverterDictionaryMutex): Deleted.
+        (QLPreviewConverterDictionary): Deleted.
+        (QLContentDictionary): Deleted.
+        (addQLPreviewConverterWithFileForURL): Deleted.
+        (createQLPreviewProtocol): Deleted.
+        (testingClient): Deleted.
+        (emptyClient): Deleted.
+        (-[WebPreviewLoader initWithResourceLoader:resourceResponse:quickLookHandle:]): Deleted.
+        (-[WebPreviewLoader appendDataArray:]): Deleted.
+        (-[WebPreviewLoader finishedAppending]): Deleted.
+        (-[WebPreviewLoader failed]): Deleted.
+        (-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]): Deleted.
+        (-[WebPreviewLoader connection:didReceiveData:lengthReceived:]): Deleted.
+        (-[WebPreviewLoader connectionDidFinishLoading:]): Deleted.
+        (isQuickLookPasswordError): Deleted.
+        (-[WebPreviewLoader connection:didFailWithError:]): Deleted.
+        (WebCore::QuickLookHandle::QuickLookHandle): Deleted.
+        (WebCore::QuickLookHandle::~QuickLookHandle): Deleted.
+        (WebCore::QuickLookHandle::shouldCreateForMIMEType): Deleted.
+        (WebCore::QuickLookHandle::create): Deleted.
+        (WebCore::QuickLookHandle::didReceiveData): Deleted.
+        (WebCore::QuickLookHandle::didReceiveBuffer): Deleted.
+        (WebCore::QuickLookHandle::didFinishLoading): Deleted.
+        (WebCore::QuickLookHandle::didFail): Deleted.
+        (WebCore::QuickLookHandle::setClientForTesting): Deleted.
+        * platform/network/ResourceHandle.h:
+        * platform/network/ios/PreviewLoaderClient.h: Renamed from Source/WebCore/platform/network/ios/QuickLookHandleClient.h.
+        (WebCore::PreviewLoaderClient::~PreviewLoaderClient):
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+        (WebCore::Internals::setQuickLookPassword):
+        * testing/MockPreviewLoaderClient.cpp: Renamed from Source/WebCore/testing/MockQuickLookHandleClient.cpp.
+        (WebCore::MockPreviewLoaderClient::singleton):
+        (WebCore::MockPreviewLoaderClient::didRequestPassword):
+        * testing/MockPreviewLoaderClient.h: Renamed from Source/WebCore/testing/MockQuickLookHandleClient.h.
+
</ins><span class="cx"> 2017-03-22  Romain Bellessort  &lt;romain.bellessort@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         [Readable Streams API] Implement ReadableStreamBYOBRequest respond() (readable stream state)
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -4159,7 +4159,7 @@
</span><span class="cx">                 A10BB5851484E3A700B2E87A /* RenderSVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = A10BB5831484E3A700B2E87A /* RenderSVGRect.h */; };
</span><span class="cx">                 A10BB58B1484E3B300B2E87A /* RenderSVGShape.h in Headers */ = {isa = PBXBuildFile; fileRef = A10BB5891484E3B300B2E87A /* RenderSVGShape.h */; };
</span><span class="cx">                 A10D7FEC1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A10D7FEB1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                A10DBF4718F92317000D70C6 /* QuickLookHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A10DBF4618F92317000D70C6 /* QuickLookHandleClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                A10DBF4718F92317000D70C6 /* PreviewLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A10DBF4618F92317000D70C6 /* PreviewLoaderClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 A10DC76A14747BAB005E2471 /* StyleGridData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A10DC76814747BAB005E2471 /* StyleGridData.cpp */; };
</span><span class="cx">                 A10DC76B14747BAB005E2471 /* StyleGridData.h in Headers */ = {isa = PBXBuildFile; fileRef = A10DC76914747BAB005E2471 /* StyleGridData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A110DB9B14F5DF7700A03B93 /* StyleGridItemData.h in Headers */ = {isa = PBXBuildFile; fileRef = A110DB9A14F5DF7700A03B93 /* StyleGridItemData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -4175,8 +4175,8 @@
</span><span class="cx">                 A12A1050166444FD008FA311 /* GridTrackSize.h in Headers */ = {isa = PBXBuildFile; fileRef = A12A104E166444DC008FA311 /* GridTrackSize.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A136A00C1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */; };
</span><span class="cx">                 A136A00D1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h in Headers */ = {isa = PBXBuildFile; fileRef = A136A00B1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h */; };
</span><del>-                A140618B1E2ECA0A0032B34E /* MockQuickLookHandleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A14061891E2ECA0A0032B34E /* MockQuickLookHandleClient.cpp */; };
-                A140618C1E2ECA0A0032B34E /* MockQuickLookHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A140618A1E2ECA0A0032B34E /* MockQuickLookHandleClient.h */; };
</del><ins>+                A140618B1E2ECA0A0032B34E /* MockPreviewLoaderClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A14061891E2ECA0A0032B34E /* MockPreviewLoaderClient.cpp */; };
+                A140618C1E2ECA0A0032B34E /* MockPreviewLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A140618A1E2ECA0A0032B34E /* MockPreviewLoaderClient.h */; };
</ins><span class="cx">                 A14090FB1AA51E1D0091191A /* ContentFilterUnblockHandlerCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = A14090FA1AA51E1D0091191A /* ContentFilterUnblockHandlerCocoa.mm */; };
</span><span class="cx">                 A14090FD1AA51E480091191A /* ContentFilterUnblockHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = A14090FC1AA51E480091191A /* ContentFilterUnblockHandler.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A14832B0187F618D00DA63A6 /* WAKAppKitStubs.h in Headers */ = {isa = PBXBuildFile; fileRef = A148328C187F508700DA63A6 /* WAKAppKitStubs.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -4225,6 +4225,8 @@
</span><span class="cx">                 A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
</span><span class="cx">                 A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */; };
</span><span class="cx">                 A182D5B71BE722670087A7CC /* SettingsCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = A182D5B61BE722620087A7CC /* SettingsCocoa.mm */; };
</span><ins>+                A185B4291E8211A100DC9118 /* PreviewLoader.mm in Sources */ = {isa = PBXBuildFile; fileRef = A185B4271E8211A100DC9118 /* PreviewLoader.mm */; };
+                A185B42A1E8211A100DC9118 /* PreviewLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = A185B4281E8211A100DC9118 /* PreviewLoader.h */; };
</ins><span class="cx">                 A18890AE1AA13F250026C301 /* ParentalControlsContentFilter.mm in Sources */ = {isa = PBXBuildFile; fileRef = A18890AC1AA13F250026C301 /* ParentalControlsContentFilter.mm */; };
</span><span class="cx">                 A18890AF1AA13F250026C301 /* ParentalControlsContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A18890AD1AA13F250026C301 /* ParentalControlsContentFilter.h */; };
</span><span class="cx">                 A19AEA211AAA808600B52B25 /* JSMockContentFilterSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = A19AEA1E1AAA806E00B52B25 /* JSMockContentFilterSettings.h */; };
</span><span class="lines">@@ -12282,7 +12284,7 @@
</span><span class="cx">                 A10BB5881484E3B300B2E87A /* RenderSVGShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGShape.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A10BB5891484E3B300B2E87A /* RenderSVGShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGShape.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A10D7FEB1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFNetworkConnectionCacheSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A10DBF4618F92317000D70C6 /* QuickLookHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuickLookHandleClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                A10DBF4618F92317000D70C6 /* PreviewLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreviewLoaderClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A10DC76814747BAB005E2471 /* StyleGridData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleGridData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A10DC76914747BAB005E2471 /* StyleGridData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleGridData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A110DB9A14F5DF7700A03B93 /* StyleGridItemData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleGridItemData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -12298,8 +12300,8 @@
</span><span class="cx">                 A12A104E166444DC008FA311 /* GridTrackSize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridTrackSize.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLHttpRequestProgressEventThrottle.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A136A00B1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLHttpRequestProgressEventThrottle.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A14061891E2ECA0A0032B34E /* MockQuickLookHandleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockQuickLookHandleClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                A140618A1E2ECA0A0032B34E /* MockQuickLookHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockQuickLookHandleClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                A14061891E2ECA0A0032B34E /* MockPreviewLoaderClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockPreviewLoaderClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A140618A1E2ECA0A0032B34E /* MockPreviewLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockPreviewLoaderClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A14090FA1AA51E1D0091191A /* ContentFilterUnblockHandlerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContentFilterUnblockHandlerCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A14090FC1AA51E480091191A /* ContentFilterUnblockHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentFilterUnblockHandler.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A148328C187F508700DA63A6 /* WAKAppKitStubs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WAKAppKitStubs.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -12349,6 +12351,8 @@
</span><span class="cx">                 A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementFactory.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A182D5B61BE722620087A7CC /* SettingsCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SettingsCocoa.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                A185B4271E8211A100DC9118 /* PreviewLoader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PreviewLoader.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A185B4281E8211A100DC9118 /* PreviewLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreviewLoader.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A18890AC1AA13F250026C301 /* ParentalControlsContentFilter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ParentalControlsContentFilter.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A18890AD1AA13F250026C301 /* ParentalControlsContentFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParentalControlsContentFilter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A19AEA1C1AAA7C4900B52B25 /* MockContentFilterSettings.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = MockContentFilterSettings.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17508,8 +17512,8 @@
</span><span class="cx">                                 2D6F3E8C1C1ECB1C0061DBD4 /* MockPageOverlay.idl */,
</span><span class="cx">                                 2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */,
</span><span class="cx">                                 2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */,
</span><del>-                                A14061891E2ECA0A0032B34E /* MockQuickLookHandleClient.cpp */,
-                                A140618A1E2ECA0A0032B34E /* MockQuickLookHandleClient.h */,
</del><ins>+                                A14061891E2ECA0A0032B34E /* MockPreviewLoaderClient.cpp */,
+                                A140618A1E2ECA0A0032B34E /* MockPreviewLoaderClient.h */,
</ins><span class="cx">                                 EB081CD81696084400553730 /* TypeConversions.h */,
</span><span class="cx">                                 EB081CD91696084400553730 /* TypeConversions.idl */,
</span><span class="cx">                                 E1BA67191742BEF400C20251 /* WebCoreTestShimLibrary.cpp */,
</span><span class="lines">@@ -17723,7 +17727,7 @@
</span><span class="cx">                                 443F04260E75C8FB007E5407 /* NetworkStateNotifierIOS.mm */,
</span><span class="cx">                                 A1C150781E3F2B3E0032C98C /* PreviewConverter.h */,
</span><span class="cx">                                 A1C150771E3F2B3E0032C98C /* PreviewConverter.mm */,
</span><del>-                                A10DBF4618F92317000D70C6 /* QuickLookHandleClient.h */,
</del><ins>+                                A10DBF4618F92317000D70C6 /* PreviewLoaderClient.h */,
</ins><span class="cx">                                 7E428CE413E3407F003B661C /* ResourceHandleIOS.mm */,
</span><span class="cx">                                 7E7DE201195CEFCD0035363B /* ResourceRequestIOS.mm */,
</span><span class="cx">                                 44A20DB80F84166C00B3E1FE /* WebCoreURLResponseIOS.h */,
</span><span class="lines">@@ -20783,6 +20787,8 @@
</span><span class="cx">                 A15E31F01E0CB075004B371C /* ios */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                A185B4281E8211A100DC9118 /* PreviewLoader.h */,
+                                A185B4271E8211A100DC9118 /* PreviewLoader.mm */,
</ins><span class="cx">                                 A15E31F11E0CB0AA004B371C /* QuickLook.h */,
</span><span class="cx">                                 A15E31F21E0CB0AA004B371C /* QuickLook.mm */,
</span><span class="cx">                         );
</span><span class="lines">@@ -26098,7 +26104,7 @@
</span><span class="cx">                                 4157EBFB1E3AB67F00AC9FE9 /* MockLibWebRTCPeerConnection.h in Headers */,
</span><span class="cx">                                 2D6F3E911C1ECB2F0061DBD4 /* MockPageOverlay.h in Headers */,
</span><span class="cx">                                 2D97F04819DD4140001EE9C3 /* MockPageOverlayClient.h in Headers */,
</span><del>-                                A140618C1E2ECA0A0032B34E /* MockQuickLookHandleClient.h in Headers */,
</del><ins>+                                A140618C1E2ECA0A0032B34E /* MockPreviewLoaderClient.h in Headers */,
</ins><span class="cx">                                 AA5F3B8D16CC33D100455EB0 /* PlatformSpeechSynthesizerMock.h in Headers */,
</span><span class="cx">                                 A1763F3F1E205234001D58DE /* WebArchiveDumpSupport.h in Headers */,
</span><span class="cx">                                 41815C1F138319830057AAA4 /* WebCoreTestSupport.h in Headers */,
</span><span class="lines">@@ -26303,6 +26309,7 @@
</span><span class="cx">                                 2EDEF1F5121B0EFC00726DB2 /* BlobRegistry.h in Headers */,
</span><span class="cx">                                 2EDEF1F7121B0EFC00726DB2 /* BlobRegistryImpl.h in Headers */,
</span><span class="cx">                                 2EB4BCD3121F03E300EC4885 /* BlobResourceHandle.h in Headers */,
</span><ins>+                                A185B42A1E8211A100DC9118 /* PreviewLoader.h in Headers */,
</ins><span class="cx">                                 976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */,
</span><span class="cx">                                 BC5EB5E10E81BE8700B25965 /* BorderData.h in Headers */,
</span><span class="cx">                                 589556ED18D4A44000764B03 /* BorderEdge.h in Headers */,
</span><span class="lines">@@ -28627,7 +28634,7 @@
</span><span class="cx">                                 550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */,
</span><span class="cx">                                 CE12523D1A1676CD00864480 /* QuartzCoreSPI.h in Headers */,
</span><span class="cx">                                 A15E31F41E0CB0B5004B371C /* QuickLook.h in Headers */,
</span><del>-                                A10DBF4718F92317000D70C6 /* QuickLookHandleClient.h in Headers */,
</del><ins>+                                A10DBF4718F92317000D70C6 /* PreviewLoaderClient.h in Headers */,
</ins><span class="cx">                                 937F4CCC1A2D48C100BB39F5 /* QuickLookMacSPI.h in Headers */,
</span><span class="cx">                                 443918001A91B2F8006E04F2 /* QuickLookSoftLink.h in Headers */,
</span><span class="cx">                                 CE1252391A166FA000864480 /* QuickLookSPI.h in Headers */,
</span><span class="lines">@@ -30196,7 +30203,7 @@
</span><span class="cx">                                 4157EBFA1E3AB67900AC9FE9 /* MockLibWebRTCPeerConnection.cpp in Sources */,
</span><span class="cx">                                 2D6F3E901C1ECB270061DBD4 /* MockPageOverlay.cpp in Sources */,
</span><span class="cx">                                 2D97F04719DD413C001EE9C3 /* MockPageOverlayClient.cpp in Sources */,
</span><del>-                                A140618B1E2ECA0A0032B34E /* MockQuickLookHandleClient.cpp in Sources */,
</del><ins>+                                A140618B1E2ECA0A0032B34E /* MockPreviewLoaderClient.cpp in Sources */,
</ins><span class="cx">                                 AA5F3B8F16CC4B3900455EB0 /* PlatformSpeechSynthesizerMock.cpp in Sources */,
</span><span class="cx">                                 A1763F3E1E205234001D58DE /* WebArchiveDumpSupport.mm in Sources */,
</span><span class="cx">                                 41815C1E138319830057AAA4 /* WebCoreTestSupport.cpp in Sources */,
</span><span class="lines">@@ -31432,6 +31439,7 @@
</span><span class="cx">                                 947949331E0459FA00018D85 /* JSDeprecatedCSSOMRect.cpp in Sources */,
</span><span class="cx">                                 947949351E0459FA00018D85 /* JSDeprecatedCSSOMRGBColor.cpp in Sources */,
</span><span class="cx">                                 947949371E0459FA00018D85 /* JSDeprecatedCSSOMValue.cpp in Sources */,
</span><ins>+                                A185B4291E8211A100DC9118 /* PreviewLoader.mm in Sources */,
</ins><span class="cx">                                 947949391E0459FA00018D85 /* JSDeprecatedCSSOMValueList.cpp in Sources */,
</span><span class="cx">                                 31FB1A65120A5D3F00DC02A0 /* JSDeviceMotionEvent.cpp in Sources */,
</span><span class="cx">                                 59A86006119DAF7F00DEF1EF /* JSDeviceOrientationEvent.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.cpp        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-#include &quot;QuickLookHandleClient.h&quot;
</del><ins>+#include &quot;PreviewLoaderClient.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx">     void prefetchDNS(const String&amp;) final { }
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    RefPtr&lt;QuickLookHandleClient&gt; createQuickLookHandleClient(const String&amp;, const String&amp;) final { return nullptr; }
</del><ins>+    RefPtr&lt;PreviewLoaderClient&gt; createPreviewLoaderClient(const String&amp;, const String&amp;) final { return nullptr; }
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoaderClient.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoaderClient.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/loader/FrameLoaderClient.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -83,8 +83,8 @@
</span><span class="cx"> class Page;
</span><span class="cx"> class PluginViewBase;
</span><span class="cx"> class PolicyChecker;
</span><ins>+class PreviewLoaderClient;
</ins><span class="cx"> class ProtectionSpace;
</span><del>-class QuickLookHandleClient;
</del><span class="cx"> class RTCPeerConnectionHandler;
</span><span class="cx"> class ResourceError;
</span><span class="cx"> class ResourceHandle;
</span><span class="lines">@@ -342,7 +342,7 @@
</span><span class="cx">     virtual bool isEmptyFrameLoaderClient() { return false; }
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    virtual RefPtr&lt;QuickLookHandleClient&gt; createQuickLookHandleClient(const String&amp;, const String&amp;) = 0;
</del><ins>+    virtual RefPtr&lt;PreviewLoaderClient&gt; createPreviewLoaderClient(const String&amp;, const String&amp;) = 0;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.cpp (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.cpp        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/loader/ResourceLoader.cpp        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> #include &quot;PreviewConverter.h&quot;
</span><del>-#include &quot;QuickLook.h&quot;
</del><ins>+#include &quot;PreviewLoader.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -748,7 +748,7 @@
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> bool ResourceLoader::isQuickLookResource() const
</span><span class="cx"> {
</span><del>-    return !!m_quickLookHandle;
</del><ins>+    return !!m_previewLoader;
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoader.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoader.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/loader/ResourceLoader.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> class Frame;
</span><span class="cx"> class FrameLoader;
</span><span class="cx"> class NetworkLoadMetrics;
</span><del>-class QuickLookHandle;
</del><ins>+class PreviewLoader;
</ins><span class="cx"> class URL;
</span><span class="cx"> 
</span><span class="cx"> class ResourceLoader : public RefCounted&lt;ResourceLoader&gt;, protected ResourceHandleClient {
</span><span class="lines">@@ -175,7 +175,7 @@
</span><span class="cx">     ResourceResponse m_response;
</span><span class="cx">     LoadTiming m_loadTiming;
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    std::unique_ptr&lt;QuickLookHandle&gt; m_quickLookHandle;
</del><ins>+    std::unique_ptr&lt;PreviewLoader&gt; m_previewLoader;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.cpp (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.cpp        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/loader/SubresourceLoader.cpp        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-#include &quot;QuickLook.h&quot;
</del><ins>+#include &quot;PreviewLoader.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -261,15 +261,15 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> 
</span><del>-bool SubresourceLoader::shouldCreateQuickLookHandleForResponse(const ResourceResponse&amp; response) const
</del><ins>+bool SubresourceLoader::shouldCreatePreviewLoaderForResponse(const ResourceResponse&amp; response) const
</ins><span class="cx"> {
</span><span class="cx">     if (m_resource-&gt;type() != CachedResource::MainResource)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (m_quickLookHandle)
</del><ins>+    if (m_previewLoader)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    return QuickLookHandle::shouldCreateForMIMEType(response.mimeType());
</del><ins>+    return PreviewLoader::shouldCreateForMIMEType(response.mimeType());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="lines">@@ -280,8 +280,8 @@
</span><span class="cx">     ASSERT(m_state == Initialized);
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    if (shouldCreateQuickLookHandleForResponse(response)) {
-        m_quickLookHandle = QuickLookHandle::create(*this, response);
</del><ins>+    if (shouldCreatePreviewLoaderForResponse(response)) {
+        m_previewLoader = PreviewLoader::create(*this, response);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -367,8 +367,8 @@
</span><span class="cx"> void SubresourceLoader::didReceiveData(const char* data, unsigned length, long long encodedDataLength, DataPayloadType dataPayloadType)
</span><span class="cx"> {
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    if (auto quickLookHandle = m_quickLookHandle.get()) {
-        if (quickLookHandle-&gt;didReceiveData(data, length))
</del><ins>+    if (auto previewLoader = m_previewLoader.get()) {
+        if (previewLoader-&gt;didReceiveData(data, length))
</ins><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -379,8 +379,8 @@
</span><span class="cx"> void SubresourceLoader::didReceiveBuffer(Ref&lt;SharedBuffer&gt;&amp;&amp; buffer, long long encodedDataLength, DataPayloadType dataPayloadType)
</span><span class="cx"> {
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    if (auto quickLookHandle = m_quickLookHandle.get()) {
-        if (quickLookHandle-&gt;didReceiveBuffer(buffer.get()))
</del><ins>+    if (auto previewLoader = m_previewLoader.get()) {
+        if (previewLoader-&gt;didReceiveBuffer(buffer.get()))
</ins><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -524,8 +524,8 @@
</span><span class="cx"> void SubresourceLoader::didFinishLoading(const NetworkLoadMetrics&amp; networkLoadMetrics)
</span><span class="cx"> {
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    if (auto quickLookHandle = m_quickLookHandle.get()) {
-        if (quickLookHandle-&gt;didFinishLoading())
</del><ins>+    if (auto previewLoader = m_previewLoader.get()) {
+        if (previewLoader-&gt;didFinishLoading())
</ins><span class="cx">             return;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -578,8 +578,8 @@
</span><span class="cx"> void SubresourceLoader::didFail(const ResourceError&amp; error)
</span><span class="cx"> {
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    if (auto quickLookHandle = m_quickLookHandle.get())
-        quickLookHandle-&gt;didFail();
</del><ins>+    if (auto previewLoader = m_previewLoader.get())
+        previewLoader-&gt;didFail();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (m_state != Initialized)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceLoader.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceLoader.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/loader/SubresourceLoader.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    bool shouldCreateQuickLookHandleForResponse(const ResourceResponse&amp;) const;
</del><ins>+    bool shouldCreatePreviewLoaderForResponse(const ResourceResponse&amp;) const;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     enum SubresourceLoaderState {
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderiosPreviewLoaderhfromrev214265trunkSourceWebCoreloaderiosQuickLookh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/loader/ios/PreviewLoader.h (from rev 214265, trunk/Source/WebCore/loader/ios/QuickLook.h) (0 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ios/PreviewLoader.h                                (rev 0)
+++ trunk/Source/WebCore/loader/ios/PreviewLoader.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -0,0 +1,63 @@
</span><ins>+/*
+ * Copyright (C) 2009-2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &lt;wtf/Forward.h&gt;
+#include &lt;wtf/Noncopyable.h&gt;
+#include &lt;wtf/RetainPtr.h&gt;
+
+OBJC_CLASS WebPreviewLoader;
+
+namespace WebCore {
+
+class PreviewLoaderClient;
+class ResourceLoader;
+class ResourceResponse;
+class SharedBuffer;
+
+class PreviewLoader {
+    WTF_MAKE_NONCOPYABLE(PreviewLoader);
+public:
+    static bool shouldCreateForMIMEType(const String&amp;);
+    static std::unique_ptr&lt;PreviewLoader&gt; create(ResourceLoader&amp;, const ResourceResponse&amp;);
+    ~PreviewLoader();
+
+    bool didReceiveData(const char* data, unsigned length);
+    bool didReceiveBuffer(const SharedBuffer&amp;);
+    bool didFinishLoading();
+    void didFail();
+
+    WEBCORE_EXPORT static void setClientForTesting(RefPtr&lt;PreviewLoaderClient&gt;&amp;&amp;);
+
+private:
+    friend std::unique_ptr&lt;PreviewLoader&gt; std::make_unique&lt;PreviewLoader&gt;(ResourceLoader&amp;, const ResourceResponse&amp;);
+    PreviewLoader(ResourceLoader&amp;, const ResourceResponse&amp;);
+
+    RetainPtr&lt;WebPreviewLoader&gt; m_previewLoader;
+    bool m_finishedLoadingDataIntoConverter { false };
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreloaderiosPreviewLoadermm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/loader/ios/PreviewLoader.mm (0 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ios/PreviewLoader.mm                                (rev 0)
+++ trunk/Source/WebCore/loader/ios/PreviewLoader.mm        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -0,0 +1,247 @@
</span><ins>+/*
+ * Copyright (C) 2009-2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;config.h&quot;
+#import &quot;PreviewLoader.h&quot;
+
+#if USE(QUICK_LOOK)
+
+#import &quot;DocumentLoader.h&quot;
+#import &quot;FrameLoader.h&quot;
+#import &quot;FrameLoaderClient.h&quot;
+#import &quot;Logging.h&quot;
+#import &quot;PreviewConverter.h&quot;
+#import &quot;PreviewLoaderClient.h&quot;
+#import &quot;QuickLook.h&quot;
+#import &quot;QuickLookSPI.h&quot;
+#import &quot;ResourceLoader.h&quot;
+#import &lt;wtf/NeverDestroyed.h&gt;
+
+using namespace WebCore;
+
+@interface WebPreviewLoader : NSObject {
+    RefPtr&lt;ResourceLoader&gt; _resourceLoader;
+    ResourceResponse _response;
+    RefPtr&lt;PreviewLoaderClient&gt; _client;
+    std::unique_ptr&lt;PreviewConverter&gt; _converter;
+    RetainPtr&lt;NSMutableArray&gt; _bufferedDataArray;
+    BOOL _hasSentDidReceiveResponse;
+}
+
+- (instancetype)initWithResourceLoader:(ResourceLoader&amp;)resourceLoader resourceResponse:(const ResourceResponse&amp;)resourceResponse;
+- (void)appendDataArray:(NSArray&lt;NSData *&gt; *)dataArray;
+- (void)finishedAppending;
+- (void)failed;
+
+@end
+
+@implementation WebPreviewLoader
+
+static RefPtr&lt;PreviewLoaderClient&gt;&amp; testingClient()
+{
+    static NeverDestroyed&lt;RefPtr&lt;PreviewLoaderClient&gt;&gt; testingClient;
+    return testingClient.get();
+}
+
+static PreviewLoaderClient&amp; emptyClient()
+{
+    static NeverDestroyed&lt;PreviewLoaderClient&gt; emptyClient;
+    return emptyClient.get();
+}
+
+- (instancetype)initWithResourceLoader:(ResourceLoader&amp;)resourceLoader resourceResponse:(const ResourceResponse&amp;)resourceResponse
+{
+    self = [super init];
+    if (!self)
+        return nil;
+
+    _resourceLoader = &amp;resourceLoader;
+    _response = resourceResponse;
+    _converter = std::make_unique&lt;PreviewConverter&gt;(self, _response);
+    _bufferedDataArray = adoptNS([[NSMutableArray alloc] init]);
+
+    if (testingClient())
+        _client = testingClient();
+    else if (auto client = resourceLoader.frameLoader()-&gt;client().createPreviewLoaderClient(_converter-&gt;previewFileName(), _converter-&gt;previewUTI()))
+        _client = WTFMove(client);
+    else
+        _client = &amp;emptyClient();
+
+    LOG(Network, &quot;WebPreviewConverter created with preview file name \&quot;%s\&quot;.&quot;, _converter-&gt;previewFileName().utf8().data());
+    return self;
+}
+
+- (void)appendDataArray:(NSArray&lt;NSData *&gt; *)dataArray
+{
+    LOG(Network, &quot;WebPreviewConverter appending data array with count %ld.&quot;, dataArray.count);
+    [_converter-&gt;platformConverter() appendDataArray:dataArray];
+    [_bufferedDataArray addObjectsFromArray:dataArray];
+    _client-&gt;didReceiveDataArray((CFArrayRef)dataArray);
+}
+
+- (void)finishedAppending
+{
+    LOG(Network, &quot;WebPreviewConverter finished appending data.&quot;);
+    [_converter-&gt;platformConverter() finishedAppendingData];
+    _client-&gt;didFinishLoading();
+}
+
+- (void)failed
+{
+    LOG(Network, &quot;WebPreviewConverter failed.&quot;);
+    [_converter-&gt;platformConverter() finishConverting];
+    _client-&gt;didFail();
+}
+
+- (void)_sendDidReceiveResponseIfNecessary
+{
+    if (_hasSentDidReceiveResponse)
+        return;
+
+    [_bufferedDataArray removeAllObjects];
+
+    ResourceResponse response { _converter-&gt;previewResponse() };
+    response.setIsQuickLook(true);
+    ASSERT(response.mimeType().length());
+
+    _resourceLoader-&gt;documentLoader()-&gt;setPreviewConverter(WTFMove(_converter));
+
+    _hasSentDidReceiveResponse = YES;
+    _resourceLoader-&gt;didReceiveResponse(response);
+}
+
+- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data lengthReceived:(long long)lengthReceived
+{
+    ASSERT_UNUSED(connection, !connection);
+    [self _sendDidReceiveResponseIfNecessary];
+
+    // 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 (auto dataLength = data.length)
+        _resourceLoader-&gt;didReceiveData(reinterpret_cast&lt;const char*&gt;(data.bytes), dataLength, lengthReceived, DataPayloadBytes);
+}
+
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+{
+    ASSERT_UNUSED(connection, !connection);
+    ASSERT(_hasSentDidReceiveResponse);
+
+    NetworkLoadMetrics emptyMetrics;
+    _resourceLoader-&gt;didFinishLoading(emptyMetrics);
+}
+
+static inline bool isQuickLookPasswordError(NSError *error)
+{
+    return error.code == kQLReturnPasswordProtected &amp;&amp; [error.domain isEqualToString:@&quot;QuickLookErrorDomain&quot;];
+}
+
+- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
+{
+    ASSERT_UNUSED(connection, !connection);
+
+    if (!isQuickLookPasswordError(error)) {
+        [self _sendDidReceiveResponseIfNecessary];
+        _resourceLoader-&gt;didFail(error);
+        return;
+    }
+
+    if (!_client-&gt;supportsPasswordEntry()) {
+        _resourceLoader-&gt;didFail(_resourceLoader-&gt;cannotShowURLError());
+        return;
+    }
+
+    _client-&gt;didRequestPassword([self, retainedSelf = retainPtr(self)] (const String&amp; password) {
+        _converter = std::make_unique&lt;PreviewConverter&gt;(self, _response, password);
+        [_converter-&gt;platformConverter() appendDataArray:_bufferedDataArray.get()];
+        [_converter-&gt;platformConverter() finishedAppendingData];
+    });
+}
+
+@end
+
+namespace WebCore {
+
+PreviewLoader::PreviewLoader(ResourceLoader&amp; loader, const ResourceResponse&amp; response)
+    : m_previewLoader { adoptNS([[WebPreviewLoader alloc] initWithResourceLoader:loader resourceResponse:response]) }
+{
+}
+
+PreviewLoader::~PreviewLoader()
+{
+}
+
+bool PreviewLoader::shouldCreateForMIMEType(const String&amp; mimeType)
+{
+    return [QLPreviewGetSupportedMIMETypesSet() containsObject:mimeType];
+}
+
+std::unique_ptr&lt;PreviewLoader&gt; PreviewLoader::create(ResourceLoader&amp; loader, const ResourceResponse&amp; response)
+{
+    ASSERT(shouldCreateForMIMEType(response.mimeType()));
+    return std::make_unique&lt;PreviewLoader&gt;(loader, response);
+}
+
+bool PreviewLoader::didReceiveData(const char* data, unsigned length)
+{
+    if (m_finishedLoadingDataIntoConverter)
+        return false;
+
+    [m_previewLoader appendDataArray:@[ [NSData dataWithBytes:data length:length] ]];
+    return true;
+}
+
+bool PreviewLoader::didReceiveBuffer(const SharedBuffer&amp; buffer)
+{
+    if (m_finishedLoadingDataIntoConverter)
+        return false;
+
+    [m_previewLoader appendDataArray:buffer.createNSDataArray().get()];
+    return true;
+}
+
+bool PreviewLoader::didFinishLoading()
+{
+    if (m_finishedLoadingDataIntoConverter)
+        return false;
+
+    m_finishedLoadingDataIntoConverter = true;
+    [m_previewLoader finishedAppending];
+    return true;
+}
+
+void PreviewLoader::didFail()
+{
+    [m_previewLoader failed];
+    m_previewLoader = nullptr;
+}
+
+void PreviewLoader::setClientForTesting(RefPtr&lt;PreviewLoaderClient&gt;&amp;&amp; client)
+{
+    testingClient() = WTFMove(client);
+}
+
+} // namespace WebCore
+
+#endif // USE(QUICK_LOOK)
</ins></span></pre></div>
<a id="trunkSourceWebCoreloaderiosQuickLookh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ios/QuickLook.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ios/QuickLook.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/loader/ios/QuickLook.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -25,9 +25,6 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#if USE(QUICK_LOOK)
-
-#include &lt;wtf/Forward.h&gt;
</del><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> OBJC_CLASS NSData;
</span><span class="lines">@@ -35,15 +32,9 @@
</span><span class="cx"> OBJC_CLASS NSString;
</span><span class="cx"> OBJC_CLASS NSURL;
</span><span class="cx"> OBJC_CLASS NSURLRequest;
</span><del>-OBJC_CLASS WebPreviewLoader;
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class QuickLookHandleClient;
-class ResourceLoader;
-class ResourceRequest;
-class ResourceResponse;
-class SharedBuffer;
</del><span class="cx"> class URL;
</span><span class="cx"> 
</span><span class="cx"> WEBCORE_EXPORT NSSet *QLPreviewGetSupportedMIMETypesSet();
</span><span class="lines">@@ -53,28 +44,4 @@
</span><span class="cx"> WEBCORE_EXPORT bool isQuickLookPreviewURL(const URL&amp;);
</span><span class="cx"> WEBCORE_EXPORT NSString *createTemporaryFileForQuickLook(NSString *fileName);
</span><span class="cx"> 
</span><del>-class QuickLookHandle {
-    WTF_MAKE_NONCOPYABLE(QuickLookHandle);
-public:
-    static bool shouldCreateForMIMEType(const String&amp;);
-    static std::unique_ptr&lt;QuickLookHandle&gt; create(ResourceLoader&amp;, const ResourceResponse&amp;);
-    ~QuickLookHandle();
-
-    bool didReceiveData(const char* data, unsigned length);
-    bool didReceiveBuffer(const SharedBuffer&amp;);
-    bool didFinishLoading();
-    void didFail();
-
-    WEBCORE_EXPORT static void setClientForTesting(RefPtr&lt;QuickLookHandleClient&gt;&amp;&amp;);
-
-private:
-    friend std::unique_ptr&lt;QuickLookHandle&gt; std::make_unique&lt;QuickLookHandle&gt;(ResourceLoader&amp;, const ResourceResponse&amp;);
-    QuickLookHandle(ResourceLoader&amp;, const ResourceResponse&amp;);
-
-    RetainPtr&lt;WebPreviewLoader&gt; m_previewLoader;
-    bool m_finishedLoadingDataIntoConverter { false };
-};
-
</del><span class="cx"> } // namespace WebCore
</span><del>-
-#endif // USE(QUICK_LOOK)
</del></span></pre></div>
<a id="trunkSourceWebCoreloaderiosQuickLookmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ios/QuickLook.mm (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ios/QuickLook.mm        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/loader/ios/QuickLook.mm        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -28,29 +28,19 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> 
</span><del>-#import &quot;DocumentLoader.h&quot;
</del><span class="cx"> #import &quot;FileSystemIOS.h&quot;
</span><del>-#import &quot;FrameLoader.h&quot;
-#import &quot;FrameLoaderClient.h&quot;
-#import &quot;Logging.h&quot;
</del><span class="cx"> #import &quot;NSFileManagerSPI.h&quot;
</span><span class="cx"> #import &quot;PreviewConverter.h&quot;
</span><del>-#import &quot;QuickLookHandleClient.h&quot;
-#import &quot;ResourceError.h&quot;
-#import &quot;ResourceLoader.h&quot;
</del><span class="cx"> #import &quot;ResourceRequest.h&quot;
</span><span class="cx"> #import &quot;SchemeRegistry.h&quot;
</span><del>-#import &quot;SharedBuffer.h&quot;
-#import &lt;WebCore/NetworkLoadMetrics.h&gt;
</del><ins>+#import &lt;wtf/Lock.h&gt;
</ins><span class="cx"> #import &lt;wtf/NeverDestroyed.h&gt;
</span><del>-#import &lt;wtf/Vector.h&gt;
-#import &lt;wtf/text/WTFString.h&gt;
</del><span class="cx"> 
</span><span class="cx"> #import &quot;QuickLookSoftLink.h&quot;
</span><span class="cx"> 
</span><del>-using namespace WebCore;
</del><ins>+namespace WebCore {
</ins><span class="cx"> 
</span><del>-NSSet *WebCore::QLPreviewGetSupportedMIMETypesSet()
</del><ins>+NSSet *QLPreviewGetSupportedMIMETypesSet()
</ins><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;RetainPtr&lt;NSSet&gt;&gt; set = QLPreviewGetSupportedMIMETypes();
</span><span class="cx">     return set.get().get();
</span><span class="lines">@@ -74,7 +64,7 @@
</span><span class="cx">     return contentDictionary;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebCore::removeQLPreviewConverterForURL(NSURL *url)
</del><ins>+void removeQLPreviewConverterForURL(NSURL *url)
</ins><span class="cx"> {
</span><span class="cx">     LockHolder lock(qlPreviewConverterDictionaryMutex());
</span><span class="cx">     [QLPreviewConverterDictionary() removeObjectForKey:url];
</span><span class="lines">@@ -90,7 +80,7 @@
</span><span class="cx">     [QLContentDictionary() setObject:(fileName ? fileName : @&quot;&quot;) forKey:url];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RetainPtr&lt;NSURLRequest&gt; WebCore::registerQLPreviewConverterIfNeeded(NSURL *url, NSString *mimeType, NSData *data)
</del><ins>+RetainPtr&lt;NSURLRequest&gt; registerQLPreviewConverterIfNeeded(NSURL *url, NSString *mimeType, NSData *data)
</ins><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;NSString&gt; updatedMIMEType = adoptNS(QLTypeCopyBestMimeTypeForURLAndMimeType(url, mimeType));
</span><span class="cx"> 
</span><span class="lines">@@ -118,13 +108,13 @@
</span><span class="cx">     return previewProtocol;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const char* WebCore::QLPreviewProtocol()
</del><ins>+const char* QLPreviewProtocol()
</ins><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;Vector&lt;char&gt;&gt; previewProtocol(createQLPreviewProtocol());
</span><span class="cx">     return previewProtocol.get().data();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool WebCore::isQuickLookPreviewURL(const URL&amp; url)
</del><ins>+bool isQuickLookPreviewURL(const URL&amp; url)
</ins><span class="cx"> {
</span><span class="cx">     // Use some known protocols as a short-cut to avoid loading the QuickLook framework.
</span><span class="cx">     if (url.protocolIsInHTTPFamily() || url.isBlankURL() || url.protocolIsBlob() || url.protocolIsData() || SchemeRegistry::shouldTreatURLSchemeAsLocal(url.protocol().toString()))
</span><span class="lines">@@ -132,152 +122,6 @@
</span><span class="cx">     return url.protocolIs(QLPreviewProtocol());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static RefPtr&lt;QuickLookHandleClient&gt;&amp; testingClient()
-{
-    static NeverDestroyed&lt;RefPtr&lt;QuickLookHandleClient&gt;&gt; testingClient;
-    return testingClient.get();
-}
-
-static QuickLookHandleClient&amp; emptyClient()
-{
-    static NeverDestroyed&lt;QuickLookHandleClient&gt; emptyClient;
-    return emptyClient.get();
-}
-
-@interface WebPreviewLoader : NSObject {
-    RefPtr&lt;ResourceLoader&gt; _resourceLoader;
-    ResourceResponse _response;
-    QuickLookHandle* _handle;
-    RefPtr&lt;QuickLookHandleClient&gt; _client;
-    std::unique_ptr&lt;PreviewConverter&gt; _converter;
-    RetainPtr&lt;NSMutableArray&gt; _bufferedDataArray;
-    BOOL _hasSentDidReceiveResponse;
-}
-
-- (instancetype)initWithResourceLoader:(ResourceLoader&amp;)resourceLoader resourceResponse:(const ResourceResponse&amp;)resourceResponse quickLookHandle:(QuickLookHandle&amp;)quickLookHandle;
-- (void)appendDataArray:(NSArray&lt;NSData *&gt; *)dataArray;
-- (void)finishedAppending;
-- (void)failed;
-
-@end
-
-@implementation WebPreviewLoader
-
-- (instancetype)initWithResourceLoader:(ResourceLoader&amp;)resourceLoader resourceResponse:(const ResourceResponse&amp;)resourceResponse quickLookHandle:(QuickLookHandle&amp;)quickLookHandle
-{
-    self = [super init];
-    if (!self)
-        return nil;
-
-    _resourceLoader = &amp;resourceLoader;
-    _response = resourceResponse;
-    _handle = &amp;quickLookHandle;
-    _converter = std::make_unique&lt;PreviewConverter&gt;(self, _response);
-    _bufferedDataArray = adoptNS([[NSMutableArray alloc] init]);
-
-    if (testingClient())
-        _client = testingClient();
-    else if (auto client = resourceLoader.frameLoader()-&gt;client().createQuickLookHandleClient(_converter-&gt;previewFileName(), _converter-&gt;previewUTI()))
-        _client = WTFMove(client);
-    else
-        _client = &amp;emptyClient();
-
-    LOG(Network, &quot;WebPreviewConverter created with preview file name \&quot;%s\&quot;.&quot;, _converter-&gt;previewFileName().utf8().data());
-    return self;
-}
-
-- (void)appendDataArray:(NSArray&lt;NSData *&gt; *)dataArray
-{
-    LOG(Network, &quot;WebPreviewConverter appending data array with count %ld.&quot;, dataArray.count);
-    [_converter-&gt;platformConverter() appendDataArray:dataArray];
-    [_bufferedDataArray addObjectsFromArray:dataArray];
-    _client-&gt;didReceiveDataArray((CFArrayRef)dataArray);
-}
-
-- (void)finishedAppending
-{
-    LOG(Network, &quot;WebPreviewConverter finished appending data.&quot;);
-    [_converter-&gt;platformConverter() finishedAppendingData];
-    _client-&gt;didFinishLoading();
-}
-
-- (void)failed
-{
-    LOG(Network, &quot;WebPreviewConverter failed.&quot;);
-    [_converter-&gt;platformConverter() finishConverting];
-    _client-&gt;didFail();
-}
-
-- (void)_sendDidReceiveResponseIfNecessary
-{
-    if (_hasSentDidReceiveResponse)
-        return;
-
-    [_bufferedDataArray removeAllObjects];
-
-    ResourceResponse response { _converter-&gt;previewResponse() };
-    response.setIsQuickLook(true);
-    ASSERT(response.mimeType().length());
-
-    _resourceLoader-&gt;documentLoader()-&gt;setPreviewConverter(WTFMove(_converter));
-
-    _hasSentDidReceiveResponse = YES;
-    _resourceLoader-&gt;didReceiveResponse(response);
-}
-
-- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data lengthReceived:(long long)lengthReceived
-{
-    ASSERT_UNUSED(connection, !connection);
-    [self _sendDidReceiveResponseIfNecessary];
-
-    // 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 (auto dataLength = data.length)
-        _resourceLoader-&gt;didReceiveData(reinterpret_cast&lt;const char*&gt;(data.bytes), dataLength, lengthReceived, DataPayloadBytes);
-}
-
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
-{
-    ASSERT_UNUSED(connection, !connection);
-    ASSERT(_hasSentDidReceiveResponse);
-
-    NetworkLoadMetrics emptyMetrics;
-    _resourceLoader-&gt;didFinishLoading(emptyMetrics);
-}
-
-static inline bool isQuickLookPasswordError(NSError *error)
-{
-    return error.code == kQLReturnPasswordProtected &amp;&amp; [error.domain isEqualToString:@&quot;QuickLookErrorDomain&quot;];
-}
-
-- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
-{
-    ASSERT_UNUSED(connection, !connection);
-
-    if (!isQuickLookPasswordError(error)) {
-        [self _sendDidReceiveResponseIfNecessary];
-        _resourceLoader-&gt;didFail(error);
-        return;
-    }
-
-    if (!_client-&gt;supportsPasswordEntry()) {
-        _resourceLoader-&gt;didFail(_resourceLoader-&gt;cannotShowURLError());
-        return;
-    }
-
-    _client-&gt;didRequestPassword([retainedSelf = retainPtr(self)] (const String&amp; password) {
-        auto converter = std::make_unique&lt;PreviewConverter&gt;(retainedSelf.get(), retainedSelf-&gt;_response, password);
-        QLPreviewConverter *platformConverter = converter-&gt;platformConverter();
-        [platformConverter appendDataArray:retainedSelf-&gt;_bufferedDataArray.get()];
-        [platformConverter finishedAppendingData];
-        retainedSelf-&gt;_converter = WTFMove(converter);
-    });
-}
-
-@end
-
-namespace WebCore {
-
</del><span class="cx"> static NSDictionary *temporaryFileAttributes()
</span><span class="cx"> {
</span><span class="cx">     static NSDictionary *attributes = [@{
</span><span class="lines">@@ -320,65 +164,6 @@
</span><span class="cx">     return contentPath;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-QuickLookHandle::QuickLookHandle(ResourceLoader&amp; loader, const ResourceResponse&amp; response)
-    : m_previewLoader { adoptNS([[WebPreviewLoader alloc] initWithResourceLoader:loader resourceResponse:response quickLookHandle:*this]) }
-{
-}
</del><ins>+} // namespace WebCore
</ins><span class="cx"> 
</span><del>-QuickLookHandle::~QuickLookHandle()
-{
-}
-
-bool QuickLookHandle::shouldCreateForMIMEType(const String&amp; mimeType)
-{
-    return [QLPreviewGetSupportedMIMETypesSet() containsObject:mimeType];
-}
-
-std::unique_ptr&lt;QuickLookHandle&gt; QuickLookHandle::create(ResourceLoader&amp; loader, const ResourceResponse&amp; response)
-{
-    ASSERT(shouldCreateForMIMEType(response.mimeType()));
-    return std::make_unique&lt;QuickLookHandle&gt;(loader, response);
-}
-
-bool QuickLookHandle::didReceiveData(const char* data, unsigned length)
-{
-    if (m_finishedLoadingDataIntoConverter)
-        return false;
-
-    [m_previewLoader appendDataArray:@[ [NSData dataWithBytes:data length:length] ]];
-    return true;
-}
-
-bool QuickLookHandle::didReceiveBuffer(const SharedBuffer&amp; buffer)
-{
-    if (m_finishedLoadingDataIntoConverter)
-        return false;
-
-    [m_previewLoader appendDataArray:buffer.createNSDataArray().get()];
-    return true;
-}
-
-bool QuickLookHandle::didFinishLoading()
-{
-    if (m_finishedLoadingDataIntoConverter)
-        return false;
-
-    m_finishedLoadingDataIntoConverter = true;
-    [m_previewLoader finishedAppending];
-    return true;
-}
-
-void QuickLookHandle::didFail()
-{
-    [m_previewLoader failed];
-    m_previewLoader = nullptr;
-}
-
-void QuickLookHandle::setClientForTesting(RefPtr&lt;QuickLookHandleClient&gt;&amp;&amp; client)
-{
-    testingClient() = WTFMove(client);
-}
-
-}
-
</del><span class="cx"> #endif // USE(QUICK_LOOK)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkResourceHandleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ResourceHandle.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ResourceHandle.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -79,7 +79,6 @@
</span><span class="cx"> class URL;
</span><span class="cx"> class NetworkingContext;
</span><span class="cx"> class ProtectionSpace;
</span><del>-class QuickLookHandle;
</del><span class="cx"> class ResourceError;
</span><span class="cx"> class ResourceHandleClient;
</span><span class="cx"> class ResourceHandleInternal;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosPreviewLoaderClienthfromrev214265trunkSourceWebCoreplatformnetworkiosQuickLookHandleClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/network/ios/PreviewLoaderClient.h (from rev 214265, trunk/Source/WebCore/platform/network/ios/QuickLookHandleClient.h) (0 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/PreviewLoaderClient.h                                (rev 0)
+++ trunk/Source/WebCore/platform/network/ios/PreviewLoaderClient.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+/*
+ * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &lt;wtf/Function.h&gt;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebCore {
+
+class PreviewLoaderClient : public RefCounted&lt;PreviewLoaderClient&gt; {
+public:
+    virtual ~PreviewLoaderClient() { }
+    virtual void didReceiveDataArray(CFArrayRef) { }
+    virtual void didFinishLoading() { }
+    virtual void didFail() { }
+    virtual bool supportsPasswordEntry() const { return false; }
+    virtual void didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp; completionHandler) { completionHandler(&quot;&quot;); }
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkiosQuickLookHandleClienth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/platform/network/ios/QuickLookHandleClient.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ios/QuickLookHandleClient.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/platform/network/ios/QuickLookHandleClient.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if USE(QUICK_LOOK)
-
-#include &lt;CoreFoundation/CoreFoundation.h&gt;
-#include &lt;wtf/Function.h&gt;
-#include &lt;wtf/RefCounted.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebCore {
-
-class QuickLookHandleClient : public RefCounted&lt;QuickLookHandleClient&gt; {
-public:
-    virtual ~QuickLookHandleClient() { }
-    virtual void didReceiveDataArray(CFArrayRef) { }
-    virtual void didFinishLoading() { }
-    virtual void didFail() { }
-    virtual bool supportsPasswordEntry() const { return false; }
-    virtual void didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp; completionHandler) { completionHandler(&quot;&quot;); }
-};
-
-} // namespace WebCore
-
-#endif // USE(QUICK_LOOK)
</del></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/testing/Internals.cpp        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -233,8 +233,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-#include &quot;MockQuickLookHandleClient.h&quot;
-#include &quot;QuickLook.h&quot;
</del><ins>+#include &quot;MockPreviewLoaderClient.h&quot;
+#include &quot;PreviewLoader.h&quot;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> using JSC::CallData;
</span><span class="lines">@@ -446,8 +446,8 @@
</span><span class="cx">     page.setLowPowerModeEnabledOverrideForTesting(std::nullopt);
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    MockQuickLookHandleClient::singleton().setPassword(&quot;&quot;);
-    QuickLookHandle::setClientForTesting(nullptr);
</del><ins>+    MockPreviewLoaderClient::singleton().setPassword(&quot;&quot;);
+    PreviewLoader::setClientForTesting(nullptr);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3829,8 +3829,8 @@
</span><span class="cx"> void Internals::setQuickLookPassword(const String&amp; password)
</span><span class="cx"> {
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    auto&amp; quickLookHandleClient = MockQuickLookHandleClient::singleton();
-    QuickLookHandle::setClientForTesting(&amp;quickLookHandleClient);
</del><ins>+    auto&amp; quickLookHandleClient = MockPreviewLoaderClient::singleton();
+    PreviewLoader::setClientForTesting(&amp;quickLookHandleClient);
</ins><span class="cx">     quickLookHandleClient.setPassword(password);
</span><span class="cx"> #else
</span><span class="cx">     UNUSED_PARAM(password);
</span></span></pre></div>
<a id="trunkSourceWebCoretestingMockPreviewLoaderClientcppfromrev214265trunkSourceWebCoretestingMockQuickLookHandleClientcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/testing/MockPreviewLoaderClient.cpp (from rev 214265, trunk/Source/WebCore/testing/MockQuickLookHandleClient.cpp) (0 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/MockPreviewLoaderClient.cpp                                (rev 0)
+++ trunk/Source/WebCore/testing/MockPreviewLoaderClient.cpp        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;MockPreviewLoaderClient.h&quot;
+
+#if USE(QUICK_LOOK)
+
+#include &lt;wtf/MainThread.h&gt;
+#include &lt;wtf/RunLoop.h&gt;
+
+namespace WebCore {
+
+MockPreviewLoaderClient&amp; MockPreviewLoaderClient::singleton()
+{
+    static NeverDestroyed&lt;MockPreviewLoaderClient&gt; sharedClient;
+    return sharedClient.get();
+}
+
+void MockPreviewLoaderClient::didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp; completionHandler)
+{
+    ASSERT(isMainThread());
+    RunLoop::current().dispatch([completionHandler = WTFMove(completionHandler), password = m_password] {
+        completionHandler(password);
+    });
+}
+
+} // namespace WebCore
+
+#endif // USE(QUICK_LOOK)
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingMockPreviewLoaderClienthfromrev214265trunkSourceWebCoretestingMockQuickLookHandleClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/testing/MockPreviewLoaderClient.h (from rev 214265, trunk/Source/WebCore/testing/MockQuickLookHandleClient.h) (0 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/MockPreviewLoaderClient.h                                (rev 0)
+++ trunk/Source/WebCore/testing/MockPreviewLoaderClient.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;PreviewLoaderClient.h&quot;
+#include &lt;wtf/NeverDestroyed.h&gt;
+
+namespace WebCore {
+
+class MockPreviewLoaderClient final : public PreviewLoaderClient {
+public:
+    static MockPreviewLoaderClient&amp; singleton();
+
+    void setPassword(const String&amp; password) { m_password = password; }
+
+    bool supportsPasswordEntry() const override { return true; }
+    void didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp;) override;
+
+private:
+    friend class NeverDestroyed&lt;MockPreviewLoaderClient&gt;;
+    MockPreviewLoaderClient() = default;
+
+    String m_password;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoretestingMockQuickLookHandleClientcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/testing/MockQuickLookHandleClient.cpp (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/MockQuickLookHandleClient.cpp        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/testing/MockQuickLookHandleClient.cpp        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -1,52 +0,0 @@
</span><del>-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;MockQuickLookHandleClient.h&quot;
-
-#if USE(QUICK_LOOK)
-
-#include &lt;wtf/MainThread.h&gt;
-#include &lt;wtf/RunLoop.h&gt;
-
-namespace WebCore {
-
-MockQuickLookHandleClient&amp; MockQuickLookHandleClient::singleton()
-{
-    static NeverDestroyed&lt;MockQuickLookHandleClient&gt; sharedClient;
-    return sharedClient.get();
-}
-
-void MockQuickLookHandleClient::didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp; completionHandler)
-{
-    ASSERT(isMainThread());
-    RunLoop::current().dispatch([completionHandler = WTFMove(completionHandler), password = m_password] {
-        completionHandler(password);
-    });
-}
-
-} // namespace WebCore
-
-#endif // USE(QUICK_LOOK)
</del></span></pre></div>
<a id="trunkSourceWebCoretestingMockQuickLookHandleClienth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/testing/MockQuickLookHandleClient.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/MockQuickLookHandleClient.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebCore/testing/MockQuickLookHandleClient.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -1,53 +0,0 @@
</span><del>-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if USE(QUICK_LOOK)
-
-#include &quot;QuickLookHandleClient.h&quot;
-#include &lt;wtf/NeverDestroyed.h&gt;
-
-namespace WebCore {
-
-class MockQuickLookHandleClient final : public QuickLookHandleClient {
-public:
-    static MockQuickLookHandleClient&amp; singleton();
-
-    void setPassword(const String&amp; password) { m_password = password; }
-
-    bool supportsPasswordEntry() const override { return true; }
-    void didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp;) override;
-
-private:
-    friend class NeverDestroyed&lt;MockQuickLookHandleClient&gt;;
-    MockQuickLookHandleClient() = default;
-
-    String m_password;
-};
-
-} // namespace WebCore
-
-#endif // USE(QUICK_LOOK)
</del></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit/mac/ChangeLog        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-03-22  Andy Estes  &lt;aestes@apple.com&gt;
+
+        [QuickLook] Rename QuickLookHandle to PreviewLoader
+        https://bugs.webkit.org/show_bug.cgi?id=169961
+
+        Reviewed by Andreas Kling.
+
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::createPreviewLoaderClient):
+        (WebFrameLoaderClient::createQuickLookHandleClient): Deleted.
+
</ins><span class="cx"> 2017-03-21  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove bogus availability annotations from DOM SPI headers.
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -246,7 +246,7 @@
</span><span class="cx">     bool shouldPaintBrokenImage(const WebCore::URL&amp;) const final;
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    RefPtr&lt;WebCore::QuickLookHandleClient&gt; createQuickLookHandleClient(const String&amp; fileName, const String&amp; uti) final;
</del><ins>+    RefPtr&lt;WebCore::PreviewLoaderClient&gt; createPreviewLoaderClient(const String&amp; fileName, const String&amp; uti) final;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebFrameLoaderClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -150,8 +150,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> #import &lt;WebCore/NSFileManagerSPI.h&gt;
</span><ins>+#import &lt;WebCore/PreviewLoaderClient.h&gt;
</ins><span class="cx"> #import &lt;WebCore/QuickLook.h&gt;
</span><del>-#import &lt;WebCore/QuickLookHandleClient.h&gt;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if HAVE(APP_LINKS)
</span><span class="lines">@@ -2222,9 +2222,9 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-RefPtr&lt;QuickLookHandleClient&gt; WebFrameLoaderClient::createQuickLookHandleClient(const String&amp; fileName, const String&amp; uti)
</del><ins>+RefPtr&lt;PreviewLoaderClient&gt; WebFrameLoaderClient::createPreviewLoaderClient(const String&amp; fileName, const String&amp; uti)
</ins><span class="cx"> {
</span><del>-    class QuickLookDocumentWriter : public WebCore::QuickLookHandleClient {
</del><ins>+    class QuickLookDocumentWriter : public WebCore::PreviewLoaderClient {
</ins><span class="cx">     public:
</span><span class="cx">         explicit QuickLookDocumentWriter(NSString *filePath)
</span><span class="cx">             : m_filePath { filePath }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2017-03-22  Andy Estes  &lt;aestes@apple.com&gt;
+
+        [QuickLook] Rename QuickLookHandle to PreviewLoader
+        https://bugs.webkit.org/show_bug.cgi?id=169961
+
+        Reviewed by Andreas Kling.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+        * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
+        (WebKit::WebFrameLoaderClient::createPreviewLoaderClient):
+        (WebKit::WebFrameLoaderClient::createQuickLookHandleClient): Deleted.
+        * WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp.
+        (WebKit::WebPreviewLoaderClient::WebPreviewLoaderClient):
+        (WebKit::WebPreviewLoaderClient::~WebPreviewLoaderClient):
+        (WebKit::WebPreviewLoaderClient::didReceiveDataArray):
+        (WebKit::WebPreviewLoaderClient::didFinishLoading):
+        (WebKit::WebPreviewLoaderClient::didFail):
+        (WebKit::WebPreviewLoaderClient::didRequestPassword):
+        (WebKit::WebPreviewLoaderClient::didReceivePassword):
+        * WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h.
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::didReceivePasswordForQuickLookDocument):
+
</ins><span class="cx"> 2017-03-22  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WK2] Add SPI to notify clients when data interaction is beginning or ending
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -1427,8 +1427,8 @@
</span><span class="cx">                 A1A4FE5B18DCE9FA00B5EA8A /* _WKDownload.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1A4FE5818DCE9FA00B5EA8A /* _WKDownload.mm */; };
</span><span class="cx">                 A1A4FE5C18DCE9FA00B5EA8A /* _WKDownloadInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = A1A4FE5918DCE9FA00B5EA8A /* _WKDownloadInternal.h */; };
</span><span class="cx">                 A1A4FE6118DD54A400B5EA8A /* _WKDownloadDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = A1A4FE6018DD54A400B5EA8A /* _WKDownloadDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                A1C512C8190656E500448914 /* WebQuickLookHandleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1C512C6190656E500448914 /* WebQuickLookHandleClient.cpp */; };
-                A1C512C9190656E500448914 /* WebQuickLookHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A1C512C7190656E500448914 /* WebQuickLookHandleClient.h */; };
</del><ins>+                A1C512C8190656E500448914 /* WebPreviewLoaderClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1C512C6190656E500448914 /* WebPreviewLoaderClient.cpp */; };
+                A1C512C9190656E500448914 /* WebPreviewLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A1C512C7190656E500448914 /* WebPreviewLoaderClient.h */; };
</ins><span class="cx">                 A1D420471DB5578500BB6B0D /* WKContextMenuListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1EA02351DABFF7E0096021F /* WKContextMenuListener.cpp */; };
</span><span class="cx">                 A1DF631218E0B7C8003A3E2A /* DownloadClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = A1DF631018E0B7C8003A3E2A /* DownloadClient.mm */; };
</span><span class="cx">                 A1DF631318E0B7C8003A3E2A /* DownloadClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A1DF631118E0B7C8003A3E2A /* DownloadClient.h */; };
</span><span class="lines">@@ -3690,8 +3690,8 @@
</span><span class="cx">                 A1A4FE5818DCE9FA00B5EA8A /* _WKDownload.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKDownload.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A1A4FE5918DCE9FA00B5EA8A /* _WKDownloadInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKDownloadInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A1A4FE6018DD54A400B5EA8A /* _WKDownloadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKDownloadDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                A1C512C6190656E500448914 /* WebQuickLookHandleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebQuickLookHandleClient.cpp; path = ios/WebQuickLookHandleClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
-                A1C512C7190656E500448914 /* WebQuickLookHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebQuickLookHandleClient.h; path = ios/WebQuickLookHandleClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                A1C512C6190656E500448914 /* WebPreviewLoaderClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebPreviewLoaderClient.cpp; path = ios/WebPreviewLoaderClient.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                A1C512C7190656E500448914 /* WebPreviewLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebPreviewLoaderClient.h; path = ios/WebPreviewLoaderClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 A1DF631018E0B7C8003A3E2A /* DownloadClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DownloadClient.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A1DF631118E0B7C8003A3E2A /* DownloadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 A1EA02351DABFF7E0096021F /* WKContextMenuListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKContextMenuListener.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5280,8 +5280,8 @@
</span><span class="cx">                                 2D28F3E01885CCC1004B9EAE /* WebChromeClientIOS.mm */,
</span><span class="cx">                                 2D28F3E21885CCC1004B9EAE /* WebEditorClientIOS.mm */,
</span><span class="cx">                                 2D28F3E31885CCC1004B9EAE /* WebFrameLoaderClientIOS.mm */,
</span><del>-                                A1C512C6190656E500448914 /* WebQuickLookHandleClient.cpp */,
-                                A1C512C7190656E500448914 /* WebQuickLookHandleClient.h */,
</del><ins>+                                A1C512C6190656E500448914 /* WebPreviewLoaderClient.cpp */,
+                                A1C512C7190656E500448914 /* WebPreviewLoaderClient.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = ios;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -8661,7 +8661,7 @@
</span><span class="cx">                                 BCE0E425168B7A280057E66A /* WebProcessSupplement.h in Headers */,
</span><span class="cx">                                 1A1E093418861D3800D2DC49 /* WebProgressTrackerClient.h in Headers */,
</span><span class="cx">                                 512F589D12A8838800629530 /* WebProtectionSpace.h in Headers */,
</span><del>-                                A1C512C9190656E500448914 /* WebQuickLookHandleClient.h in Headers */,
</del><ins>+                                A1C512C9190656E500448914 /* WebPreviewLoaderClient.h in Headers */,
</ins><span class="cx">                                 37948404150C350600E52CE9 /* WebRenderLayer.h in Headers */,
</span><span class="cx">                                 3760881F150413E900FC82C7 /* WebRenderObject.h in Headers */,
</span><span class="cx">                                 510AFFBA16542048001BA05E /* WebResourceLoader.h in Headers */,
</span><span class="lines">@@ -10265,7 +10265,7 @@
</span><span class="cx">                                 BCEE7AD012817988009827DA /* WebProcessProxyMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 1A1E093318861D3800D2DC49 /* WebProgressTrackerClient.cpp in Sources */,
</span><span class="cx">                                 512F589C12A8838800629530 /* WebProtectionSpace.cpp in Sources */,
</span><del>-                                A1C512C8190656E500448914 /* WebQuickLookHandleClient.cpp in Sources */,
</del><ins>+                                A1C512C8190656E500448914 /* WebPreviewLoaderClient.cpp in Sources */,
</ins><span class="cx">                                 37948403150C350600E52CE9 /* WebRenderLayer.cpp in Sources */,
</span><span class="cx">                                 3760881E150413E900FC82C7 /* WebRenderObject.cpp in Sources */,
</span><span class="cx">                                 510AFFB916542048001BA05E /* WebResourceLoader.cpp in Sources */,
</span><span class="lines">@@ -10304,7 +10304,6 @@
</span><span class="cx">                                 1AAF08A1192681D100B6390C /* WebUserContentControllerProxy.cpp in Sources */,
</span><span class="cx">                                 7C361D78192803BD0036A59D /* WebUserContentControllerProxyMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 15739BBE1B42046600D258C1 /* WebUserMediaClient.cpp in Sources */,
</span><del>-                                CD6178141E6DE9A000FDA57D /* WebUserMediaClientMac.mm in Sources */,
</del><span class="cx">                                 83EE575B1DB7D61100C74C50 /* WebValidationMessageClient.cpp in Sources */,
</span><span class="cx">                                 52D5A1B71C574A0200DE34A3 /* WebVideoFullscreenManager.mm in Sources */,
</span><span class="cx">                                 3F418EF91887BD97002795FD /* WebVideoFullscreenManagerMessageReceiver.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx">     void forcePageTransitionIfNeeded() final;
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-    RefPtr&lt;WebCore::QuickLookHandleClient&gt; createQuickLookHandleClient(const String&amp; fileName, const String&amp; uti) final;
</del><ins>+    RefPtr&lt;WebCore::PreviewLoaderClient&gt; createPreviewLoaderClient(const String&amp; fileName, const String&amp; uti) final;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CONTENT_FILTERING)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebFrameLoaderClientIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> #import &quot;WebFrame.h&quot;
</span><span class="cx"> #import &quot;WebPage.h&quot;
</span><del>-#import &quot;WebQuickLookHandleClient.h&quot;
</del><ins>+#import &quot;WebPreviewLoaderClient.h&quot;
</ins><span class="cx"> #import &lt;WebCore/QuickLook.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>-RefPtr&lt;QuickLookHandleClient&gt; WebFrameLoaderClient::createQuickLookHandleClient(const String&amp; fileName, const String&amp; uti)
</del><ins>+RefPtr&lt;PreviewLoaderClient&gt; WebFrameLoaderClient::createPreviewLoaderClient(const String&amp; fileName, const String&amp; uti)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_frame-&gt;isMainFrame())
</span><span class="cx">         return nullptr;
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">     if (!webPage)
</span><span class="cx">         return nullptr;
</span><span class="cx"> 
</span><del>-    return WebQuickLookHandleClient::create(fileName, uti, webPage-&gt;pageID());
</del><ins>+    return WebPreviewLoaderClient::create(fileName, uti, webPage-&gt;pageID());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebPreviewLoaderClientcppfromrev214265trunkSourceWebKit2WebProcessWebCoreSupportiosWebQuickLookHandleClientcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp (from rev 214265, trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp) (0 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.cpp        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -0,0 +1,95 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebPreviewLoaderClient.h&quot;
+
+#if USE(QUICK_LOOK)
+
+#include &quot;WebPageProxyMessages.h&quot;
+#include &quot;WebProcess.h&quot;
+#include &lt;WebCore/QuickLook.h&gt;
+#include &lt;wtf/Function.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/NeverDestroyed.h&gt;
+
+namespace WebKit {
+
+using PasswordCallbackMap = HashMap&lt;uint64_t, Function&lt;void(const String&amp;)&gt;&gt;;
+static PasswordCallbackMap&amp; passwordCallbacks()
+{
+    static NeverDestroyed&lt;PasswordCallbackMap&gt; callbackMap;
+    return callbackMap.get();
+}
+
+WebPreviewLoaderClient::WebPreviewLoaderClient(const String&amp; fileName, const String&amp; uti, uint64_t pageID)
+    : m_fileName { fileName }
+    , m_uti { uti }
+    , m_pageID { pageID }
+{
+    WebProcess::singleton().send(Messages::WebPageProxy::DidStartLoadForQuickLookDocumentInMainFrame(m_fileName, m_uti), m_pageID);
+}
+
+WebPreviewLoaderClient::~WebPreviewLoaderClient()
+{
+    passwordCallbacks().remove(m_pageID);
+}
+
+void WebPreviewLoaderClient::didReceiveDataArray(CFArrayRef dataArray)
+{
+    CFArrayApplyFunction(dataArray, CFRangeMake(0, CFArrayGetCount(dataArray)), [](const void* value, void* context) {
+        ASSERT(CFGetTypeID(value) == CFDataGetTypeID());
+        static_cast&lt;QuickLookDocumentData*&gt;(context)-&gt;append((CFDataRef)value);
+    }, &amp;m_data);    
+}
+
+void WebPreviewLoaderClient::didFinishLoading()
+{
+    WebProcess::singleton().send(Messages::WebPageProxy::DidFinishLoadForQuickLookDocumentInMainFrame(m_data), m_pageID);
+    m_data.clear();
+}
+
+void WebPreviewLoaderClient::didFail()
+{
+    m_data.clear();
+}
+
+void WebPreviewLoaderClient::didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp; completionHandler)
+{
+    ASSERT(!passwordCallbacks().contains(m_pageID));
+    passwordCallbacks().add(m_pageID, WTFMove(completionHandler));
+    WebProcess::singleton().send(Messages::WebPageProxy::DidRequestPasswordForQuickLookDocumentInMainFrame(m_fileName), m_pageID);
+}
+
+void WebPreviewLoaderClient::didReceivePassword(const String&amp; password, uint64_t pageID)
+{
+    ASSERT(passwordCallbacks().contains(pageID));
+    auto completionHandler = passwordCallbacks().take(pageID);
+    completionHandler(password);
+}
+
+} // namespace WebKit
+
+#endif // USE(QUICK_LOOK)
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebPreviewLoaderClienthfromrev214265trunkSourceWebKit2WebProcessWebCoreSupportiosWebQuickLookHandleClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h (from rev 214265, trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h) (0 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &quot;QuickLookDocumentData.h&quot;
+#include &lt;WebCore/PreviewLoaderClient.h&gt;
+#include &lt;wtf/text/WTFString.h&gt;
+
+namespace WebKit {
+
+class WebFrame;
+
+class WebPreviewLoaderClient final : public WebCore::PreviewLoaderClient {
+public:
+    static Ref&lt;WebPreviewLoaderClient&gt; create(const String&amp; fileName, const String&amp; uti, uint64_t pageID)
+    {
+        return adoptRef(*new WebPreviewLoaderClient(fileName, uti, pageID));
+    }
+    ~WebPreviewLoaderClient();
+
+    static void didReceivePassword(const String&amp;, uint64_t pageID);
+
+private:
+    WebPreviewLoaderClient(const String&amp; fileName, const String&amp; uti, uint64_t pageID);
+    void didReceiveDataArray(CFArrayRef) override;
+    void didFinishLoading() override;
+    void didFail() override;
+    bool supportsPasswordEntry() const override { return true; }
+    void didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp;) override;
+
+    const String m_fileName;
+    const String m_uti;
+    const uint64_t m_pageID;
+    QuickLookDocumentData m_data;
+};
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebQuickLookHandleClientcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -1,95 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebQuickLookHandleClient.h&quot;
-
-#if USE(QUICK_LOOK)
-
-#include &quot;WebPageProxyMessages.h&quot;
-#include &quot;WebProcess.h&quot;
-#include &lt;WebCore/QuickLook.h&gt;
-#include &lt;wtf/Function.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/NeverDestroyed.h&gt;
-
-namespace WebKit {
-
-using PasswordCallbackMap = HashMap&lt;uint64_t, Function&lt;void(const String&amp;)&gt;&gt;;
-static PasswordCallbackMap&amp; passwordCallbacks()
-{
-    static NeverDestroyed&lt;PasswordCallbackMap&gt; callbackMap;
-    return callbackMap.get();
-}
-
-WebQuickLookHandleClient::WebQuickLookHandleClient(const String&amp; fileName, const String&amp; uti, uint64_t pageID)
-    : m_fileName { fileName }
-    , m_uti { uti }
-    , m_pageID { pageID }
-{
-    WebProcess::singleton().send(Messages::WebPageProxy::DidStartLoadForQuickLookDocumentInMainFrame(m_fileName, m_uti), m_pageID);
-}
-
-WebQuickLookHandleClient::~WebQuickLookHandleClient()
-{
-    passwordCallbacks().remove(m_pageID);
-}
-
-void WebQuickLookHandleClient::didReceiveDataArray(CFArrayRef dataArray)
-{
-    CFArrayApplyFunction(dataArray, CFRangeMake(0, CFArrayGetCount(dataArray)), [](const void* value, void* context) {
-        ASSERT(CFGetTypeID(value) == CFDataGetTypeID());
-        static_cast&lt;QuickLookDocumentData*&gt;(context)-&gt;append((CFDataRef)value);
-    }, &amp;m_data);    
-}
-
-void WebQuickLookHandleClient::didFinishLoading()
-{
-    WebProcess::singleton().send(Messages::WebPageProxy::DidFinishLoadForQuickLookDocumentInMainFrame(m_data), m_pageID);
-    m_data.clear();
-}
-
-void WebQuickLookHandleClient::didFail()
-{
-    m_data.clear();
-}
-
-void WebQuickLookHandleClient::didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp; completionHandler)
-{
-    ASSERT(!passwordCallbacks().contains(m_pageID));
-    passwordCallbacks().add(m_pageID, WTFMove(completionHandler));
-    WebProcess::singleton().send(Messages::WebPageProxy::DidRequestPasswordForQuickLookDocumentInMainFrame(m_fileName), m_pageID);
-}
-
-void WebQuickLookHandleClient::didReceivePassword(const String&amp; password, uint64_t pageID)
-{
-    ASSERT(passwordCallbacks().contains(pageID));
-    auto completionHandler = passwordCallbacks().take(pageID);
-    completionHandler(password);
-}
-
-} // namespace WebKit
-
-#endif // USE(QUICK_LOOK)
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportiosWebQuickLookHandleClienth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -1,68 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if USE(QUICK_LOOK)
-
-#include &quot;QuickLookDocumentData.h&quot;
-#include &lt;WebCore/QuickLookHandleClient.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace WebCore {
-class QuickLookHandle;
-}
-
-namespace WebKit {
-
-class WebFrame;
-
-class WebQuickLookHandleClient final : public WebCore::QuickLookHandleClient {
-public:
-    static Ref&lt;WebQuickLookHandleClient&gt; create(const String&amp; fileName, const String&amp; uti, uint64_t pageID)
-    {
-        return adoptRef(*new WebQuickLookHandleClient(fileName, uti, pageID));
-    }
-    ~WebQuickLookHandleClient();
-
-    static void didReceivePassword(const String&amp;, uint64_t pageID);
-
-private:
-    WebQuickLookHandleClient(const String&amp; fileName, const String&amp; uti, uint64_t pageID);
-    void didReceiveDataArray(CFArrayRef) override;
-    void didFinishLoading() override;
-    void didFail() override;
-    bool supportsPasswordEntry() const override { return true; }
-    void didRequestPassword(Function&lt;void(const String&amp;)&gt;&amp;&amp;) override;
-
-    const String m_fileName;
-    const String m_uti;
-    const uint64_t m_pageID;
-    QuickLookDocumentData m_data;
-};
-
-} // namespace WebKit
-
-#endif // USE(QUICK_LOOK)
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (214265 => 214266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2017-03-22 18:07:49 UTC (rev 214265)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2017-03-22 18:11:08 UTC (rev 214266)
</span><span class="lines">@@ -49,8 +49,8 @@
</span><span class="cx"> #import &quot;WebImage.h&quot;
</span><span class="cx"> #import &quot;WebKitSystemInterface.h&quot;
</span><span class="cx"> #import &quot;WebPageProxyMessages.h&quot;
</span><ins>+#import &quot;WebPreviewLoaderClient.h&quot;
</ins><span class="cx"> #import &quot;WebProcess.h&quot;
</span><del>-#import &quot;WebQuickLookHandleClient.h&quot;
</del><span class="cx"> #import &lt;CoreText/CTFont.h&gt;
</span><span class="cx"> #import &lt;WebCore/Autofill.h&gt;
</span><span class="cx"> #import &lt;WebCore/Chrome.h&gt;
</span><span class="lines">@@ -3282,7 +3282,7 @@
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx"> void WebPage::didReceivePasswordForQuickLookDocument(const String&amp; password)
</span><span class="cx"> {
</span><del>-    WebQuickLookHandleClient::didReceivePassword(password, m_pageID);
</del><ins>+    WebPreviewLoaderClient::didReceivePassword(password, m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>