WebKit Bugzilla
Attachment 360083 Details for
Bug 193815
: Move soft-linking of Lookup.framework out of LookupSPI.h
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-193815-20190124223827.patch (text/plain), 28.13 KB, created by
David Kilzer (:ddkilzer)
on 2019-01-24 22:38:28 PST
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2019-01-24 22:38:28 PST
Size:
28.13 KB
patch
obsolete
>Subversion Revision: 240444 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index dfbc786068d3962e25f0c2697a1d07dde458a25c..5dd1b4493c02d6ee03208e3b1ad2b472e2bc3539 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-24 David Kilzer <ddkilzer@apple.com> >+ >+ Move soft-linking of Lookup.framework out of LookupSPI.h >+ <https://webkit.org/b/193815> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/cocoa/SoftLinking.h: >+ (SOFT_LINK_VARIABLE_MAY_FAIL_FOR_HEADER): Add. >+ (SOFT_LINK_VARIABLE_MAY_FAIL_FOR_SOURCE_WITH_EXPORT): Add. >+ (SOFT_LINK_VARIABLE_MAY_FAIL_FOR_SOURCE): Add. >+ - Add macros used when soft-linking Lookup.framework. >+ > 2019-01-24 Youenn Fablet <youenn@apple.com> > > Use MonotonicTime in WorkerRunLoop >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 07430bdba832a1860e1ece720935bef3343d5b40..762fd04c8bf5edca65ee4bd5448b884febb83eef 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-01-24 David Kilzer <ddkilzer@apple.com> >+ >+ Move soft-linking of Lookup.framework out of LookupSPI.h >+ <https://webkit.org/b/193815> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * editing/cocoa/DictionaryLookup.mm: >+ - Remove unused header. >+ >+ * editing/mac/DictionaryLookupLegacy.mm: >+ (WebCore::tokenRange): >+ (WebCore::showPopupOrCreateAnimationController): >+ (WebCore::DictionaryLookup::hidePopup): >+ - Move soft-linking to LookupSoftLink.{h,mm}. >+ > 2019-01-24 John Wilander <wilander@apple.com> > > Add Ad Click Attribution as an internal/experimental feature >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index ea49060d585fb82e43f79c983066b4e1954963f1..e6b31a72ddc5430adc0dcb7930b808c4d106a2f8 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,22 @@ >+2019-01-24 David Kilzer <ddkilzer@apple.com> >+ >+ Move soft-linking of Lookup.framework out of LookupSPI.h >+ <https://webkit.org/b/193815> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * PAL.xcodeproj/project.pbxproj: >+ * pal/PlatformMac.cmake: >+ - Add LookupSoftLink.{h,mm} files to the project. >+ >+ * pal/mac/LookupSoftLink.h: Copied from Source/WebCore/PAL/pal/spi/mac/LookupSPI.h. >+ * pal/mac/LookupSoftLink.mm: Copied from Source/WebCore/PAL/pal/spi/mac/LookupSPI.h. >+ - Migrate soft-linking from LookupSPI.h to here. >+ >+ * pal/spi/mac/LookupSPI.h: >+ - Replace soft-linking of Lookup.framework with >+ LookupSoftLink.h. >+ > 2019-01-24 Ross Kirsling <ross.kirsling@sony.com> > > Move FileSystem to WTF >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 82dbac5f8f4d6f390cb1cd1b1e46ed3b90750791..ea7a4789a3b40415d540c48e54bedf35b0cea1df 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,15 @@ >+2019-01-24 David Kilzer <ddkilzer@apple.com> >+ >+ Move soft-linking of Lookup.framework out of LookupSPI.h >+ <https://webkit.org/b/193815> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (-[WKWindowVisibilityObserver dealloc]): >+ (-[WKWindowVisibilityObserver startObservingLookupDismissalIfNeeded]): >+ - Move soft-linking to LookupSoftLink.{h,mm}. >+ > 2019-01-24 John Wilander <wilander@apple.com> > > Add Ad Click Attribution as an internal/experimental feature >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index 247391ed51a2dd829af5a4d85af79c363260c933..4d7a40e04d1ccb625efcb85801cea79f4f72faa1 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-24 David Kilzer <ddkilzer@apple.com> >+ >+ Move soft-linking of Lookup.framework out of LookupSPI.h >+ <https://webkit.org/b/193815> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * WebView/WebImmediateActionController.mm: >+ (-[WebImmediateActionController _animationControllerForText]): >+ * WebView/WebView.mm: >+ (-[WebView _prepareForDictionaryLookup]): >+ - Move soft-linking to LookupSoftLink.{h,mm}. >+ > 2019-01-24 John Wilander <wilander@apple.com> > > Add Ad Click Attribution as an internal/experimental feature >diff --git a/Source/WTF/wtf/cocoa/SoftLinking.h b/Source/WTF/wtf/cocoa/SoftLinking.h >index 1afab5bf51f1d1900119da3ec6fae716af711900..0d2672cb67f17b408038da68ec2af392b95732d6 100644 >--- a/Source/WTF/wtf/cocoa/SoftLinking.h >+++ b/Source/WTF/wtf/cocoa/SoftLinking.h >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2007-2018 Apple Inc. All rights reserved. >+ * Copyright (C) 2007-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 >@@ -628,3 +628,47 @@ > return variable##framework##variableName; \ > } \ > } >+ >+#define SOFT_LINK_VARIABLE_MAY_FAIL_FOR_HEADER(functionNamespace, framework, variableName, variableType) \ >+ WTF_EXTERN_C_BEGIN \ >+ extern variableType variableName; \ >+ WTF_EXTERN_C_END \ >+ namespace functionNamespace { \ >+ bool canLoad_##framework##_##variableName(); \ >+ bool init_##framework##_##variableName(); \ >+ _Pragma("clang diagnostic push") \ >+ _Pragma("clang diagnostic ignored \"-Wignored-qualifiers\"") \ >+ variableType get_##framework##_##variableName(); \ >+ _Pragma("clang diagnostic pop") \ >+ } >+ >+#define SOFT_LINK_VARIABLE_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(functionNamespace, framework, variableName, variableType, export) \ >+ WTF_EXTERN_C_BEGIN \ >+ extern variableType variableName; \ >+ WTF_EXTERN_C_END \ >+ namespace functionNamespace { \ >+ static variableType constant##framework##variableName; \ >+ bool init_##framework##_##variableName(); \ >+ bool init_##framework##_##variableName() \ >+ { \ >+ void* constant = dlsym(framework##Library(), #variableName); \ >+ if (!constant) \ >+ return false; \ >+ constant##framework##variableName = *static_cast<variableType const *>(constant); \ >+ return true; \ >+ } \ >+ export bool canLoad_##framework##_##variableName(); \ >+ bool canLoad_##framework##_##variableName() \ >+ { \ >+ static bool loaded = init_##framework##_##variableName(); \ >+ return loaded; \ >+ } \ >+ export variableType get_##framework##_##variableName(); \ >+ variableType get_##framework##_##variableName() \ >+ { \ >+ return constant##framework##variableName; \ >+ } \ >+ } >+ >+#define SOFT_LINK_VARIABLE_MAY_FAIL_FOR_SOURCE(functionNamespace, framework, variableName, variableType) \ >+ SOFT_LINK_VARIABLE_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(functionNamespace, framework, variableName, variableType, ) >diff --git a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >index d164a4c72adb8d5dc0d604de8b6d1e555c75215f..c32e10f6c3720b66790b787f4e465e92f1ade3d9 100644 >--- a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >+++ b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >@@ -114,6 +114,8 @@ > 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 */; }; >+ 44E1A8AF21FA54E600C3048E /* LookupSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 44E1A8AD21FA54DA00C3048E /* LookupSoftLink.h */; }; >+ 44E1A8B021FA54EB00C3048E /* LookupSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 44E1A8AE21FA54DA00C3048E /* LookupSoftLink.mm */; }; > 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 */; }; >@@ -273,6 +275,8 @@ > 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>"; }; >+ 44E1A8AD21FA54DA00C3048E /* LookupSoftLink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LookupSoftLink.h; sourceTree = "<group>"; }; >+ 44E1A8AE21FA54DA00C3048E /* LookupSoftLink.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = LookupSoftLink.mm; 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>"; }; >@@ -517,6 +521,7 @@ > 1C4876DE1F8D831300CCEEBD /* cocoa */, > 1C09D0511E31C41200725F18 /* crypto */, > 2E87C06E215A993100D6CD32 /* ios */, >+ 44E1A8AC21FA548F00C3048E /* mac */, > 0C2DA0651F33CA3300DBC317 /* spi */, > A3788E9F1F05B7CE00679425 /* system */, > A30D411D1F0DD0AC00B71954 /* text */, >@@ -585,6 +590,15 @@ > path = ios; > sourceTree = "<group>"; > }; >+ 44E1A8AC21FA548F00C3048E /* mac */ = { >+ isa = PBXGroup; >+ children = ( >+ 44E1A8AD21FA54DA00C3048E /* LookupSoftLink.h */, >+ 44E1A8AE21FA54DA00C3048E /* LookupSoftLink.mm */, >+ ); >+ path = mac; >+ sourceTree = "<group>"; >+ }; > A30D411D1F0DD0AC00B71954 /* text */ = { > isa = PBXGroup; > children = ( >@@ -760,6 +774,7 @@ > A3AB6E611F3D1E39009C14B1 /* SleepDisablerCocoa.h in Headers */, > A3788E981F05B6CE00679425 /* Sound.h in Headers */, > A1175B491F6AFF8E00C4B9F0 /* SpeechSynthesisSPI.h in Headers */, >+ 44E1A8AF21FA54E600C3048E /* LookupSoftLink.h in Headers */, > 0C5AF9211F43A4C7002EAC02 /* SQLite3SPI.h in Headers */, > 31308B1420A21705003FB929 /* SystemPreviewSPI.h in Headers */, > A3AB6E581F3D1DDB009C14B1 /* SystemSleepListener.h in Headers */, >@@ -875,6 +890,7 @@ > A3AB6E521F3D1DC5009C14B1 /* SleepDisabler.cpp in Sources */, > A3AB6E601F3D1E39009C14B1 /* SleepDisablerCocoa.cpp in Sources */, > A3788E9C1F05B78200679425 /* Sound.cpp in Sources */, >+ 44E1A8B021FA54EB00C3048E /* LookupSoftLink.mm in Sources */, > A3788E9E1F05B78E00679425 /* SoundMac.mm in Sources */, > A3AB6E571F3D1DDB009C14B1 /* SystemSleepListener.cpp in Sources */, > A3AB6E651F3D217F009C14B1 /* SystemSleepListenerMac.mm in Sources */, >diff --git a/Source/WebCore/PAL/pal/PlatformMac.cmake b/Source/WebCore/PAL/pal/PlatformMac.cmake >index f13076843f88316bc38bd80da72f489a8237628c..130a7b73fa7ff4f1de2257b0de48019a460c9fe7 100644 >--- a/Source/WebCore/PAL/pal/PlatformMac.cmake >+++ b/Source/WebCore/PAL/pal/PlatformMac.cmake >@@ -5,6 +5,8 @@ list(APPEND PAL_PUBLIC_HEADERS > > cocoa/PassKitSoftLink.h > >+ mac/LookupSoftLink.h >+ > spi/cf/CFLocaleSPI.h > spi/cf/CFNetworkConnectionCacheSPI.h > spi/cf/CFNetworkSPI.h >@@ -107,6 +109,8 @@ list(APPEND PAL_SOURCES > > crypto/commoncrypto/CryptoDigestCommonCrypto.cpp > >+ mac/LookupSoftLink.mm >+ > system/cocoa/SleepDisablerCocoa.cpp > > system/mac/ClockCM.mm >diff --git a/Source/WebCore/PAL/pal/mac/LookupSoftLink.h b/Source/WebCore/PAL/pal/mac/LookupSoftLink.h >new file mode 100644 >index 0000000000000000000000000000000000000000..a7d0f9e31021cf6906cc42c830a7d247b2e11c44 >--- /dev/null >+++ b/Source/WebCore/PAL/pal/mac/LookupSoftLink.h >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2014-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 >+ * 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. ``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 >+ * 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. >+ */ >+ >+#if PLATFORM(MAC) >+ >+#import <wtf/SoftLinking.h> >+ >+SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, Lookup) >+SOFT_LINK_CLASS_FOR_HEADER(PAL, LULookupDefinitionModule) >+SOFT_LINK_VARIABLE_MAY_FAIL_FOR_HEADER(PAL, Lookup, LUTermOptionDisableSearchTermIndicator, NSString * const) >+ >+#if !ENABLE(REVEAL) >+SOFT_LINK_VARIABLE_MAY_FAIL_FOR_HEADER(PAL, Lookup, LUNotificationPopoverWillClose, NSString * const) >+#endif >+ >+#endif // PLATFORM(MAC) >diff --git a/Source/WebCore/PAL/pal/mac/LookupSoftLink.mm b/Source/WebCore/PAL/pal/mac/LookupSoftLink.mm >new file mode 100644 >index 0000000000000000000000000000000000000000..04a17e67660056fcb6ef5bef554109517127d264 >--- /dev/null >+++ b/Source/WebCore/PAL/pal/mac/LookupSoftLink.mm >@@ -0,0 +1,40 @@ >+/* >+ * Copyright (C) 2014-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 >+ * 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. ``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 >+ * 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" >+ >+#if PLATFORM(MAC) >+ >+#import <wtf/SoftLinking.h> >+ >+SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE(PAL, Lookup) >+SOFT_LINK_CLASS_FOR_SOURCE_OPTIONAL_WITH_EXPORT(PAL, Lookup, LULookupDefinitionModule, PAL_EXPORT) >+SOFT_LINK_VARIABLE_MAY_FAIL_FOR_SOURCE(PAL, Lookup, LUTermOptionDisableSearchTermIndicator, NSString *) >+ >+#if !ENABLE(REVEAL) >+SOFT_LINK_VARIABLE_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(PAL, Lookup, LUNotificationPopoverWillClose, NSString *, PAL_EXPORT) >+#endif >+ >+#endif // PLATFORM(MAC) >diff --git a/Source/WebCore/PAL/pal/spi/mac/LookupSPI.h b/Source/WebCore/PAL/pal/spi/mac/LookupSPI.h >index e0a3375d30cc889f135ea2a11d47d0da94f98a87..80aca806fd4efd585a29bd76ee8fc9719a00bfb8 100644 >--- a/Source/WebCore/PAL/pal/spi/mac/LookupSPI.h >+++ b/Source/WebCore/PAL/pal/spi/mac/LookupSPI.h >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2014 Apple Inc. All rights reserved. >+ * Copyright (C) 2014-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 >@@ -20,18 +20,14 @@ > * 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. >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >- > #if PLATFORM(MAC) > > #import <objc/runtime.h> >+#import <pal/mac/LookupSoftLink.h> > #import <pal/spi/mac/NSImmediateActionGestureRecognizerSPI.h> >-#import <wtf/SoftLinking.h> >- >-SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(Lookup) >-SOFT_LINK_CLASS_OPTIONAL(Lookup, LULookupDefinitionModule) > > #if USE(APPLE_INTERNAL_SDK) > >diff --git a/Source/WebCore/editing/cocoa/DictionaryLookup.mm b/Source/WebCore/editing/cocoa/DictionaryLookup.mm >index 3dba33023ac715565fcb2e30820f16869a265e66..ea28959f320c475d49cb73d8771ca084eb0bfd60 100644 >--- a/Source/WebCore/editing/cocoa/DictionaryLookup.mm >+++ b/Source/WebCore/editing/cocoa/DictionaryLookup.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2014-2018 Apple Inc. All rights reserved. >+ * Copyright (C) 2014-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 >@@ -50,7 +50,6 @@ > #import <pal/spi/cg/CoreGraphicsSPI.h> > #import <pal/spi/cocoa/RevealSPI.h> > #import <pal/spi/ios/UIKitSPI.h> >-#import <pal/spi/mac/LookupSPI.h> > #import <wtf/BlockObjCExceptions.h> > #import <wtf/RefPtr.h> > >diff --git a/Source/WebCore/editing/mac/DictionaryLookupLegacy.mm b/Source/WebCore/editing/mac/DictionaryLookupLegacy.mm >index 0fe3704b5d68d374de71818a3863c2a467833084..1615907d69110c685f77307318bb2a5571968a4e 100644 >--- a/Source/WebCore/editing/mac/DictionaryLookupLegacy.mm >+++ b/Source/WebCore/editing/mac/DictionaryLookupLegacy.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2014-2018 Apple Inc. All rights reserved. >+ * Copyright (C) 2014-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 >@@ -48,18 +48,16 @@ > #import <wtf/BlockObjCExceptions.h> > #import <wtf/RefPtr.h> > >-SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUTermOptionDisableSearchTermIndicator, NSString *) >- > namespace WebCore { > > static NSRange tokenRange(const String& string, NSRange range, NSDictionary **options) > { >- if (!getLULookupDefinitionModuleClass()) >+ if (!PAL::getLULookupDefinitionModuleClass()) > return NSMakeRange(NSNotFound, 0); > > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >- return [classLULookupDefinitionModule tokenRangeForString:string range:range options:options]; >+ return [PAL::getLULookupDefinitionModuleClass() tokenRangeForString:string range:range options:options]; > > END_BLOCK_OBJC_EXCEPTIONS; > >@@ -206,7 +204,7 @@ static id <NSImmediateActionAnimationController> showPopupOrCreateAnimationContr > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >- if (!getLULookupDefinitionModuleClass()) >+ if (!PAL::getLULookupDefinitionModuleClass()) > return nil; > > RetainPtr<NSMutableDictionary> mutableOptions = adoptNS([[NSMutableDictionary alloc] init]); >@@ -215,9 +213,9 @@ static id <NSImmediateActionAnimationController> showPopupOrCreateAnimationContr > > auto textIndicator = TextIndicator::create(dictionaryPopupInfo.textIndicator); > >- if (canLoadLUTermOptionDisableSearchTermIndicator() && textIndicator.get().contentImage()) { >+ if (PAL::canLoad_Lookup_LUTermOptionDisableSearchTermIndicator() && textIndicator.get().contentImage()) { > textIndicatorInstallationCallback(textIndicator.get()); >- [mutableOptions setObject:@YES forKey:getLUTermOptionDisableSearchTermIndicator()]; >+ [mutableOptions setObject:@YES forKey:PAL::get_Lookup_LUTermOptionDisableSearchTermIndicator()]; > > FloatRect firstTextRectInViewCoordinates = textIndicator.get().textRectsInBoundingRectCoordinates()[0]; > FloatRect textBoundingRectInViewCoordinates = textIndicator.get().textBoundingRectInRootViewCoordinates(); >@@ -225,9 +223,9 @@ static id <NSImmediateActionAnimationController> showPopupOrCreateAnimationContr > textBoundingRectInViewCoordinates = rootViewToViewConversionCallback(textBoundingRectInViewCoordinates); > firstTextRectInViewCoordinates.moveBy(textBoundingRectInViewCoordinates.location()); > if (createAnimationController) >- return [getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() relativeToRect:firstTextRectInViewCoordinates ofView:view options:mutableOptions.get()]; >+ return [PAL::getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() relativeToRect:firstTextRectInViewCoordinates ofView:view options:mutableOptions.get()]; > >- [getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.get() relativeToRect:firstTextRectInViewCoordinates ofView:view options:mutableOptions.get()]; >+ [PAL::getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.get() relativeToRect:firstTextRectInViewCoordinates ofView:view options:mutableOptions.get()]; > return nil; > } > >@@ -238,9 +236,9 @@ static id <NSImmediateActionAnimationController> showPopupOrCreateAnimationContr > textBaselineOrigin = [view.window convertRectToScreen:NSMakeRect(textBaselineOrigin.x, textBaselineOrigin.y, 0, 0)].origin; > > if (createAnimationController) >- return [getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()]; >+ return [PAL::getLULookupDefinitionModuleClass() lookupAnimationControllerForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()]; > >- [getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()]; >+ [PAL::getLULookupDefinitionModuleClass() showDefinitionForTerm:dictionaryPopupInfo.attributedString.get() atLocation:textBaselineOrigin options:mutableOptions.get()]; > return nil; > > END_BLOCK_OBJC_EXCEPTIONS; >@@ -258,9 +256,9 @@ void DictionaryLookup::hidePopup() > { > BEGIN_BLOCK_OBJC_EXCEPTIONS; > >- if (!getLULookupDefinitionModuleClass()) >+ if (!PAL::getLULookupDefinitionModuleClass()) > return; >- [getLULookupDefinitionModuleClass() hideDefinition]; >+ [PAL::getLULookupDefinitionModuleClass() hideDefinition]; > > END_BLOCK_OBJC_EXCEPTIONS; > } >diff --git a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >index 463d3b122b60792a0b970a423c3fae414884584a..c8a9c1ef7248098aa1c8bb77d865063b26797c08 100644 >--- a/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >+++ b/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2015-2018 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 >@@ -135,10 +135,6 @@ SOFT_LINK_CLASS(AVKit, AVFunctionBarScrubber) > static NSString * const WKMediaExitFullScreenItem = @"WKMediaExitFullScreenItem"; > #endif // HAVE(TOUCH_BAR) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER) > >-#if PLATFORM(MAC) && !ENABLE(REVEAL) >-SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUNotificationPopoverWillClose, NSString *) >-#endif // ENABLE(REVEAL) >- > WTF_DECLARE_CF_TYPE_TRAIT(CGImage); > > @interface NSApplication () >@@ -233,8 +229,8 @@ - (instancetype)initWithView:(NSView *)view impl:(WebKit::WebViewImpl&)impl > - (void)dealloc > { > #if !ENABLE(REVEAL) >- if (_didRegisterForLookupPopoverCloseNotifications && canLoadLUNotificationPopoverWillClose()) >- [[NSNotificationCenter defaultCenter] removeObserver:self name:getLUNotificationPopoverWillClose() object:nil]; >+ if (_didRegisterForLookupPopoverCloseNotifications && PAL::canLoad_Lookup_LUNotificationPopoverWillClose()) >+ [[NSNotificationCenter defaultCenter] removeObserver:self name:PAL::get_Lookup_LUNotificationPopoverWillClose() object:nil]; > #endif // !ENABLE(REVEAL) > > NSNotificationCenter *workspaceNotificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter]; >@@ -310,8 +306,8 @@ - (void)startObservingLookupDismissalIfNeeded > > _didRegisterForLookupPopoverCloseNotifications = YES; > #if !ENABLE(REVEAL) >- if (canLoadLUNotificationPopoverWillClose()) >- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil]; >+ if (PAL::canLoad_Lookup_LUNotificationPopoverWillClose()) >+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:PAL::get_Lookup_LUNotificationPopoverWillClose() object:nil]; > #endif > } > >diff --git a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm >index f514b84054c21a9373bde7f5b9a401d8defb3415..281a1e9365ab42b9577d196db28a248776619291 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2014 Apple Inc. All rights reserved. >+ * Copyright (C) 2014-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 >@@ -547,7 +547,7 @@ + (DictionaryPopupInfo)_dictionaryPopupInfoForRange:(Range&)range inFrame:(Frame > > - (id<NSImmediateActionAnimationController>)_animationControllerForText > { >- if (!getLULookupDefinitionModuleClass()) >+ if (!PAL::getLULookupDefinitionModuleClass()) > return nil; > > Node* node = _hitTestResult.innerNode(); >diff --git a/Source/WebKitLegacy/mac/WebView/WebView.mm b/Source/WebKitLegacy/mac/WebView/WebView.mm >index 7c5092e627877e6f9712313a35f34bc55a9db81f..b1c17e71d773c67b97af5231fb0a94974cf6269d 100644 >--- a/Source/WebKitLegacy/mac/WebView/WebView.mm >+++ b/Source/WebKitLegacy/mac/WebView/WebView.mm >@@ -1,5 +1,5 @@ > /* >- * Copyright (C) 2005-2018 Apple Inc. All rights reserved. >+ * Copyright (C) 2005-2019 Apple Inc. All rights reserved. > * Copyright (C) 2006 David Smith (catfish.man@gmail.com) > * Copyright (C) 2010 Igalia S.L > * >@@ -352,10 +352,6 @@ SOFT_LINK_CLASS(AVKit, AVFunctionBarScrubber) > #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 > #endif // HAVE(TOUCH_BAR) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER) > >-#if PLATFORM(MAC) && !ENABLE(REVEAL) >-SOFT_LINK_CONSTANT_MAY_FAIL(Lookup, LUNotificationPopoverWillClose, NSString *) >-#endif >- > #if !PLATFORM(IOS_FAMILY) > > @interface NSSpellChecker (WebNSSpellCheckerDetails) >@@ -9618,8 +9614,8 @@ - (void)_prepareForDictionaryLookup > _private->hasInitializedLookupObserver = YES; > > #if !ENABLE(REVEAL) >- if (canLoadLUNotificationPopoverWillClose()) >- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:getLUNotificationPopoverWillClose() object:nil]; >+ if (PAL::canLoad_Lookup_LUNotificationPopoverWillClose()) >+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:PAL::get_Lookup_LUNotificationPopoverWillClose() object:nil]; > #endif // !ENABLE(REVEAL) > > }
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 193815
:
360083
|
360124