WebKit Bugzilla
Attachment 359696 Details for
Bug 193654
: Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h}
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v2
0002-Switch-remaining-QuickLook-soft-linking-in-WebCore-W.patch (text/plain), 31.63 KB, created by
David Kilzer (:ddkilzer)
on 2019-01-21 10:07:44 PST
(
hide
)
Description:
Patch v2
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2019-01-21 10:07:44 PST
Size:
31.63 KB
patch
obsolete
>From 2d5004ac1c08c44a6d932a532ef8b8620fbeb8cc Mon Sep 17 00:00:00 2001 >From: David Kilzer <ddkilzer@apple.com> >Date: Mon, 21 Jan 2019 10:06:45 -0800 >Subject: [PATCH] Switch remaining QuickLook soft-linking in WebCore, WebKit > over to QuickLookSoftLink.{cpp,h} <https://webkit.org/b/193654> > <rdar://problem/47430290> > >Reviewed by NOBODY (OOPS!). > >- Moves QuickLookSoftLink.{h,mm} to PAL. >- Adds soft-link to 3 classes to consolidate QuickLook.framework > soft-linking. >- Updates existing source to work with above changes. > >Source/WebCore: > >* SourcesCocoa.txt: >* UnifiedSources-input.xcfilelist: >* WebCore.xcodeproj/project.pbxproj: >- Remove QuickLookSoftLink.{h,mm} due to move to PAL. > >* platform/ios/QuickLook.mm: >(WebCore::QLPreviewGetSupportedMIMETypesSet): >(WebCore::registerQLPreviewConverterIfNeeded): >- Update for QuickLookSoftLink.{h,mm} move to PAL. > >* platform/network/ios/PreviewConverter.mm: >(WebCore::optionsWithPassword): >(WebCore::PreviewConverter::PreviewConverter): >- Switch to using QuickLookSoftLink.{h,mm} in PAL. > >* platform/network/ios/WebCoreURLResponseIOS.mm: >(WebCore::adjustMIMETypeIfNecessary): >- Update for QuickLookSoftLink.{h,mm} move to PAL. > >Source/WebCore/PAL: > >* PAL.xcodeproj/project.pbxproj: >- Add QuickLookSoftLink.{h,mm} due to move from WebCore. > >* pal/ios/QuickLookSoftLink.h: Renamed from Source/WebCore/platform/ios/QuickLookSoftLink.h. >* pal/ios/QuickLookSoftLink.mm: Renamed from Source/WebCore/platform/ios/QuickLookSoftLink.mm. >- Add 3 classes for soft-linking. >- Change namespace from WebCore to PAL. > >Source/WebKit: > >* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm: >(-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]): >(WebKit::SystemPreviewController::start): >* UIProcess/ios/WKSystemPreviewView.mm: >(-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]): >- Switch to using QuickLookSoftLink.{h,mm} in PAL. >--- > Source/WebCore/ChangeLog | 32 +++++++++++++++++++ > Source/WebCore/PAL/ChangeLog | 21 ++++++++++++ > .../WebCore/PAL/PAL.xcodeproj/project.pbxproj | 8 +++++ > .../pal}/ios/QuickLookSoftLink.h | 16 ++++++---- > .../pal}/ios/QuickLookSoftLink.mm | 16 ++++++---- > Source/WebCore/SourcesCocoa.txt | 1 - > .../WebCore/UnifiedSources-input.xcfilelist | 1 - > .../WebCore/WebCore.xcodeproj/project.pbxproj | 8 ----- > Source/WebCore/platform/ios/QuickLook.mm | 9 +++--- > .../platform/network/ios/PreviewConverter.mm | 12 +++---- > .../network/ios/WebCoreURLResponseIOS.mm | 5 ++- > Source/WebKit/ChangeLog | 20 ++++++++++++ > .../Cocoa/SystemPreviewControllerCocoa.mm | 12 +++---- > .../UIProcess/ios/WKSystemPreviewView.mm | 9 ++---- > 14 files changed, 118 insertions(+), 52 deletions(-) > rename Source/WebCore/{platform => PAL/pal}/ios/QuickLookSoftLink.h (67%) > rename Source/WebCore/{platform => PAL/pal}/ios/QuickLookSoftLink.mm (59%) > >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index f220d7a7b95..bffb46b5186 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,35 @@ >+2019-01-21 David Kilzer <ddkilzer@apple.com> >+ >+ Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h} >+ <https://webkit.org/b/193654> >+ <rdar://problem/47430290> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ - Moves QuickLookSoftLink.{h,mm} to PAL. >+ - Adds soft-link to 3 classes to consolidate QuickLook.framework >+ soft-linking. >+ - Updates existing source to work with above changes. >+ >+ * SourcesCocoa.txt: >+ * UnifiedSources-input.xcfilelist: >+ * WebCore.xcodeproj/project.pbxproj: >+ - Remove QuickLookSoftLink.{h,mm} due to move to PAL. >+ >+ * platform/ios/QuickLook.mm: >+ (WebCore::QLPreviewGetSupportedMIMETypesSet): >+ (WebCore::registerQLPreviewConverterIfNeeded): >+ - Update for QuickLookSoftLink.{h,mm} move to PAL. >+ >+ * platform/network/ios/PreviewConverter.mm: >+ (WebCore::optionsWithPassword): >+ (WebCore::PreviewConverter::PreviewConverter): >+ - Switch to using QuickLookSoftLink.{h,mm} in PAL. >+ >+ * platform/network/ios/WebCoreURLResponseIOS.mm: >+ (WebCore::adjustMIMETypeIfNecessary): >+ - Update for QuickLookSoftLink.{h,mm} move to PAL. >+ > 2019-01-21 David Kilzer <ddkilzer@apple.com> > > Switch remaining VideoToolbox soft-linking in WebCore over to VideoToolboxSoftLink.{cpp,h} >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index e78f125b4ee..ca76758d0e9 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,24 @@ >+2019-01-21 David Kilzer <ddkilzer@apple.com> >+ >+ Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h} >+ <https://webkit.org/b/193654> >+ <rdar://problem/47430290> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ - Moves QuickLookSoftLink.{h,mm} to PAL. >+ - Adds soft-link to 3 classes to consolidate QuickLook.framework >+ soft-linking. >+ - Updates existing source to work with above changes. >+ >+ * PAL.xcodeproj/project.pbxproj: >+ - Add QuickLookSoftLink.{h,mm} due to move from WebCore. >+ >+ * pal/ios/QuickLookSoftLink.h: Renamed from Source/WebCore/platform/ios/QuickLookSoftLink.h. >+ * pal/ios/QuickLookSoftLink.mm: Renamed from Source/WebCore/platform/ios/QuickLookSoftLink.mm. >+ - Add 3 classes for soft-linking. >+ - Change namespace from WebCore to PAL. >+ > 2019-01-21 David Kilzer <ddkilzer@apple.com> > > Sort PAL Xcode project file >diff --git a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >index f05465d0317..4fbdde39a4a 100644 >--- a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >+++ b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >@@ -112,6 +112,8 @@ > 2E1342CD215AA10A007199D2 /* UIKitSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E1342CB215AA10A007199D2 /* UIKitSoftLink.mm */; }; > 31308B1420A21705003FB929 /* SystemPreviewSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 31308B1320A21705003FB929 /* SystemPreviewSPI.h */; }; > 442956CD218A72DF0080DB54 /* RevealSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 442956CC218A72DE0080DB54 /* RevealSPI.h */; }; >+ 4450FC9F21F5F602004DFA56 /* QuickLookSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4450FC9D21F5F602004DFA56 /* QuickLookSoftLink.mm */; }; >+ 4450FCA021F5F602004DFA56 /* QuickLookSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 4450FC9E21F5F602004DFA56 /* QuickLookSoftLink.h */; }; > 570AB8F120AE2E8D00B8BE87 /* SecKeyProxySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F020AE2E8D00B8BE87 /* SecKeyProxySPI.h */; }; > 570AB8F920AF6E3D00B8BE87 /* NSXPCConnectionSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 570AB8F820AF6E3D00B8BE87 /* NSXPCConnectionSPI.h */; }; > 63C7EDC721AFAE04006A7B99 /* NSProgressSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 63E369F921AFA83F001C14BC /* NSProgressSPI.h */; }; >@@ -270,6 +272,8 @@ > 31308B1320A21705003FB929 /* SystemPreviewSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SystemPreviewSPI.h; sourceTree = "<group>"; }; > 37119A7820CCB5FF002C6DC9 /* WebKitTargetConditionals.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = WebKitTargetConditionals.xcconfig; sourceTree = "<group>"; }; > 442956CC218A72DE0080DB54 /* RevealSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RevealSPI.h; sourceTree = "<group>"; }; >+ 4450FC9D21F5F602004DFA56 /* QuickLookSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuickLookSoftLink.mm; sourceTree = "<group>"; }; >+ 4450FC9E21F5F602004DFA56 /* QuickLookSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuickLookSoftLink.h; sourceTree = "<group>"; }; > 570AB8F020AE2E8D00B8BE87 /* SecKeyProxySPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SecKeyProxySPI.h; sourceTree = "<group>"; }; > 570AB8F820AF6E3D00B8BE87 /* NSXPCConnectionSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSXPCConnectionSPI.h; sourceTree = "<group>"; }; > 63E369F921AFA83F001C14BC /* NSProgressSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSProgressSPI.h; sourceTree = "<group>"; }; >@@ -576,6 +580,8 @@ > 2E87C06E215A993100D6CD32 /* ios */ = { > isa = PBXGroup; > children = ( >+ 4450FC9E21F5F602004DFA56 /* QuickLookSoftLink.h */, >+ 4450FC9D21F5F602004DFA56 /* QuickLookSoftLink.mm */, > 2E1342CA215AA10A007199D2 /* UIKitSoftLink.h */, > 2E1342CB215AA10A007199D2 /* UIKitSoftLink.mm */, > ); >@@ -748,6 +754,7 @@ > 0C2DA1571F3BEB4900DBC317 /* QuartzCoreSPI.h in Headers */, > A102658B1F56748C00B4C844 /* QuickDrawSPI.h in Headers */, > 0C7785A01F45130F00F4EBB6 /* QuickLookMacSPI.h in Headers */, >+ 4450FCA021F5F602004DFA56 /* QuickLookSoftLink.h in Headers */, > 0C5AF9201F43A4C7002EAC02 /* QuickLookSPI.h in Headers */, > 442956CD218A72DF0080DB54 /* RevealSPI.h in Headers */, > 570AB8F120AE2E8D00B8BE87 /* SecKeyProxySPI.h in Headers */, >@@ -867,6 +874,7 @@ > 0CF99CA41F736375007EE793 /* MediaTimeAVFoundation.cpp in Sources */, > A1F63CA021A4DBF7006FB43B /* PassKitSoftLink.mm in Sources */, > A1175B4F1F6B337300C4B9F0 /* PopupMenu.mm in Sources */, >+ 4450FC9F21F5F602004DFA56 /* QuickLookSoftLink.mm in Sources */, > A3C66CDC1F462D6A009E6EE9 /* SessionID.cpp in Sources */, > A3AB6E521F3D1DC5009C14B1 /* SleepDisabler.cpp in Sources */, > A3AB6E601F3D1E39009C14B1 /* SleepDisablerCocoa.cpp in Sources */, >diff --git a/Source/WebCore/platform/ios/QuickLookSoftLink.h b/Source/WebCore/PAL/pal/ios/QuickLookSoftLink.h >similarity index 67% >rename from Source/WebCore/platform/ios/QuickLookSoftLink.h >rename to Source/WebCore/PAL/pal/ios/QuickLookSoftLink.h >index 24fcccab1f7..f66ae8335d8 100644 >--- a/Source/WebCore/platform/ios/QuickLookSoftLink.h >+++ b/Source/WebCore/PAL/pal/ios/QuickLookSoftLink.h >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2015-2017 Apple Inc. All rights reserved. >+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -27,15 +27,19 @@ > #include <pal/spi/ios/QuickLookSPI.h> > #include <wtf/SoftLinking.h> > >-SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, QuickLook) >+SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, QuickLook) > >-SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, QuickLook, QLPreviewGetSupportedMIMETypes, NSSet *, (), ()) >+SOFT_LINK_CLASS_FOR_HEADER(PAL, QLItem) >+SOFT_LINK_CLASS_FOR_HEADER(PAL, QLPreviewController) >+SOFT_LINK_CLASS_FOR_HEADER(PAL, QLPreviewConverter) >+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, QuickLook, kQLPreviewOptionPasswordKey, CFStringRef); >+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, QuickLook, QLPreviewGetSupportedMIMETypes, NSSet *, (), ()) > #define QLPreviewGetSupportedMIMETypes softLink_QuickLook_QLPreviewGetSupportedMIMETypes >-SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, QuickLook, QLTypeCopyBestMimeTypeForFileNameAndMimeType, NSString *, (NSString *fileName, NSString *mimeType), (fileName, mimeType)) >+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, QuickLook, QLTypeCopyBestMimeTypeForFileNameAndMimeType, NSString *, (NSString *fileName, NSString *mimeType), (fileName, mimeType)) > #define QLTypeCopyBestMimeTypeForFileNameAndMimeType softLink_QuickLook_QLTypeCopyBestMimeTypeForFileNameAndMimeType >-SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, QuickLook, QLTypeCopyBestMimeTypeForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType)) >+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, QuickLook, QLTypeCopyBestMimeTypeForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType)) > #define QLTypeCopyBestMimeTypeForURLAndMimeType softLink_QuickLook_QLTypeCopyBestMimeTypeForURLAndMimeType >-SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, QuickLook, QLTypeCopyUTIForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType)) >+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, QuickLook, QLTypeCopyUTIForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType)) > #define QLTypeCopyUTIForURLAndMimeType softLink_QuickLook_QLTypeCopyUTIForURLAndMimeType > > #endif // USE(QUICK_LOOK) >diff --git a/Source/WebCore/platform/ios/QuickLookSoftLink.mm b/Source/WebCore/PAL/pal/ios/QuickLookSoftLink.mm >similarity index 59% >rename from Source/WebCore/platform/ios/QuickLookSoftLink.mm >rename to Source/WebCore/PAL/pal/ios/QuickLookSoftLink.mm >index 381178f81dd..575e13b27b8 100644 >--- a/Source/WebCore/platform/ios/QuickLookSoftLink.mm >+++ b/Source/WebCore/PAL/pal/ios/QuickLookSoftLink.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2015-2017 Apple Inc. All rights reserved. >+ * Copyright (C) 2015-2019 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -29,11 +29,15 @@ > #import <pal/spi/ios/QuickLookSPI.h> > #import <wtf/SoftLinking.h> > >-SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, QuickLook) >+SOFT_LINK_FRAMEWORK_FOR_SOURCE(PAL, QuickLook) > >-SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, QuickLook, QLPreviewGetSupportedMIMETypes, NSSet *, (), ()) >-SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, QuickLook, QLTypeCopyBestMimeTypeForFileNameAndMimeType, NSString *, (NSString *fileName, NSString *mimeType), (fileName, mimeType)) >-SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, QuickLook, QLTypeCopyBestMimeTypeForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType)) >-SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, QuickLook, QLTypeCopyUTIForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType)) >+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, QuickLook, QLItem, PAL_EXPORT) >+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, QuickLook, QLPreviewController, PAL_EXPORT) >+SOFT_LINK_CLASS_FOR_SOURCE(PAL, QuickLook, QLPreviewConverter) >+SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, QuickLook, kQLPreviewOptionPasswordKey, CFStringRef); >+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, QuickLook, QLPreviewGetSupportedMIMETypes, NSSet *, (), ()) >+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, QuickLook, QLTypeCopyBestMimeTypeForFileNameAndMimeType, NSString *, (NSString *fileName, NSString *mimeType), (fileName, mimeType)) >+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, QuickLook, QLTypeCopyBestMimeTypeForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType)) >+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, QuickLook, QLTypeCopyUTIForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType)) > > #endif // USE(QUICK_LOOK) >diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt >index c72825aee53..0e15b904ead 100644 >--- a/Source/WebCore/SourcesCocoa.txt >+++ b/Source/WebCore/SourcesCocoa.txt >@@ -410,7 +410,6 @@ platform/ios/PlatformScreenIOS.mm > platform/ios/PlatformSpeechSynthesizerIOS.mm @no-unify > platform/ios/PlaybackSessionInterfaceAVKit.mm @no-unify > platform/ios/QuickLook.mm >-platform/ios/QuickLookSoftLink.mm @no-unify > platform/ios/RemoteCommandListenerIOS.mm > platform/ios/ScrollAnimatorIOS.mm > platform/ios/ScrollbarThemeIOS.mm >diff --git a/Source/WebCore/UnifiedSources-input.xcfilelist b/Source/WebCore/UnifiedSources-input.xcfilelist >index c6f19a64351..476411cd5c0 100644 >--- a/Source/WebCore/UnifiedSources-input.xcfilelist >+++ b/Source/WebCore/UnifiedSources-input.xcfilelist >@@ -2990,7 +2990,6 @@ $(SRCROOT)/platform/ios/PlatformScreenIOS.mm > $(SRCROOT)/platform/ios/PlatformSpeechSynthesizerIOS.mm > $(SRCROOT)/platform/ios/PlaybackSessionInterfaceAVKit.mm > $(SRCROOT)/platform/ios/QuickLook.mm >-$(SRCROOT)/platform/ios/QuickLookSoftLink.mm > $(SRCROOT)/platform/ios/RemoteCommandListenerIOS.mm > $(SRCROOT)/platform/ios/ScrollAnimatorIOS.mm > $(SRCROOT)/platform/ios/ScrollViewIOS.mm >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index b5dee9cfc1f..81cba2a51fe 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -808,7 +808,6 @@ > 2D8B92FF203D13E1009C868F /* UnifiedSource530.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE5F85D31FA23859006DB63B /* UnifiedSource530.cpp */; }; > 2D8FEBDD143E3EF70072502B /* CSSCrossfadeValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D8FEBDB143E3EF70072502B /* CSSCrossfadeValue.h */; }; > 2D9066070BE141D400956998 /* RenderLayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9066050BE141D400956998 /* RenderLayoutState.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 2D92A79A2134AD7900F493FD /* QuickLookSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */; }; > 2D93AEE319DF5641002A86C3 /* ServicesOverlayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D93AEE119DF5641002A86C3 /* ServicesOverlayController.h */; }; > 2D97F04719DD413C001EE9C3 /* MockPageOverlayClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2DAAE32C19DCAF6000E002D2 /* MockPageOverlayClient.cpp */; }; > 2D97F04819DD4140001EE9C3 /* MockPageOverlayClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DAAE32D19DCAF6000E002D2 /* MockPageOverlayClient.h */; }; >@@ -1215,7 +1214,6 @@ > 43C092BC12D9E4EE00A989C3 /* RenderSVGForeignObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 43C092BA12D9E4EE00A989C3 /* RenderSVGForeignObject.h */; }; > 43EDD67F1B485DBF00640E75 /* CombinedFiltersAlphabet.h in Headers */ = {isa = PBXBuildFile; fileRef = 43EDD67D1B485DBF00640E75 /* CombinedFiltersAlphabet.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 4415292E0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 443918001A91B2F8006E04F2 /* QuickLookSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */; }; > 445775E520472F73008DCE5D /* LocalDefaultSystemAppearance.h in Headers */ = {isa = PBXBuildFile; fileRef = 445775E420472F73008DCE5D /* LocalDefaultSystemAppearance.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 4471710E205AF945000A116E /* MediaQueryParserContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4471710C205AF945000A116E /* MediaQueryParserContext.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 447958041643B49A001E0A7F /* ParsedContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 447958031643B47B001E0A7F /* ParsedContentType.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -7647,8 +7645,6 @@ > 4415292C0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLPlugInImageElement.h; sourceTree = "<group>"; }; > 4415292D0E1AE8A000C4A2D0 /* HTMLPlugInImageElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPlugInImageElement.cpp; sourceTree = "<group>"; }; > 442956CA218A6D300080DB54 /* DictionaryLookupLegacy.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = DictionaryLookupLegacy.mm; sourceTree = "<group>"; }; >- 443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuickLookSoftLink.mm; sourceTree = "<group>"; }; >- 443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuickLookSoftLink.h; sourceTree = "<group>"; }; > 443F04260E75C8FB007E5407 /* NetworkStateNotifierIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkStateNotifierIOS.mm; sourceTree = "<group>"; }; > 444D4E210F708B2E003158E0 /* WebCoreURLResponseIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreURLResponseIOS.mm; sourceTree = "<group>"; }; > 445775E420472F73008DCE5D /* LocalDefaultSystemAppearance.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocalDefaultSystemAppearance.h; sourceTree = "<group>"; }; >@@ -22428,8 +22424,6 @@ > CDA29A2F1CBF73FC00901CCF /* PlaybackSessionInterfaceAVKit.mm */, > A15E31F11E0CB0AA004B371C /* QuickLook.h */, > A15E31F21E0CB0AA004B371C /* QuickLook.mm */, >- 443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */, >- 443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */, > CDFC360118CA61630026E56F /* RemoteCommandListenerIOS.h */, > CDFC360218CA61630026E56F /* RemoteCommandListenerIOS.mm */, > 0F17747E1378B771009DA76A /* ScrollAnimatorIOS.h */, >@@ -31061,7 +31055,6 @@ > 550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */, > 83C1F5941EDF69D300410D27 /* QualifiedNameCache.h in Headers */, > A15E31F41E0CB0B5004B371C /* QuickLook.h in Headers */, >- 443918001A91B2F8006E04F2 /* QuickLookSoftLink.h in Headers */, > 072AE1E8183C0741000A5988 /* QuickTimePluginReplacement.h in Headers */, > 379E371713736A6600B9E919 /* QuotedPrintable.h in Headers */, > 5A574F29131DB96D00471B88 /* QuotesData.h in Headers */, >@@ -32850,7 +32843,6 @@ > AA12DF491743DF83004DAFDF /* PlatformSpeechSynthesizerIOS.mm in Sources */, > CDA29A301CBF74D400901CCF /* PlaybackSessionInterfaceAVKit.mm in Sources */, > CDA29A161CBDA56C00901CCF /* PlaybackSessionInterfaceMac.mm in Sources */, >- 2D92A79A2134AD7900F493FD /* QuickLookSoftLink.mm in Sources */, > 419242492127B93E00634FCF /* RealtimeOutgoingVideoSourceCocoa.mm in Sources */, > 316DCB8A1E7A6996001B5F87 /* RTCIceTransport.cpp in Sources */, > BC51156E12B1749C00C96754 /* ScrollAnimatorMac.mm in Sources */, >diff --git a/Source/WebCore/platform/ios/QuickLook.mm b/Source/WebCore/platform/ios/QuickLook.mm >index a0277f509b2..7bf91b2fadc 100644 >--- a/Source/WebCore/platform/ios/QuickLook.mm >+++ b/Source/WebCore/platform/ios/QuickLook.mm >@@ -32,19 +32,18 @@ > #import "PreviewConverter.h" > #import "ResourceRequest.h" > #import "SchemeRegistry.h" >+#import <pal/ios/QuickLookSoftLink.h> > #import <pal/spi/cocoa/NSFileManagerSPI.h> > #import <wtf/Lock.h> > #import <wtf/NeverDestroyed.h> > >-#import "QuickLookSoftLink.h" >- > namespace WebCore { > > const char* QLPreviewProtocol = "x-apple-ql-id"; > > NSSet *QLPreviewGetSupportedMIMETypesSet() > { >- static NSSet *set = [QLPreviewGetSupportedMIMETypes() retain]; >+ static NSSet *set = [PAL::softLink_QuickLook_QLPreviewGetSupportedMIMETypes() retain]; > return set; > } > >@@ -80,10 +79,10 @@ static void addQLPreviewConverterWithFileForURL(NSURL *url, id converter, NSStri > > RetainPtr<NSURLRequest> registerQLPreviewConverterIfNeeded(NSURL *url, NSString *mimeType, NSData *data) > { >- RetainPtr<NSString> updatedMIMEType = adoptNS(QLTypeCopyBestMimeTypeForURLAndMimeType(url, mimeType)); >+ RetainPtr<NSString> updatedMIMEType = adoptNS(PAL::softLink_QuickLook_QLTypeCopyBestMimeTypeForURLAndMimeType(url, mimeType)); > > if ([QLPreviewGetSupportedMIMETypesSet() containsObject:updatedMIMEType.get()]) { >- RetainPtr<NSString> uti = adoptNS(QLTypeCopyUTIForURLAndMimeType(url, updatedMIMEType.get())); >+ RetainPtr<NSString> uti = adoptNS(PAL::softLink_QuickLook_QLTypeCopyUTIForURLAndMimeType(url, updatedMIMEType.get())); > > auto converter = std::make_unique<PreviewConverter>(data, uti.get()); > ResourceRequest previewRequest = converter->previewRequest(); >diff --git a/Source/WebCore/platform/network/ios/PreviewConverter.mm b/Source/WebCore/platform/network/ios/PreviewConverter.mm >index fe59cf5f170..482aaab7589 100644 >--- a/Source/WebCore/platform/network/ios/PreviewConverter.mm >+++ b/Source/WebCore/platform/network/ios/PreviewConverter.mm >@@ -30,12 +30,8 @@ > > #import "ResourceRequest.h" > #import "ResourceResponse.h" >+#import <pal/ios/QuickLookSoftLink.h> > #import <pal/spi/ios/QuickLookSPI.h> >-#import <wtf/SoftLinking.h> >- >-SOFT_LINK_FRAMEWORK(QuickLook); >-SOFT_LINK_CLASS(QuickLook, QLPreviewConverter); >-SOFT_LINK_CONSTANT(QuickLook, kQLPreviewOptionPasswordKey, CFStringRef); > > namespace WebCore { > >@@ -44,16 +40,16 @@ static NSDictionary *optionsWithPassword(const String& password) > if (password.isNull()) > return nil; > >- return @{ (NSString *)getkQLPreviewOptionPasswordKey() : password }; >+ return @{ (NSString *)PAL::get_QuickLook_kQLPreviewOptionPasswordKey() : password }; > } > > PreviewConverter::PreviewConverter(id delegate, const ResourceResponse& response, const String& password) >- : m_platformConverter { adoptNS([allocQLPreviewConverterInstance() initWithConnection:nil delegate:delegate response:response.nsURLResponse() options:optionsWithPassword(password)]) } >+ : m_platformConverter { adoptNS([PAL::allocQLPreviewConverterInstance() initWithConnection:nil delegate:delegate response:response.nsURLResponse() options:optionsWithPassword(password)]) } > { > } > > PreviewConverter::PreviewConverter(NSData *data, const String& uti, const String& password) >- : m_platformConverter { adoptNS([allocQLPreviewConverterInstance() initWithData:data name:nil uti:uti options:optionsWithPassword(password)]) } >+ : m_platformConverter { adoptNS([PAL::allocQLPreviewConverterInstance() initWithData:data name:nil uti:uti options:optionsWithPassword(password)]) } > { > } > >diff --git a/Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm b/Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm >index 4dcace2e905..e77721f94d6 100644 >--- a/Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm >+++ b/Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm >@@ -34,8 +34,7 @@ > #import "QuickLook.h" > #import "UTIUtilities.h" > #import <MobileCoreServices/MobileCoreServices.h> >- >-#import "QuickLookSoftLink.h" >+#import <pal/ios/QuickLookSoftLink.h> > > namespace WebCore { > >@@ -82,7 +81,7 @@ void adjustMIMETypeIfNecessary(CFURLResponseRef cfResponse, bool isMainResourceL > // We filter the basic MIME types so that we don't do unnecessary work in standard browsing situations. > if (isMainResourceLoad && shouldUseQuickLookForMIMEType((NSString *)updatedMIMEType.get())) { > RetainPtr<CFStringRef> suggestedFilename = adoptCF(CFURLResponseCopySuggestedFilename(cfResponse)); >- RetainPtr<CFStringRef> quickLookMIMEType = adoptCF((CFStringRef)QLTypeCopyBestMimeTypeForFileNameAndMimeType((NSString *)suggestedFilename.get(), (NSString *)mimeType.get())); >+ RetainPtr<CFStringRef> quickLookMIMEType = adoptCF((CFStringRef)PAL::softLink_QuickLook_QLTypeCopyBestMimeTypeForFileNameAndMimeType((NSString *)suggestedFilename.get(), (NSString *)mimeType.get())); > if (!quickLookMIMEType) { > auto url = CFURLResponseGetURL(cfResponse); > if ([(NSURL *)url isFileURL]) { >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 5537af34adc..4187593a15c 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,23 @@ >+2019-01-21 David Kilzer <ddkilzer@apple.com> >+ >+ Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h} >+ <https://webkit.org/b/193654> >+ <rdar://problem/47430290> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ - Moves QuickLookSoftLink.{h,mm} to PAL. >+ - Adds soft-link to 3 classes to consolidate QuickLook.framework >+ soft-linking. >+ - Updates existing source to work with above changes. >+ >+ * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm: >+ (-[_WKPreviewControllerDataSource previewController:previewItemAtIndex:]): >+ (WebKit::SystemPreviewController::start): >+ * UIProcess/ios/WKSystemPreviewView.mm: >+ (-[WKSystemPreviewView web_setContentProviderData:suggestedFilename:]): >+ - Switch to using QuickLookSoftLink.{h,mm} in PAL. >+ > 2019-01-20 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed, fix -Wreturn-type warning >diff --git a/Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm b/Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm >index 98bdc27964a..31f2871de43 100644 >--- a/Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm >+++ b/Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -34,14 +34,10 @@ > #import <QuickLook/QuickLook.h> > #import <UIKit/UIViewController.h> > #import <WebCore/MIMETypeRegistry.h> >+#import <pal/ios/QuickLookSoftLink.h> > #import <pal/spi/ios/QuickLookSPI.h> >-#import <wtf/SoftLinking.h> > #import <wtf/WeakObjCPtr.h> > >-SOFT_LINK_FRAMEWORK(QuickLook) >-SOFT_LINK_CLASS(QuickLook, QLPreviewController); >-SOFT_LINK_CLASS(QuickLook, QLItem); >- > @interface _WKPreviewControllerDataSource : NSObject <QLPreviewControllerDataSource> { > RetainPtr<NSItemProvider> _itemProvider; > RetainPtr<QLItem> _item; >@@ -88,7 +84,7 @@ - (id<QLPreviewItem>)previewController:(QLPreviewController *)controller preview > // then we'll need a table. > static NSString *contentType = (__bridge NSString *) UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, CFSTR("usdz"), nil); > >- _item = adoptNS([allocQLItemInstance() initWithPreviewItemProvider:_itemProvider.get() contentType:contentType previewTitle:@"Preview" fileSize:@(0)]); >+ _item = adoptNS([PAL::allocQLItemInstance() initWithPreviewItemProvider:_itemProvider.get() contentType:contentType previewTitle:@"Preview" fileSize:@(0)]); > [_item setUseLoadingTimeout:NO]; > > WeakObjCPtr<_WKPreviewControllerDataSource> weakSelf { self }; >@@ -204,7 +200,7 @@ void SystemPreviewController::start(const String& mimeType, const WebCore::IntRe > if (!presentingViewController) > return; > >- m_qlPreviewController = adoptNS([allocQLPreviewControllerInstance() init]); >+ m_qlPreviewController = adoptNS([PAL::allocQLPreviewControllerInstance() init]); > > m_qlPreviewControllerDelegate = adoptNS([[_WKPreviewControllerDelegate alloc] initWithSystemPreviewController:this fromRect:fromRect]); > [m_qlPreviewController setDelegate:m_qlPreviewControllerDelegate.get()]; >diff --git a/Source/WebKit/UIProcess/ios/WKSystemPreviewView.mm b/Source/WebKit/UIProcess/ios/WKSystemPreviewView.mm >index 7d6c81e31bb..61fe5b719e4 100644 >--- a/Source/WebKit/UIProcess/ios/WKSystemPreviewView.mm >+++ b/Source/WebKit/UIProcess/ios/WKSystemPreviewView.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -36,15 +36,12 @@ > #import <WebCore/FloatRect.h> > #import <WebCore/LocalizedStrings.h> > #import <WebCore/MIMETypeRegistry.h> >+#import <pal/ios/QuickLookSoftLink.h> > #import <pal/spi/cg/CoreGraphicsSPI.h> > #import <pal/spi/ios/SystemPreviewSPI.h> > #import <wtf/RetainPtr.h> >-#import <wtf/SoftLinking.h> > #import <wtf/Vector.h> > >-SOFT_LINK_FRAMEWORK(QuickLook); >-SOFT_LINK_CLASS(QuickLook, QLItem); >- > SOFT_LINK_PRIVATE_FRAMEWORK(AssetViewer); > SOFT_LINK_CLASS(AssetViewer, ASVThumbnailView); > >@@ -105,7 +102,7 @@ - (void)web_setContentProviderData:(NSData *)data suggestedFilename:(NSString *) > > NSString *contentType = getUTIForSystemPreviewMIMEType(_mimeType.get()); > >- _item = adoptNS([allocQLItemInstance() initWithDataProvider:self contentType:contentType previewTitle:_suggestedFilename.get()]); >+ _item = adoptNS([PAL::allocQLItemInstance() initWithDataProvider:self contentType:contentType previewTitle:_suggestedFilename.get()]); > [_item setUseLoadingTimeout:NO]; > > _thumbnailView = adoptNS([allocASVThumbnailViewInstance() init]); >-- >2.20.1 (Apple Git-116) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193654
:
359693
|
359694
| 359696