<!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 <aestes@apple.com>
+
+ [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 <romain.bellessort@crf.canon.fr>
</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 = "<group>"; };
</span><span class="cx">                 A10BB5891484E3B300B2E87A /* RenderSVGShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGShape.h; sourceTree = "<group>"; };
</span><span class="cx">                 A10D7FEB1C2676D100C6C115 /* CFNetworkConnectionCacheSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFNetworkConnectionCacheSPI.h; sourceTree = "<group>"; };
</span><del>-                A10DBF4618F92317000D70C6 /* QuickLookHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuickLookHandleClient.h; sourceTree = "<group>"; };
</del><ins>+                A10DBF4618F92317000D70C6 /* PreviewLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreviewLoaderClient.h; sourceTree = "<group>"; };
</ins><span class="cx">                 A10DC76814747BAB005E2471 /* StyleGridData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleGridData.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A10DC76914747BAB005E2471 /* StyleGridData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleGridData.h; sourceTree = "<group>"; };
</span><span class="cx">                 A110DB9A14F5DF7700A03B93 /* StyleGridItemData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleGridItemData.h; sourceTree = "<group>"; };
</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 = "<group>"; };
</span><span class="cx">                 A136A00A1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XMLHttpRequestProgressEventThrottle.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A136A00B1134DBD200CC8D50 /* XMLHttpRequestProgressEventThrottle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XMLHttpRequestProgressEventThrottle.h; sourceTree = "<group>"; };
</span><del>-                A14061891E2ECA0A0032B34E /* MockQuickLookHandleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockQuickLookHandleClient.cpp; sourceTree = "<group>"; };
-                A140618A1E2ECA0A0032B34E /* MockQuickLookHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockQuickLookHandleClient.h; sourceTree = "<group>"; };
</del><ins>+                A14061891E2ECA0A0032B34E /* MockPreviewLoaderClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockPreviewLoaderClient.cpp; sourceTree = "<group>"; };
+                A140618A1E2ECA0A0032B34E /* MockPreviewLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockPreviewLoaderClient.h; sourceTree = "<group>"; };
</ins><span class="cx">                 A14090FA1AA51E1D0091191A /* ContentFilterUnblockHandlerCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContentFilterUnblockHandlerCocoa.mm; sourceTree = "<group>"; };
</span><span class="cx">                 A14090FC1AA51E480091191A /* ContentFilterUnblockHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentFilterUnblockHandler.h; sourceTree = "<group>"; };
</span><span class="cx">                 A148328C187F508700DA63A6 /* WAKAppKitStubs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WAKAppKitStubs.h; sourceTree = "<group>"; };
</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 = "<group>"; };
</span><span class="cx">                 A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementFactory.h; sourceTree = "<group>"; };
</span><span class="cx">                 A182D5B61BE722620087A7CC /* SettingsCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SettingsCocoa.mm; sourceTree = "<group>"; };
</span><ins>+                A185B4271E8211A100DC9118 /* PreviewLoader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PreviewLoader.mm; sourceTree = "<group>"; };
+                A185B4281E8211A100DC9118 /* PreviewLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreviewLoader.h; sourceTree = "<group>"; };
</ins><span class="cx">                 A18890AC1AA13F250026C301 /* ParentalControlsContentFilter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ParentalControlsContentFilter.mm; sourceTree = "<group>"; };
</span><span class="cx">                 A18890AD1AA13F250026C301 /* ParentalControlsContentFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParentalControlsContentFilter.h; sourceTree = "<group>"; };
</span><span class="cx">                 A19AEA1C1AAA7C4900B52B25 /* MockContentFilterSettings.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = MockContentFilterSettings.idl; sourceTree = "<group>"; };
</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 "QuickLookHandleClient.h"
</del><ins>+#include "PreviewLoaderClient.h"
</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&) final { }
</span><span class="cx">
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>- RefPtr<QuickLookHandleClient> createQuickLookHandleClient(const String&, const String&) final { return nullptr; }
</del><ins>+ RefPtr<PreviewLoaderClient> createPreviewLoaderClient(const String&, const String&) 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<QuickLookHandleClient> createQuickLookHandleClient(const String&, const String&) = 0;
</del><ins>+ virtual RefPtr<PreviewLoaderClient> createPreviewLoaderClient(const String&, const String&) = 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 "PreviewConverter.h"
</span><del>-#include "QuickLook.h"
</del><ins>+#include "PreviewLoader.h"
</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<ResourceLoader>, 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<QuickLookHandle> m_quickLookHandle;
</del><ins>+ std::unique_ptr<PreviewLoader> 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 "QuickLook.h"
</del><ins>+#include "PreviewLoader.h"
</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& response) const
</del><ins>+bool SubresourceLoader::shouldCreatePreviewLoaderForResponse(const ResourceResponse& response) const
</ins><span class="cx"> {
</span><span class="cx"> if (m_resource->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->didReceiveData(data, length))
</del><ins>+ if (auto previewLoader = m_previewLoader.get()) {
+ if (previewLoader->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<SharedBuffer>&& 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->didReceiveBuffer(buffer.get()))
</del><ins>+ if (auto previewLoader = m_previewLoader.get()) {
+ if (previewLoader->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& networkLoadMetrics)
</span><span class="cx"> {
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>- if (auto quickLookHandle = m_quickLookHandle.get()) {
- if (quickLookHandle->didFinishLoading())
</del><ins>+ if (auto previewLoader = m_previewLoader.get()) {
+ if (previewLoader->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& error)
</span><span class="cx"> {
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>- if (auto quickLookHandle = m_quickLookHandle.get())
- quickLookHandle->didFail();
</del><ins>+ if (auto previewLoader = m_previewLoader.get())
+ previewLoader->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&) const;
</del><ins>+ bool shouldCreatePreviewLoaderForResponse(const ResourceResponse&) 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 <wtf/Forward.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/RetainPtr.h>
+
+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&);
+ static std::unique_ptr<PreviewLoader> create(ResourceLoader&, const ResourceResponse&);
+ ~PreviewLoader();
+
+ bool didReceiveData(const char* data, unsigned length);
+ bool didReceiveBuffer(const SharedBuffer&);
+ bool didFinishLoading();
+ void didFail();
+
+ WEBCORE_EXPORT static void setClientForTesting(RefPtr<PreviewLoaderClient>&&);
+
+private:
+ friend std::unique_ptr<PreviewLoader> std::make_unique<PreviewLoader>(ResourceLoader&, const ResourceResponse&);
+ PreviewLoader(ResourceLoader&, const ResourceResponse&);
+
+ RetainPtr<WebPreviewLoader> 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 "config.h"
+#import "PreviewLoader.h"
+
+#if USE(QUICK_LOOK)
+
+#import "DocumentLoader.h"
+#import "FrameLoader.h"
+#import "FrameLoaderClient.h"
+#import "Logging.h"
+#import "PreviewConverter.h"
+#import "PreviewLoaderClient.h"
+#import "QuickLook.h"
+#import "QuickLookSPI.h"
+#import "ResourceLoader.h"
+#import <wtf/NeverDestroyed.h>
+
+using namespace WebCore;
+
+@interface WebPreviewLoader : NSObject {
+ RefPtr<ResourceLoader> _resourceLoader;
+ ResourceResponse _response;
+ RefPtr<PreviewLoaderClient> _client;
+ std::unique_ptr<PreviewConverter> _converter;
+ RetainPtr<NSMutableArray> _bufferedDataArray;
+ BOOL _hasSentDidReceiveResponse;
+}
+
+- (instancetype)initWithResourceLoader:(ResourceLoader&)resourceLoader resourceResponse:(const ResourceResponse&)resourceResponse;
+- (void)appendDataArray:(NSArray<NSData *> *)dataArray;
+- (void)finishedAppending;
+- (void)failed;
+
+@end
+
+@implementation WebPreviewLoader
+
+static RefPtr<PreviewLoaderClient>& testingClient()
+{
+ static NeverDestroyed<RefPtr<PreviewLoaderClient>> testingClient;
+ return testingClient.get();
+}
+
+static PreviewLoaderClient& emptyClient()
+{
+ static NeverDestroyed<PreviewLoaderClient> emptyClient;
+ return emptyClient.get();
+}
+
+- (instancetype)initWithResourceLoader:(ResourceLoader&)resourceLoader resourceResponse:(const ResourceResponse&)resourceResponse
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _resourceLoader = &resourceLoader;
+ _response = resourceResponse;
+ _converter = std::make_unique<PreviewConverter>(self, _response);
+ _bufferedDataArray = adoptNS([[NSMutableArray alloc] init]);
+
+ if (testingClient())
+ _client = testingClient();
+ else if (auto client = resourceLoader.frameLoader()->client().createPreviewLoaderClient(_converter->previewFileName(), _converter->previewUTI()))
+ _client = WTFMove(client);
+ else
+ _client = &emptyClient();
+
+ LOG(Network, "WebPreviewConverter created with preview file name \"%s\".", _converter->previewFileName().utf8().data());
+ return self;
+}
+
+- (void)appendDataArray:(NSArray<NSData *> *)dataArray
+{
+ LOG(Network, "WebPreviewConverter appending data array with count %ld.", dataArray.count);
+ [_converter->platformConverter() appendDataArray:dataArray];
+ [_bufferedDataArray addObjectsFromArray:dataArray];
+ _client->didReceiveDataArray((CFArrayRef)dataArray);
+}
+
+- (void)finishedAppending
+{
+ LOG(Network, "WebPreviewConverter finished appending data.");
+ [_converter->platformConverter() finishedAppendingData];
+ _client->didFinishLoading();
+}
+
+- (void)failed
+{
+ LOG(Network, "WebPreviewConverter failed.");
+ [_converter->platformConverter() finishConverting];
+ _client->didFail();
+}
+
+- (void)_sendDidReceiveResponseIfNecessary
+{
+ if (_hasSentDidReceiveResponse)
+ return;
+
+ [_bufferedDataArray removeAllObjects];
+
+ ResourceResponse response { _converter->previewResponse() };
+ response.setIsQuickLook(true);
+ ASSERT(response.mimeType().length());
+
+ _resourceLoader->documentLoader()->setPreviewConverter(WTFMove(_converter));
+
+ _hasSentDidReceiveResponse = YES;
+ _resourceLoader->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->didReceiveData(reinterpret_cast<const char*>(data.bytes), dataLength, lengthReceived, DataPayloadBytes);
+}
+
+- (void)connectionDidFinishLoading:(NSURLConnection *)connection
+{
+ ASSERT_UNUSED(connection, !connection);
+ ASSERT(_hasSentDidReceiveResponse);
+
+ NetworkLoadMetrics emptyMetrics;
+ _resourceLoader->didFinishLoading(emptyMetrics);
+}
+
+static inline bool isQuickLookPasswordError(NSError *error)
+{
+ return error.code == kQLReturnPasswordProtected && [error.domain isEqualToString:@"QuickLookErrorDomain"];
+}
+
+- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
+{
+ ASSERT_UNUSED(connection, !connection);
+
+ if (!isQuickLookPasswordError(error)) {
+ [self _sendDidReceiveResponseIfNecessary];
+ _resourceLoader->didFail(error);
+ return;
+ }
+
+ if (!_client->supportsPasswordEntry()) {
+ _resourceLoader->didFail(_resourceLoader->cannotShowURLError());
+ return;
+ }
+
+ _client->didRequestPassword([self, retainedSelf = retainPtr(self)] (const String& password) {
+ _converter = std::make_unique<PreviewConverter>(self, _response, password);
+ [_converter->platformConverter() appendDataArray:_bufferedDataArray.get()];
+ [_converter->platformConverter() finishedAppendingData];
+ });
+}
+
+@end
+
+namespace WebCore {
+
+PreviewLoader::PreviewLoader(ResourceLoader& loader, const ResourceResponse& response)
+ : m_previewLoader { adoptNS([[WebPreviewLoader alloc] initWithResourceLoader:loader resourceResponse:response]) }
+{
+}
+
+PreviewLoader::~PreviewLoader()
+{
+}
+
+bool PreviewLoader::shouldCreateForMIMEType(const String& mimeType)
+{
+ return [QLPreviewGetSupportedMIMETypesSet() containsObject:mimeType];
+}
+
+std::unique_ptr<PreviewLoader> PreviewLoader::create(ResourceLoader& loader, const ResourceResponse& response)
+{
+ ASSERT(shouldCreateForMIMEType(response.mimeType()));
+ return std::make_unique<PreviewLoader>(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& 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<PreviewLoaderClient>&& 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 <wtf/Forward.h>
</del><span class="cx"> #include <wtf/RetainPtr.h>
</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&);
</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&);
- static std::unique_ptr<QuickLookHandle> create(ResourceLoader&, const ResourceResponse&);
- ~QuickLookHandle();
-
- bool didReceiveData(const char* data, unsigned length);
- bool didReceiveBuffer(const SharedBuffer&);
- bool didFinishLoading();
- void didFail();
-
- WEBCORE_EXPORT static void setClientForTesting(RefPtr<QuickLookHandleClient>&&);
-
-private:
- friend std::unique_ptr<QuickLookHandle> std::make_unique<QuickLookHandle>(ResourceLoader&, const ResourceResponse&);
- QuickLookHandle(ResourceLoader&, const ResourceResponse&);
-
- RetainPtr<WebPreviewLoader> 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 "DocumentLoader.h"
</del><span class="cx"> #import "FileSystemIOS.h"
</span><del>-#import "FrameLoader.h"
-#import "FrameLoaderClient.h"
-#import "Logging.h"
</del><span class="cx"> #import "NSFileManagerSPI.h"
</span><span class="cx"> #import "PreviewConverter.h"
</span><del>-#import "QuickLookHandleClient.h"
-#import "ResourceError.h"
-#import "ResourceLoader.h"
</del><span class="cx"> #import "ResourceRequest.h"
</span><span class="cx"> #import "SchemeRegistry.h"
</span><del>-#import "SharedBuffer.h"
-#import <WebCore/NetworkLoadMetrics.h>
</del><ins>+#import <wtf/Lock.h>
</ins><span class="cx"> #import <wtf/NeverDestroyed.h>
</span><del>-#import <wtf/Vector.h>
-#import <wtf/text/WTFString.h>
</del><span class="cx">
</span><span class="cx"> #import "QuickLookSoftLink.h"
</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<RetainPtr<NSSet>> 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 : @"") forKey:url];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RetainPtr<NSURLRequest> WebCore::registerQLPreviewConverterIfNeeded(NSURL *url, NSString *mimeType, NSData *data)
</del><ins>+RetainPtr<NSURLRequest> registerQLPreviewConverterIfNeeded(NSURL *url, NSString *mimeType, NSData *data)
</ins><span class="cx"> {
</span><span class="cx"> RetainPtr<NSString> 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<Vector<char>> 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& url)
</del><ins>+bool isQuickLookPreviewURL(const URL& 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<QuickLookHandleClient>& testingClient()
-{
- static NeverDestroyed<RefPtr<QuickLookHandleClient>> testingClient;
- return testingClient.get();
-}
-
-static QuickLookHandleClient& emptyClient()
-{
- static NeverDestroyed<QuickLookHandleClient> emptyClient;
- return emptyClient.get();
-}
-
-@interface WebPreviewLoader : NSObject {
- RefPtr<ResourceLoader> _resourceLoader;
- ResourceResponse _response;
- QuickLookHandle* _handle;
- RefPtr<QuickLookHandleClient> _client;
- std::unique_ptr<PreviewConverter> _converter;
- RetainPtr<NSMutableArray> _bufferedDataArray;
- BOOL _hasSentDidReceiveResponse;
-}
-
-- (instancetype)initWithResourceLoader:(ResourceLoader&)resourceLoader resourceResponse:(const ResourceResponse&)resourceResponse quickLookHandle:(QuickLookHandle&)quickLookHandle;
-- (void)appendDataArray:(NSArray<NSData *> *)dataArray;
-- (void)finishedAppending;
-- (void)failed;
-
-@end
-
-@implementation WebPreviewLoader
-
-- (instancetype)initWithResourceLoader:(ResourceLoader&)resourceLoader resourceResponse:(const ResourceResponse&)resourceResponse quickLookHandle:(QuickLookHandle&)quickLookHandle
-{
- self = [super init];
- if (!self)
- return nil;
-
- _resourceLoader = &resourceLoader;
- _response = resourceResponse;
- _handle = &quickLookHandle;
- _converter = std::make_unique<PreviewConverter>(self, _response);
- _bufferedDataArray = adoptNS([[NSMutableArray alloc] init]);
-
- if (testingClient())
- _client = testingClient();
- else if (auto client = resourceLoader.frameLoader()->client().createQuickLookHandleClient(_converter->previewFileName(), _converter->previewUTI()))
- _client = WTFMove(client);
- else
- _client = &emptyClient();
-
- LOG(Network, "WebPreviewConverter created with preview file name \"%s\".", _converter->previewFileName().utf8().data());
- return self;
-}
-
-- (void)appendDataArray:(NSArray<NSData *> *)dataArray
-{
- LOG(Network, "WebPreviewConverter appending data array with count %ld.", dataArray.count);
- [_converter->platformConverter() appendDataArray:dataArray];
- [_bufferedDataArray addObjectsFromArray:dataArray];
- _client->didReceiveDataArray((CFArrayRef)dataArray);
-}
-
-- (void)finishedAppending
-{
- LOG(Network, "WebPreviewConverter finished appending data.");
- [_converter->platformConverter() finishedAppendingData];
- _client->didFinishLoading();
-}
-
-- (void)failed
-{
- LOG(Network, "WebPreviewConverter failed.");
- [_converter->platformConverter() finishConverting];
- _client->didFail();
-}
-
-- (void)_sendDidReceiveResponseIfNecessary
-{
- if (_hasSentDidReceiveResponse)
- return;
-
- [_bufferedDataArray removeAllObjects];
-
- ResourceResponse response { _converter->previewResponse() };
- response.setIsQuickLook(true);
- ASSERT(response.mimeType().length());
-
- _resourceLoader->documentLoader()->setPreviewConverter(WTFMove(_converter));
-
- _hasSentDidReceiveResponse = YES;
- _resourceLoader->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->didReceiveData(reinterpret_cast<const char*>(data.bytes), dataLength, lengthReceived, DataPayloadBytes);
-}
-
-- (void)connectionDidFinishLoading:(NSURLConnection *)connection
-{
- ASSERT_UNUSED(connection, !connection);
- ASSERT(_hasSentDidReceiveResponse);
-
- NetworkLoadMetrics emptyMetrics;
- _resourceLoader->didFinishLoading(emptyMetrics);
-}
-
-static inline bool isQuickLookPasswordError(NSError *error)
-{
- return error.code == kQLReturnPasswordProtected && [error.domain isEqualToString:@"QuickLookErrorDomain"];
-}
-
-- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
-{
- ASSERT_UNUSED(connection, !connection);
-
- if (!isQuickLookPasswordError(error)) {
- [self _sendDidReceiveResponseIfNecessary];
- _resourceLoader->didFail(error);
- return;
- }
-
- if (!_client->supportsPasswordEntry()) {
- _resourceLoader->didFail(_resourceLoader->cannotShowURLError());
- return;
- }
-
- _client->didRequestPassword([retainedSelf = retainPtr(self)] (const String& password) {
- auto converter = std::make_unique<PreviewConverter>(retainedSelf.get(), retainedSelf->_response, password);
- QLPreviewConverter *platformConverter = converter->platformConverter();
- [platformConverter appendDataArray:retainedSelf->_bufferedDataArray.get()];
- [platformConverter finishedAppendingData];
- retainedSelf->_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& loader, const ResourceResponse& 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& mimeType)
-{
- return [QLPreviewGetSupportedMIMETypesSet() containsObject:mimeType];
-}
-
-std::unique_ptr<QuickLookHandle> QuickLookHandle::create(ResourceLoader& loader, const ResourceResponse& response)
-{
- ASSERT(shouldCreateForMIMEType(response.mimeType()));
- return std::make_unique<QuickLookHandle>(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& 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<QuickLookHandleClient>&& 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 <wtf/Function.h>
+#include <wtf/RefCounted.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+class PreviewLoaderClient : public RefCounted<PreviewLoaderClient> {
+public:
+ virtual ~PreviewLoaderClient() { }
+ virtual void didReceiveDataArray(CFArrayRef) { }
+ virtual void didFinishLoading() { }
+ virtual void didFail() { }
+ virtual bool supportsPasswordEntry() const { return false; }
+ virtual void didRequestPassword(Function<void(const String&)>&& completionHandler) { completionHandler(""); }
+};
+
+} // 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 <CoreFoundation/CoreFoundation.h>
-#include <wtf/Function.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-class QuickLookHandleClient : public RefCounted<QuickLookHandleClient> {
-public:
- virtual ~QuickLookHandleClient() { }
- virtual void didReceiveDataArray(CFArrayRef) { }
- virtual void didFinishLoading() { }
- virtual void didFail() { }
- virtual bool supportsPasswordEntry() const { return false; }
- virtual void didRequestPassword(Function<void(const String&)>&& completionHandler) { completionHandler(""); }
-};
-
-} // 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 "MockQuickLookHandleClient.h"
-#include "QuickLook.h"
</del><ins>+#include "MockPreviewLoaderClient.h"
+#include "PreviewLoader.h"
</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("");
- QuickLookHandle::setClientForTesting(nullptr);
</del><ins>+ MockPreviewLoaderClient::singleton().setPassword("");
+ 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& password)
</span><span class="cx"> {
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>- auto& quickLookHandleClient = MockQuickLookHandleClient::singleton();
- QuickLookHandle::setClientForTesting(&quickLookHandleClient);
</del><ins>+ auto& quickLookHandleClient = MockPreviewLoaderClient::singleton();
+ PreviewLoader::setClientForTesting(&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 "config.h"
+#include "MockPreviewLoaderClient.h"
+
+#if USE(QUICK_LOOK)
+
+#include <wtf/MainThread.h>
+#include <wtf/RunLoop.h>
+
+namespace WebCore {
+
+MockPreviewLoaderClient& MockPreviewLoaderClient::singleton()
+{
+ static NeverDestroyed<MockPreviewLoaderClient> sharedClient;
+ return sharedClient.get();
+}
+
+void MockPreviewLoaderClient::didRequestPassword(Function<void(const String&)>&& 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 "PreviewLoaderClient.h"
+#include <wtf/NeverDestroyed.h>
+
+namespace WebCore {
+
+class MockPreviewLoaderClient final : public PreviewLoaderClient {
+public:
+ static MockPreviewLoaderClient& singleton();
+
+ void setPassword(const String& password) { m_password = password; }
+
+ bool supportsPasswordEntry() const override { return true; }
+ void didRequestPassword(Function<void(const String&)>&&) override;
+
+private:
+ friend class NeverDestroyed<MockPreviewLoaderClient>;
+ 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 "config.h"
-#include "MockQuickLookHandleClient.h"
-
-#if USE(QUICK_LOOK)
-
-#include <wtf/MainThread.h>
-#include <wtf/RunLoop.h>
-
-namespace WebCore {
-
-MockQuickLookHandleClient& MockQuickLookHandleClient::singleton()
-{
- static NeverDestroyed<MockQuickLookHandleClient> sharedClient;
- return sharedClient.get();
-}
-
-void MockQuickLookHandleClient::didRequestPassword(Function<void(const String&)>&& 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 "QuickLookHandleClient.h"
-#include <wtf/NeverDestroyed.h>
-
-namespace WebCore {
-
-class MockQuickLookHandleClient final : public QuickLookHandleClient {
-public:
- static MockQuickLookHandleClient& singleton();
-
- void setPassword(const String& password) { m_password = password; }
-
- bool supportsPasswordEntry() const override { return true; }
- void didRequestPassword(Function<void(const String&)>&&) override;
-
-private:
- friend class NeverDestroyed<MockQuickLookHandleClient>;
- 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 <aestes@apple.com>
+
+ [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 <andersca@apple.com>
</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&) const final;
</span><span class="cx">
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><del>- RefPtr<WebCore::QuickLookHandleClient> createQuickLookHandleClient(const String& fileName, const String& uti) final;
</del><ins>+ RefPtr<WebCore::PreviewLoaderClient> createPreviewLoaderClient(const String& fileName, const String& 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 <WebCore/NSFileManagerSPI.h>
</span><ins>+#import <WebCore/PreviewLoaderClient.h>
</ins><span class="cx"> #import <WebCore/QuickLook.h>
</span><del>-#import <WebCore/QuickLookHandleClient.h>
</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<QuickLookHandleClient> WebFrameLoaderClient::createQuickLookHandleClient(const String& fileName, const String& uti)
</del><ins>+RefPtr<PreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& 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 <aestes@apple.com>
+
+ [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 <wenson_hsieh@apple.com>
</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 = "<group>"; };
</span><span class="cx">                 A1A4FE5918DCE9FA00B5EA8A /* _WKDownloadInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKDownloadInternal.h; sourceTree = "<group>"; };
</span><span class="cx">                 A1A4FE6018DD54A400B5EA8A /* _WKDownloadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKDownloadDelegate.h; sourceTree = "<group>"; };
</span><del>-                A1C512C6190656E500448914 /* WebQuickLookHandleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebQuickLookHandleClient.cpp; path = ios/WebQuickLookHandleClient.cpp; sourceTree = "<group>"; };
-                A1C512C7190656E500448914 /* WebQuickLookHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebQuickLookHandleClient.h; path = ios/WebQuickLookHandleClient.h; sourceTree = "<group>"; };
</del><ins>+                A1C512C6190656E500448914 /* WebPreviewLoaderClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebPreviewLoaderClient.cpp; path = ios/WebPreviewLoaderClient.cpp; sourceTree = "<group>"; };
+                A1C512C7190656E500448914 /* WebPreviewLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebPreviewLoaderClient.h; path = ios/WebPreviewLoaderClient.h; sourceTree = "<group>"; };
</ins><span class="cx">                 A1DF631018E0B7C8003A3E2A /* DownloadClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DownloadClient.mm; sourceTree = "<group>"; };
</span><span class="cx">                 A1DF631118E0B7C8003A3E2A /* DownloadClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadClient.h; sourceTree = "<group>"; };
</span><span class="cx">                 A1EA02351DABFF7E0096021F /* WKContextMenuListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKContextMenuListener.cpp; sourceTree = "<group>"; };
</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 = "<group>";
</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<WebCore::QuickLookHandleClient> createQuickLookHandleClient(const String& fileName, const String& uti) final;
</del><ins>+ RefPtr<WebCore::PreviewLoaderClient> createPreviewLoaderClient(const String& fileName, const String& 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 "WebFrame.h"
</span><span class="cx"> #import "WebPage.h"
</span><del>-#import "WebQuickLookHandleClient.h"
</del><ins>+#import "WebPreviewLoaderClient.h"
</ins><span class="cx"> #import <WebCore/QuickLook.h>
</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<QuickLookHandleClient> WebFrameLoaderClient::createQuickLookHandleClient(const String& fileName, const String& uti)
</del><ins>+RefPtr<PreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& uti)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_frame->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->pageID());
</del><ins>+ return WebPreviewLoaderClient::create(fileName, uti, webPage->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 "config.h"
+#include "WebPreviewLoaderClient.h"
+
+#if USE(QUICK_LOOK)
+
+#include "WebPageProxyMessages.h"
+#include "WebProcess.h"
+#include <WebCore/QuickLook.h>
+#include <wtf/Function.h>
+#include <wtf/HashMap.h>
+#include <wtf/NeverDestroyed.h>
+
+namespace WebKit {
+
+using PasswordCallbackMap = HashMap<uint64_t, Function<void(const String&)>>;
+static PasswordCallbackMap& passwordCallbacks()
+{
+ static NeverDestroyed<PasswordCallbackMap> callbackMap;
+ return callbackMap.get();
+}
+
+WebPreviewLoaderClient::WebPreviewLoaderClient(const String& fileName, const String& 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<QuickLookDocumentData*>(context)->append((CFDataRef)value);
+ }, &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<void(const String&)>&& 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& 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 "QuickLookDocumentData.h"
+#include <WebCore/PreviewLoaderClient.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+
+class WebFrame;
+
+class WebPreviewLoaderClient final : public WebCore::PreviewLoaderClient {
+public:
+ static Ref<WebPreviewLoaderClient> create(const String& fileName, const String& uti, uint64_t pageID)
+ {
+ return adoptRef(*new WebPreviewLoaderClient(fileName, uti, pageID));
+ }
+ ~WebPreviewLoaderClient();
+
+ static void didReceivePassword(const String&, uint64_t pageID);
+
+private:
+ WebPreviewLoaderClient(const String& fileName, const String& uti, uint64_t pageID);
+ void didReceiveDataArray(CFArrayRef) override;
+ void didFinishLoading() override;
+ void didFail() override;
+ bool supportsPasswordEntry() const override { return true; }
+ void didRequestPassword(Function<void(const String&)>&&) 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 "config.h"
-#include "WebQuickLookHandleClient.h"
-
-#if USE(QUICK_LOOK)
-
-#include "WebPageProxyMessages.h"
-#include "WebProcess.h"
-#include <WebCore/QuickLook.h>
-#include <wtf/Function.h>
-#include <wtf/HashMap.h>
-#include <wtf/NeverDestroyed.h>
-
-namespace WebKit {
-
-using PasswordCallbackMap = HashMap<uint64_t, Function<void(const String&)>>;
-static PasswordCallbackMap& passwordCallbacks()
-{
- static NeverDestroyed<PasswordCallbackMap> callbackMap;
- return callbackMap.get();
-}
-
-WebQuickLookHandleClient::WebQuickLookHandleClient(const String& fileName, const String& 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<QuickLookDocumentData*>(context)->append((CFDataRef)value);
- }, &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<void(const String&)>&& 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& 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 "QuickLookDocumentData.h"
-#include <WebCore/QuickLookHandleClient.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-class QuickLookHandle;
-}
-
-namespace WebKit {
-
-class WebFrame;
-
-class WebQuickLookHandleClient final : public WebCore::QuickLookHandleClient {
-public:
- static Ref<WebQuickLookHandleClient> create(const String& fileName, const String& uti, uint64_t pageID)
- {
- return adoptRef(*new WebQuickLookHandleClient(fileName, uti, pageID));
- }
- ~WebQuickLookHandleClient();
-
- static void didReceivePassword(const String&, uint64_t pageID);
-
-private:
- WebQuickLookHandleClient(const String& fileName, const String& uti, uint64_t pageID);
- void didReceiveDataArray(CFArrayRef) override;
- void didFinishLoading() override;
- void didFail() override;
- bool supportsPasswordEntry() const override { return true; }
- void didRequestPassword(Function<void(const String&)>&&) 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 "WebImage.h"
</span><span class="cx"> #import "WebKitSystemInterface.h"
</span><span class="cx"> #import "WebPageProxyMessages.h"
</span><ins>+#import "WebPreviewLoaderClient.h"
</ins><span class="cx"> #import "WebProcess.h"
</span><del>-#import "WebQuickLookHandleClient.h"
</del><span class="cx"> #import <CoreText/CTFont.h>
</span><span class="cx"> #import <WebCore/Autofill.h>
</span><span class="cx"> #import <WebCore/Chrome.h>
</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& 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>