Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[QuickLook] FrameLoaderClient should return the new QuickLookHandleCl…
…ient it creates https://bugs.webkit.org/show_bug.cgi?id=167625 Reviewed by Andreas Kling. Source/WebCore: QuickLookHandleClients were being created by QuickLookHandle calling FrameLoaderClient::didCreateQuickLookHandle() then having the FrameLoaderClient create a new QuickLookHandleClient and set it using QuickLookHandle::setClient(). Since all FrameLoaderClient::didCreateQuickLookHandle() does is create a new QuickLookHandleClient, this patch changes the FrameLoaderClient function to return the new QuickLookHandleClient directly and removes the API from QuickLookHandle to set a client. This also removes previewFileName() and previewUTI() from QuickLookHandle and instead passes these as arguments to the FrameLoaderClient. No change in behavior. Covered by existing tests. * loader/EmptyClients.cpp: Added an implementation of createQuickLookHandleClient() that returns nullptr. * loader/FrameLoaderClient.h: Declared createQuickLookHandleClient() and removed didCreateQuickLookHandle(). * loader/ios/QuickLook.h: Removed setClient(), previewFileName(), and previewUTI(). * loader/ios/QuickLook.mm: Removed testingOrEmptyClient(). (-[WebPreviewLoader initWithResourceLoader:resourceResponse:quickLookHandle:]): Set _client to testingClient() if it exists, otherwise set it to the client returned by FrameLoaderClient::createQuickLookHandleClient() it non-null, otherwise set it to emptyClient(). (testingOrEmptyClient): Deleted. (-[WebPreviewLoader setClient:]): Deleted. (-[WebPreviewLoader converter]): Deleted. (WebCore::QuickLookHandle::setClient): Deleted. (WebCore::QuickLookHandle::previewFileName): Deleted. (WebCore::QuickLookHandle::previewUTI): Deleted. Source/WebKit/mac: * WebCoreSupport/WebFrameLoaderClient.h: Declared createQuickLookHandleClient(). * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::createQuickLookHandleClient): Renamed from didCreateQuickLookHandle(). (WebFrameLoaderClient::didCreateQuickLookHandle): Renamed to createQuickLookHandleClient(). Source/WebKit2: * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Declared createQuickLookHandleClient(). * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm: (WebKit::WebFrameLoaderClient::createQuickLookHandleClient): Renamed from didCreateQuickLookHandle(). (WebKit::WebFrameLoaderClient::didCreateQuickLookHandle): Renamed to createQuickLookHandleClient(). * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp: (WebKit::WebQuickLookHandleClient::WebQuickLookHandleClient): Set m_fileName and m_uti from the constructor arguments instead of from handle. * WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h: Canonical link: https://commits.webkit.org/184642@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
100 additions
and 63 deletions.
- +36 −0 Source/WebCore/ChangeLog
- +8 −0 Source/WebCore/loader/EmptyClients.cpp
- +2 −2 Source/WebCore/loader/FrameLoaderClient.h
- +0 −4 Source/WebCore/loader/ios/QuickLook.h
- +7 −38 Source/WebCore/loader/ios/QuickLook.mm
- +12 −0 Source/WebKit/mac/ChangeLog
- +1 −1 Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h
- +6 −6 Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
- +16 −0 Source/WebKit2/ChangeLog
- +1 −1 Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
- +4 −4 Source/WebKit2/WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm
- +4 −4 Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp
- +3 −3 Source/WebKit2/WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters