[Quick Look] Rename PreviewLoader{,Client} to LegacyPreviewLoader{,Client}
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Oct 2019 19:34:32 +0000 (19:34 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Oct 2019 19:34:32 +0000 (19:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=203306

Reviewed by Tim Horton.

Source/WebCore:

* SourcesCocoa.txt:
* WebCore.xcodeproj/project.pbxproj:
* loader/EmptyClients.cpp:
* loader/EmptyFrameLoaderClient.h:
* loader/FrameLoaderClient.h:
* loader/ResourceLoader.cpp:
* loader/ResourceLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):
* loader/ios/LegacyPreviewLoader.h: Renamed from Source/WebCore/loader/ios/PreviewLoader.h.
* loader/ios/LegacyPreviewLoader.mm: Renamed from Source/WebCore/loader/ios/PreviewLoader.mm.
(testingClient):
(emptyClient):
(WebCore::LegacyPreviewLoader::LegacyPreviewLoader):
(WebCore::LegacyPreviewLoader::~LegacyPreviewLoader):
(WebCore::LegacyPreviewLoader::create):
(WebCore::LegacyPreviewLoader::didReceiveResponse):
(WebCore::LegacyPreviewLoader::didReceiveData):
(WebCore::LegacyPreviewLoader::didReceiveBuffer):
(WebCore::LegacyPreviewLoader::didFinishLoading):
(WebCore::LegacyPreviewLoader::didFail):
(WebCore::LegacyPreviewLoader::setClientForTesting):
* platform/network/ios/LegacyPreviewLoaderClient.h: Renamed from Source/WebCore/platform/network/ios/PreviewLoaderClient.h.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::setQuickLookPassword):
* testing/MockPreviewLoaderClient.h:

Source/WebKit:

* WebProcess/Storage/WebSWContextManagerConnection.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::createPreviewLoaderClient):
* WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::createPreviewLoaderClient):
* WebView/WebDataSource.mm:
(-[WebDataSource _quickLookPreviewLoaderClient]):
(-[WebDataSource _setQuickLookPreviewLoaderClient:]):
* WebView/WebDataSourceInternal.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251488 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/SourcesCocoa.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/loader/EmptyFrameLoaderClient.h
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.h
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/loader/ios/LegacyPreviewLoader.h [moved from Source/WebCore/loader/ios/PreviewLoader.h with 79% similarity]
Source/WebCore/loader/ios/LegacyPreviewLoader.mm [moved from Source/WebCore/loader/ios/PreviewLoader.mm with 89% similarity]
Source/WebCore/platform/network/ios/LegacyPreviewLoaderClient.h [moved from Source/WebCore/platform/network/ios/PreviewLoaderClient.h with 93% similarity]
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/MockPreviewLoaderClient.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm
Source/WebKit/WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKitLegacy/mac/WebView/WebDataSource.mm
Source/WebKitLegacy/mac/WebView/WebDataSourceInternal.h

index 9412644..622f85e 100644 (file)
@@ -1,3 +1,38 @@
+2019-10-23  Andy Estes  <aestes@apple.com>
+
+        [Quick Look] Rename PreviewLoader{,Client} to LegacyPreviewLoader{,Client}
+        https://bugs.webkit.org/show_bug.cgi?id=203306
+
+        Reviewed by Tim Horton.
+
+        * SourcesCocoa.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * loader/EmptyClients.cpp:
+        * loader/EmptyFrameLoaderClient.h:
+        * loader/FrameLoaderClient.h:
+        * loader/ResourceLoader.cpp:
+        * loader/ResourceLoader.h:
+        * loader/SubresourceLoader.cpp:
+        (WebCore::SubresourceLoader::didReceiveResponse):
+        * loader/ios/LegacyPreviewLoader.h: Renamed from Source/WebCore/loader/ios/PreviewLoader.h.
+        * loader/ios/LegacyPreviewLoader.mm: Renamed from Source/WebCore/loader/ios/PreviewLoader.mm.
+        (testingClient):
+        (emptyClient):
+        (WebCore::LegacyPreviewLoader::LegacyPreviewLoader):
+        (WebCore::LegacyPreviewLoader::~LegacyPreviewLoader):
+        (WebCore::LegacyPreviewLoader::create):
+        (WebCore::LegacyPreviewLoader::didReceiveResponse):
+        (WebCore::LegacyPreviewLoader::didReceiveData):
+        (WebCore::LegacyPreviewLoader::didReceiveBuffer):
+        (WebCore::LegacyPreviewLoader::didFinishLoading):
+        (WebCore::LegacyPreviewLoader::didFail):
+        (WebCore::LegacyPreviewLoader::setClientForTesting):
+        * platform/network/ios/LegacyPreviewLoaderClient.h: Renamed from Source/WebCore/platform/network/ios/PreviewLoaderClient.h.
+        * testing/Internals.cpp:
+        (WebCore::Internals::resetToConsistentState):
+        (WebCore::Internals::setQuickLookPassword):
+        * testing/MockPreviewLoaderClient.h:
+
 2019-10-23  Antti Koivisto  <antti@apple.com>
 
         [LFC] LayoutState should have out-of-line destructor
index da5e748..cd5be4e 100644 (file)
@@ -116,7 +116,7 @@ loader/archive/cf/LegacyWebArchiveMac.mm
 loader/cocoa/DiskCacheMonitorCocoa.mm
 loader/cocoa/SubresourceLoaderCocoa.mm
 
-loader/ios/PreviewLoader.mm
+loader/ios/LegacyPreviewLoader.mm
 
 loader/mac/DocumentLoaderMac.cpp
 loader/mac/LoaderNSURLExtras.mm
index 51256e0..efcf96c 100644 (file)
                A104F24414C71F7A009E2C23 /* CachedSVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = A104F24214C71F7A009E2C23 /* CachedSVGDocument.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A10BB5851484E3A700B2E87A /* RenderSVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = A10BB5831484E3A700B2E87A /* RenderSVGRect.h */; };
                A10BB58B1484E3B300B2E87A /* RenderSVGShape.h in Headers */ = {isa = PBXBuildFile; fileRef = A10BB5891484E3B300B2E87A /* RenderSVGShape.h */; };
-               A10DBF4718F92317000D70C6 /* PreviewLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A10DBF4618F92317000D70C6 /* PreviewLoaderClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               A10DBF4718F92317000D70C6 /* LegacyPreviewLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A10DBF4618F92317000D70C6 /* LegacyPreviewLoaderClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A10DC76B14747BAB005E2471 /* StyleGridData.h in Headers */ = {isa = PBXBuildFile; fileRef = A10DC76914747BAB005E2471 /* StyleGridData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A110DB9B14F5DF7700A03B93 /* StyleGridItemData.h in Headers */ = {isa = PBXBuildFile; fileRef = A110DB9A14F5DF7700A03B93 /* StyleGridItemData.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A113E02823318293009C33A0 /* PaymentSessionError.h in Headers */ = {isa = PBXBuildFile; fileRef = A113E02723318293009C33A0 /* PaymentSessionError.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A17D275E1EAC579800BF01E7 /* MediaSelectionOption.h in Headers */ = {isa = PBXBuildFile; fileRef = A17D275D1EAC579800BF01E7 /* MediaSelectionOption.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A17FEE641F8893220021E811 /* PaymentSessionBase.h in Headers */ = {isa = PBXBuildFile; fileRef = A17FEE631F8893220021E811 /* PaymentSessionBase.h */; };
                A180AD5B219F81B000DC039A /* WebCoreAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = A17E4F26219BC01600E1C7EE /* WebCoreAdditions.mm */; };
-               A185B42A1E8211A100DC9118 /* PreviewLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = A185B4281E8211A100DC9118 /* PreviewLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               A185B42A1E8211A100DC9118 /* LegacyPreviewLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = A185B4281E8211A100DC9118 /* LegacyPreviewLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
                A18890AF1AA13F250026C301 /* ParentalControlsContentFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = A18890AD1AA13F250026C301 /* ParentalControlsContentFilter.h */; };
                A1956F1C2331A6770057E9D2 /* JSApplePayCancelEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A1956F1B2331A6460057E9D2 /* JSApplePayCancelEvent.h */; };
                A1956F202331A8C70057E9D2 /* ApplePaySessionError.h in Headers */ = {isa = PBXBuildFile; fileRef = A1956F1D2331A8C70057E9D2 /* ApplePaySessionError.h */; };
                A10BB5881484E3B300B2E87A /* RenderSVGShape.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGShape.cpp; sourceTree = "<group>"; };
                A10BB5891484E3B300B2E87A /* RenderSVGShape.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGShape.h; sourceTree = "<group>"; };
                A10D6E942144C99800FDD14D /* JSPaymentResponseCustom.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSPaymentResponseCustom.cpp; sourceTree = "<group>"; };
-               A10DBF4618F92317000D70C6 /* PreviewLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreviewLoaderClient.h; sourceTree = "<group>"; };
+               A10DBF4618F92317000D70C6 /* LegacyPreviewLoaderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyPreviewLoaderClient.h; sourceTree = "<group>"; };
                A10DC76814747BAB005E2471 /* StyleGridData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StyleGridData.cpp; sourceTree = "<group>"; };
                A10DC76914747BAB005E2471 /* StyleGridData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleGridData.h; sourceTree = "<group>"; };
                A110DB9A14F5DF7700A03B93 /* StyleGridItemData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleGridItemData.h; sourceTree = "<group>"; };
                A17E4F26219BC01600E1C7EE /* WebCoreAdditions.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreAdditions.mm; sourceTree = "<group>"; };
                A17FEE631F8893220021E811 /* PaymentSessionBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentSessionBase.h; sourceTree = "<group>"; };
                A182D5B61BE722620087A7CC /* SettingsBaseCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SettingsBaseCocoa.mm; sourceTree = "<group>"; };
-               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>"; };
+               A185B4271E8211A100DC9118 /* LegacyPreviewLoader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LegacyPreviewLoader.mm; sourceTree = "<group>"; };
+               A185B4281E8211A100DC9118 /* LegacyPreviewLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyPreviewLoader.h; sourceTree = "<group>"; };
                A18890AC1AA13F250026C301 /* ParentalControlsContentFilter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ParentalControlsContentFilter.mm; sourceTree = "<group>"; };
                A18890AD1AA13F250026C301 /* ParentalControlsContentFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParentalControlsContentFilter.h; sourceTree = "<group>"; };
                A18F7A351ECA73640059E1E1 /* RuntimeApplicationChecks.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RuntimeApplicationChecks.cpp; sourceTree = "<group>"; };
                4497D58C0EBA854F00A10552 /* ios */ = {
                        isa = PBXGroup;
                        children = (
+                               A10DBF4618F92317000D70C6 /* LegacyPreviewLoaderClient.h */,
                                443F04260E75C8FB007E5407 /* NetworkStateNotifierIOS.mm */,
                                A1C150781E3F2B3E0032C98C /* PreviewConverter.h */,
                                A1C150771E3F2B3E0032C98C /* PreviewConverter.mm */,
-                               A10DBF4618F92317000D70C6 /* PreviewLoaderClient.h */,
                                44A20DB80F84166C00B3E1FE /* WebCoreURLResponseIOS.h */,
                                444D4E210F708B2E003158E0 /* WebCoreURLResponseIOS.mm */,
                        );
                A15E31F01E0CB075004B371C /* ios */ = {
                        isa = PBXGroup;
                        children = (
-                               A185B4281E8211A100DC9118 /* PreviewLoader.h */,
-                               A185B4271E8211A100DC9118 /* PreviewLoader.mm */,
+                               A185B4281E8211A100DC9118 /* LegacyPreviewLoader.h */,
+                               A185B4271E8211A100DC9118 /* LegacyPreviewLoader.mm */,
                        );
                        path = ios;
                        sourceTree = "<group>";
                                CDF4B7121E0087AE00E235A2 /* LegacyCDMSession.h in Headers */,
                                CDE8B5F11A69778B00B4B66A /* LegacyCDMSessionClearKey.h in Headers */,
                                F44A5F591FED38F2007F5944 /* LegacyNSPasteboardTypes.h in Headers */,
+                               A185B42A1E8211A100DC9118 /* LegacyPreviewLoader.h in Headers */,
+                               A10DBF4718F92317000D70C6 /* LegacyPreviewLoaderClient.h in Headers */,
                                5162C7F511F77EFB00612EFE /* LegacySchemeRegistry.h in Headers */,
                                E4C3B1FA0F0E4161009693F6 /* LegacyTileCache.h in Headers */,
                                E4B65A58132FA8E70070E7BE /* LegacyTileGrid.h in Headers */,
                                46DBB6501AB8C96F00D9A813 /* PowerObserverMac.h in Headers */,
                                C0F2A44113869AAB0066C534 /* preprocessor.pm in Headers */,
                                A1C1507A1E3F2B3E0032C98C /* PreviewConverter.h in Headers */,
-                               A185B42A1E8211A100DC9118 /* PreviewLoader.h in Headers */,
-                               A10DBF4718F92317000D70C6 /* PreviewLoaderClient.h in Headers */,
                                E4605FEC2166480900E53046 /* PrewarmInformation.h in Headers */,
                                B71FE6DF11091CB300DAEF77 /* PrintContext.h in Headers */,
                                51F645D51FECDBCE00B54DED /* ProcessIdentifier.h in Headers */,
index 7a375b4..5ce9e11 100644 (file)
@@ -78,7 +78,7 @@
 #endif
 
 #if USE(QUICK_LOOK)
-#include "PreviewLoaderClient.h"
+#include "LegacyPreviewLoaderClient.h"
 #endif
 
 namespace WebCore {
index 09ccd5a..3f184f0 100644 (file)
@@ -29,7 +29,7 @@
 #include "ResourceError.h"
 
 #if USE(QUICK_LOOK)
-#include "PreviewLoaderClient.h"
+#include "LegacyPreviewLoaderClient.h"
 #endif
 
 namespace WebCore {
@@ -201,7 +201,7 @@ class WEBCORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient {
     void prefetchDNS(const String&) final { }
 
 #if USE(QUICK_LOOK)
-    RefPtr<PreviewLoaderClient> createPreviewLoaderClient(const String&, const String&) final { return nullptr; }
+    RefPtr<LegacyPreviewLoaderClient> createPreviewLoaderClient(const String&, const String&) final { return nullptr; }
 #endif
 #if ENABLE(RESOURCE_LOAD_STATISTICS)
     bool hasFrameSpecificStorageAccess() final { return false; }
index 98df945..e1046ba 100644 (file)
@@ -84,11 +84,11 @@ class HTMLFrameOwnerElement;
 class HTMLPlugInElement;
 class HistoryItem;
 class IntSize;
+class LegacyPreviewLoaderClient;
 class MessageEvent;
 class NavigationAction;
 class Page;
 class PluginViewBase;
-class PreviewLoaderClient;
 class ProtectionSpace;
 class RTCPeerConnectionHandler;
 class ResourceError;
@@ -351,7 +351,7 @@ public:
     virtual bool isServiceWorkerFrameLoaderClient() const { return false; }
 
 #if USE(QUICK_LOOK)
-    virtual RefPtr<PreviewLoaderClient> createPreviewLoaderClient(const String&, const String&) = 0;
+    virtual RefPtr<LegacyPreviewLoaderClient> createPreviewLoaderClient(const String&, const String&) = 0;
 #endif
 
 #if ENABLE(CONTENT_FILTERING)
index e3e2629..5c3d418 100644 (file)
@@ -59,8 +59,8 @@
 #endif
 
 #if USE(QUICK_LOOK)
+#include "LegacyPreviewLoader.h"
 #include "PreviewConverter.h"
-#include "PreviewLoader.h"
 #endif
 
 #undef RELEASE_LOG_IF_ALLOWED
index 72f4c7a..5ad6660 100644 (file)
@@ -51,8 +51,8 @@ class AuthenticationChallenge;
 class DocumentLoader;
 class Frame;
 class FrameLoader;
+class LegacyPreviewLoader;
 class NetworkLoadMetrics;
-class PreviewLoader;
 
 class ResourceLoader : public CanMakeWeakPtr<ResourceLoader>, public RefCounted<ResourceLoader>, protected ResourceHandleClient {
 public:
@@ -178,7 +178,7 @@ protected:
     ResourceResponse m_response;
     LoadTiming m_loadTiming;
 #if USE(QUICK_LOOK)
-    std::unique_ptr<PreviewLoader> m_previewLoader;
+    std::unique_ptr<LegacyPreviewLoader> m_previewLoader;
 #endif
     bool m_canCrossOriginRequestsAskUserForCredentials { true };
 
index 8e30b75..e12dccb 100644 (file)
@@ -64,8 +64,8 @@
 #endif
 
 #if USE(QUICK_LOOK)
+#include "LegacyPreviewLoader.h"
 #include "PreviewConverter.h"
-#include "PreviewLoader.h"
 #endif
 
 #undef RELEASE_LOG_IF_ALLOWED
@@ -334,7 +334,7 @@ void SubresourceLoader::didReceiveResponse(const ResourceResponse& response, Com
 
 #if USE(QUICK_LOOK)
     if (shouldCreatePreviewLoaderForResponse(response)) {
-        m_previewLoader = PreviewLoader::create(*this, response);
+        m_previewLoader = LegacyPreviewLoader::create(*this, response);
         if (m_previewLoader->didReceiveResponse(response))
             return;
     }
similarity index 79%
rename from Source/WebCore/loader/ios/PreviewLoader.h
rename to Source/WebCore/loader/ios/LegacyPreviewLoader.h
index 1503d78..34869ab 100644 (file)
@@ -33,17 +33,17 @@ OBJC_CLASS WebPreviewLoader;
 
 namespace WebCore {
 
-class PreviewLoaderClient;
+class LegacyPreviewLoaderClient;
 class ResourceLoader;
 class ResourceResponse;
 class SharedBuffer;
 
-class PreviewLoader {
+class LegacyPreviewLoader {
     WTF_MAKE_FAST_ALLOCATED;
-    WTF_MAKE_NONCOPYABLE(PreviewLoader);
+    WTF_MAKE_NONCOPYABLE(LegacyPreviewLoader);
 public:
-    static std::unique_ptr<PreviewLoader> create(ResourceLoader&, const ResourceResponse&);
-    ~PreviewLoader();
+    static std::unique_ptr<LegacyPreviewLoader> create(ResourceLoader&, const ResourceResponse&);
+    ~LegacyPreviewLoader();
 
     bool didReceiveResponse(const ResourceResponse&);
     bool didReceiveData(const char* data, unsigned length);
@@ -51,11 +51,11 @@ public:
     bool didFinishLoading();
     void didFail();
 
-    WEBCORE_EXPORT static void setClientForTesting(RefPtr<PreviewLoaderClient>&&);
+    WEBCORE_EXPORT static void setClientForTesting(RefPtr<LegacyPreviewLoaderClient>&&);
 
 private:
-    friend std::unique_ptr<PreviewLoader> std::make_unique<PreviewLoader>(ResourceLoader&, const ResourceResponse&);
-    PreviewLoader(ResourceLoader&, const ResourceResponse&);
+    friend std::unique_ptr<LegacyPreviewLoader> std::make_unique<LegacyPreviewLoader>(ResourceLoader&, const ResourceResponse&);
+    LegacyPreviewLoader(ResourceLoader&, const ResourceResponse&);
 
     RetainPtr<WebPreviewLoader> m_previewLoader;
     bool m_finishedLoadingDataIntoConverter { false };
@@ -24,7 +24,7 @@
  */
 
 #import "config.h"
-#import "PreviewLoader.h"
+#import "LegacyPreviewLoader.h"
 
 #if USE(QUICK_LOOK)
 
@@ -32,9 +32,9 @@
 #import "Frame.h"
 #import "FrameLoader.h"
 #import "FrameLoaderClient.h"
+#import "LegacyPreviewLoaderClient.h"
 #import "Logging.h"
 #import "PreviewConverter.h"
-#import "PreviewLoaderClient.h"
 #import "QuickLook.h"
 #import "ResourceLoader.h"
 #import "Settings.h"
@@ -46,7 +46,7 @@ using namespace WebCore;
 @interface WebPreviewLoader : NSObject {
     WeakPtr<ResourceLoader> _resourceLoader;
     ResourceResponse _response;
-    RefPtr<PreviewLoaderClient> _client;
+    RefPtr<LegacyPreviewLoaderClient> _client;
     std::unique_ptr<PreviewConverter> _converter;
     RetainPtr<NSMutableArray> _bufferedDataArray;
     BOOL _hasLoadedPreview;
@@ -67,15 +67,15 @@ using namespace WebCore;
 
 @implementation WebPreviewLoader
 
-static RefPtr<PreviewLoaderClient>& testingClient()
+static RefPtr<LegacyPreviewLoaderClient>& testingClient()
 {
-    static NeverDestroyed<RefPtr<PreviewLoaderClient>> testingClient;
+    static NeverDestroyed<RefPtr<LegacyPreviewLoaderClient>> testingClient;
     return testingClient.get();
 }
 
-static PreviewLoaderClient& emptyClient()
+static LegacyPreviewLoaderClient& emptyClient()
 {
-    static NeverDestroyed<PreviewLoaderClient> emptyClient;
+    static NeverDestroyed<LegacyPreviewLoaderClient> emptyClient;
     return emptyClient.get();
 }
 
@@ -256,27 +256,27 @@ static inline bool isQuickLookPasswordError(NSError *error)
 
 namespace WebCore {
 
-PreviewLoader::PreviewLoader(ResourceLoader& loader, const ResourceResponse& response)
+LegacyPreviewLoader::LegacyPreviewLoader(ResourceLoader& loader, const ResourceResponse& response)
     : m_previewLoader { adoptNS([[WebPreviewLoader alloc] initWithResourceLoader:loader resourceResponse:response]) }
 {
 }
 
-PreviewLoader::~PreviewLoader()
+LegacyPreviewLoader::~LegacyPreviewLoader()
 {
 }
 
-std::unique_ptr<PreviewLoader> PreviewLoader::create(ResourceLoader& loader, const ResourceResponse& response)
+std::unique_ptr<LegacyPreviewLoader> LegacyPreviewLoader::create(ResourceLoader& loader, const ResourceResponse& response)
 {
     ASSERT(PreviewConverter::supportsMIMEType(response.mimeType()));
-    return makeUnique<PreviewLoader>(loader, response);
+    return makeUnique<LegacyPreviewLoader>(loader, response);
 }
 
-bool PreviewLoader::didReceiveResponse(const ResourceResponse&)
+bool LegacyPreviewLoader::didReceiveResponse(const ResourceResponse&)
 {
     return ![m_previewLoader shouldDecidePolicyBeforeLoading];
 }
 
-bool PreviewLoader::didReceiveData(const char* data, unsigned length)
+bool LegacyPreviewLoader::didReceiveData(const char* data, unsigned length)
 {
     if (m_finishedLoadingDataIntoConverter)
         return false;
@@ -285,7 +285,7 @@ bool PreviewLoader::didReceiveData(const char* data, unsigned length)
     return true;
 }
 
-bool PreviewLoader::didReceiveBuffer(const SharedBuffer& buffer)
+bool LegacyPreviewLoader::didReceiveBuffer(const SharedBuffer& buffer)
 {
     if (m_finishedLoadingDataIntoConverter)
         return false;
@@ -294,7 +294,7 @@ bool PreviewLoader::didReceiveBuffer(const SharedBuffer& buffer)
     return true;
 }
 
-bool PreviewLoader::didFinishLoading()
+bool LegacyPreviewLoader::didFinishLoading()
 {
     if (m_finishedLoadingDataIntoConverter)
         return false;
@@ -304,7 +304,7 @@ bool PreviewLoader::didFinishLoading()
     return true;
 }
 
-void PreviewLoader::didFail()
+void LegacyPreviewLoader::didFail()
 {
     if (m_finishedLoadingDataIntoConverter)
         return;
@@ -314,7 +314,7 @@ void PreviewLoader::didFail()
     m_previewLoader = nullptr;
 }
 
-void PreviewLoader::setClientForTesting(RefPtr<PreviewLoaderClient>&& client)
+void LegacyPreviewLoader::setClientForTesting(RefPtr<LegacyPreviewLoaderClient>&& client)
 {
     testingClient() = WTFMove(client);
 }
@@ -31,9 +31,9 @@
 
 namespace WebCore {
 
-class PreviewLoaderClient : public RefCounted<PreviewLoaderClient> {
+class LegacyPreviewLoaderClient : public RefCounted<LegacyPreviewLoaderClient> {
 public:
-    virtual ~PreviewLoaderClient() = default;
+    virtual ~LegacyPreviewLoaderClient() = default;
     virtual void didReceiveDataArray(CFArrayRef) { }
     virtual void didFinishLoading() { }
     virtual void didFail() { }
index 4f1f14f..e4e7ac9 100644 (file)
 #endif
 
 #if USE(QUICK_LOOK)
+#include "LegacyPreviewLoader.h"
 #include "MockPreviewLoaderClient.h"
-#include "PreviewLoader.h"
 #endif
 
 #if ENABLE(APPLE_PAY)
@@ -514,7 +514,7 @@ void Internals::resetToConsistentState(Page& page)
 
 #if USE(QUICK_LOOK)
     MockPreviewLoaderClient::singleton().setPassword("");
-    PreviewLoader::setClientForTesting(nullptr);
+    LegacyPreviewLoader::setClientForTesting(nullptr);
 #endif
 
     printContextForTesting() = nullptr;
@@ -4700,7 +4700,7 @@ void Internals::setQuickLookPassword(const String& password)
 {
 #if PLATFORM(IOS_FAMILY) && USE(QUICK_LOOK)
     auto& quickLookHandleClient = MockPreviewLoaderClient::singleton();
-    PreviewLoader::setClientForTesting(&quickLookHandleClient);
+    LegacyPreviewLoader::setClientForTesting(&quickLookHandleClient);
     quickLookHandleClient.setPassword(password);
 #else
     UNUSED_PARAM(password);
index ac5aeb0..22ed8b1 100644 (file)
 
 #if USE(QUICK_LOOK)
 
-#include "PreviewLoaderClient.h"
+#include "LegacyPreviewLoaderClient.h"
 
 namespace WebCore {
 
-class MockPreviewLoaderClient final : public PreviewLoaderClient {
+class MockPreviewLoaderClient final : public LegacyPreviewLoaderClient {
 public:
     static MockPreviewLoaderClient& singleton();
 
index c745089..667bc55 100644 (file)
@@ -1,3 +1,16 @@
+2019-10-23  Andy Estes  <aestes@apple.com>
+
+        [Quick Look] Rename PreviewLoader{,Client} to LegacyPreviewLoader{,Client}
+        https://bugs.webkit.org/show_bug.cgi?id=203306
+
+        Reviewed by Tim Horton.
+
+        * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
+        * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
+        (WebKit::WebFrameLoaderClient::createPreviewLoaderClient):
+        * WebProcess/WebCoreSupport/ios/WebPreviewLoaderClient.h:
+
 2019-10-22  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         Unreviewed build fix for non-unified source builds
index 4b4e2ee..a2abab9 100644 (file)
@@ -62,7 +62,7 @@
 #include <wtf/ProcessID.h>
 
 #if USE(QUICK_LOOK)
-#include <WebCore/PreviewLoaderClient.h>
+#include <WebCore/LegacyPreviewLoaderClient.h>
 #endif
 
 namespace WebKit {
index 611fcb8..aec0339 100644 (file)
@@ -256,7 +256,7 @@ private:
     void forcePageTransitionIfNeeded() final;
 
 #if USE(QUICK_LOOK)
-    RefPtr<WebCore::PreviewLoaderClient> createPreviewLoaderClient(const String& fileName, const String& uti) final;
+    RefPtr<WebCore::LegacyPreviewLoaderClient> createPreviewLoaderClient(const String& fileName, const String& uti) final;
 #endif
 
 #if ENABLE(CONTENT_FILTERING)
index 8faf31e..ead4392 100644 (file)
@@ -65,7 +65,7 @@ RetainPtr<CFDictionaryRef> WebFrameLoaderClient::connectionProperties(DocumentLo
 }
 
 #if USE(QUICK_LOOK)
-RefPtr<PreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& uti)
+RefPtr<LegacyPreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& uti)
 {
     if (!m_frame->isMainFrame())
         return nullptr;
index b9d6965..da3b508 100644 (file)
 #if USE(QUICK_LOOK)
 
 #include "QuickLookDocumentData.h"
+#include <WebCore/LegacyPreviewLoaderClient.h>
 #include <WebCore/PageIdentifier.h>
-#include <WebCore/PreviewLoaderClient.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebKit {
 
 class WebFrame;
 
-class WebPreviewLoaderClient final : public WebCore::PreviewLoaderClient {
+class WebPreviewLoaderClient final : public WebCore::LegacyPreviewLoaderClient {
 public:
     static Ref<WebPreviewLoaderClient> create(const String& fileName, const String& uti, WebCore::PageIdentifier pageID)
     {
index a67f9dc..87a8a2a 100644 (file)
@@ -1,3 +1,18 @@
+2019-10-23  Andy Estes  <aestes@apple.com>
+
+        [Quick Look] Rename PreviewLoader{,Client} to LegacyPreviewLoader{,Client}
+        https://bugs.webkit.org/show_bug.cgi?id=203306
+
+        Reviewed by Tim Horton.
+
+        * WebCoreSupport/WebFrameLoaderClient.h:
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::createPreviewLoaderClient):
+        * WebView/WebDataSource.mm:
+        (-[WebDataSource _quickLookPreviewLoaderClient]):
+        (-[WebDataSource _setQuickLookPreviewLoaderClient:]):
+        * WebView/WebDataSourceInternal.h:
+
 2019-10-22  Alex Christensen  <achristensen@webkit.org>
 
         Re-enable legacy TLS by default, keep runtime switch
index b4ee9e6..61a810e 100644 (file)
@@ -241,7 +241,7 @@ private:
     bool shouldPaintBrokenImage(const URL&) const final;
 
 #if USE(QUICK_LOOK)
-    RefPtr<WebCore::PreviewLoaderClient> createPreviewLoaderClient(const String& fileName, const String& uti) final;
+    RefPtr<WebCore::LegacyPreviewLoaderClient> createPreviewLoaderClient(const String& fileName, const String& uti) final;
 #endif
 
 #if ENABLE(CONTENT_FILTERING)
index a3e9833..37b8273 100644 (file)
 #endif
 
 #if USE(QUICK_LOOK)
-#import <WebCore/PreviewLoaderClient.h>
+#import <WebCore/LegacyPreviewLoaderClient.h>
 #import <WebCore/QuickLook.h>
 #import <pal/spi/cocoa/NSFileManagerSPI.h>
 #endif
@@ -2186,9 +2186,9 @@ bool WebFrameLoaderClient::shouldLoadMediaElementURL(const URL& url) const
 #endif
 
 #if USE(QUICK_LOOK)
-RefPtr<WebCore::PreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& uti)
+RefPtr<WebCore::LegacyPreviewLoaderClient> WebFrameLoaderClient::createPreviewLoaderClient(const String& fileName, const String& uti)
 {
-    class QuickLookDocumentWriter : public WebCore::PreviewLoaderClient {
+    class QuickLookDocumentWriter : public WebCore::LegacyPreviewLoaderClient {
     public:
         explicit QuickLookDocumentWriter(NSString *filePath)
             : m_filePath { filePath }
index 1029c1d..91e94bf 100644 (file)
@@ -71,7 +71,7 @@
 #endif
 
 #if USE(QUICK_LOOK)
-#import <WebCore/PreviewLoaderClient.h>
+#import <WebCore/LegacyPreviewLoaderClient.h>
 #import <WebCore/QuickLook.h>
 #endif
 
@@ -107,7 +107,7 @@ public:
 #endif
 #if USE(QUICK_LOOK)
     RetainPtr<NSDictionary> _quickLookContent;
-    RefPtr<WebCore::PreviewLoaderClient> _quickLookPreviewLoaderClient;
+    RefPtr<WebCore::LegacyPreviewLoaderClient> _quickLookPreviewLoaderClient;
 #endif
 };
 
@@ -416,7 +416,7 @@ void addTypesFromClass(NSMutableDictionary *allTypes, Class objCClass, NSArray *
 }
 
 #if USE(QUICK_LOOK)
-- (WebCore::PreviewLoaderClient*)_quickLookPreviewLoaderClient
+- (WebCore::LegacyPreviewLoaderClient*)_quickLookPreviewLoaderClient
 {
     return toPrivate(_private)->_quickLookPreviewLoaderClient.get();
 }
@@ -426,7 +426,7 @@ void addTypesFromClass(NSMutableDictionary *allTypes, Class objCClass, NSArray *
     toPrivate(_private)->_quickLookContent = adoptNS([quickLookContent copy]);
 }
 
-- (void)_setQuickLookPreviewLoaderClient:(WebCore::PreviewLoaderClient*)quickLookPreviewLoaderClient
+- (void)_setQuickLookPreviewLoaderClient:(WebCore::LegacyPreviewLoaderClient*)quickLookPreviewLoaderClient
 {
     toPrivate(_private)->_quickLookPreviewLoaderClient = quickLookPreviewLoaderClient;
 }
index ed0153a..80e8110 100644 (file)
@@ -31,7 +31,7 @@
 
 namespace WebCore {
 class DocumentLoader;
-class PreviewLoaderClient;
+class LegacyPreviewLoaderClient;
 }
 
 class WebDocumentLoaderMac;
@@ -60,6 +60,6 @@ class WebDocumentLoaderMac;
 - (WebCore::DocumentLoader*)_documentLoader;
 #if USE(QUICK_LOOK)
 @property (nonatomic, copy, setter=_setQuickLookContent:) NSDictionary *_quickLookContent;
-@property (nonatomic, setter=_setQuickLookPreviewLoaderClient:) WebCore::PreviewLoaderClient* _quickLookPreviewLoaderClient;
+@property (nonatomic, setter=_setQuickLookPreviewLoaderClient:) WebCore::LegacyPreviewLoaderClient* _quickLookPreviewLoaderClient;
 #endif
 @end