WebKit Bugzilla
Attachment 360124 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 v2
bug-193815-20190125104831.patch (text/plain), 33.42 KB, created by
David Kilzer (:ddkilzer)
on 2019-01-25 10:48:32 PST
(
hide
)
Description:
Patch v2
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2019-01-25 10:48:32 PST
Size:
33.42 KB
patch
obsolete
>Subversion Revision: 240444 >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index dfbc786068d3962e25f0c2697a1d07dde458a25c..2e07c98187d02131acf8280a9520b6450241ba54 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,24 @@ >+2019-01-25 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_CONSTANT_FOR_HEADER): >+ (SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT): >+ (SOFT_LINK_CONSTANT_MAY_FAIL_FOR_HEADER): >+ - Remove local declaration of constant. This should be handled >+ by including *SPI.h or "real" headers. >+ (SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT): >+ - Remove local declaration of constant. >+ - Rename from SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE() and add >+ `export` argument to support exporting of functions. >+ (SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE): >+ - Redefine in terms of >+ SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(). >+ > 2019-01-24 Youenn Fablet <youenn@apple.com> > > Use MonotonicTime in WorkerRunLoop >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 07430bdba832a1860e1ece720935bef3343d5b40..43067af0a51dcc03390504b6738b3894dd1f417b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,25 @@ >+2019-01-25 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}. >+ >+ * platform/ios/ValidationBubbleIOS.mm: >+ (WebCore::ValidationBubble::show): >+ - Update for changes to UIKitSoftLink.{h,mm} now that >+ UIAccessibilityAnnouncementNotification is using >+ SOFT_LINK_CONSTANT*(). >+ > 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..46e021c85d2054c1b39790609e5e90673332ae04 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,28 @@ >+2019-01-25 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/ios/UIKitSoftLink.h: >+ * pal/ios/UIKitSoftLink.mm: >+ - Change SOFT_LINK_VARIABLE_FOR_HEADER() to >+ SOFT_LINK_CONSTANT_FOR_HEADER() for >+ UIAccessibilityAnnouncementNotification constant. >+ >+ * 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..5460c1feb9eb572d6adae98ce6fd361e03e4cd1d 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,15 @@ >+2019-01-25 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..7cab1aa0ed96e51c6e53bf02049a41715ef483c6 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,16 @@ >+2019-01-25 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..c028cd3f665ec655ce5ca7861ddb575a8b8f9e14 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 >@@ -429,17 +429,11 @@ > SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT_AND_ASSERTION(functionNamespace, framework, className, , NO_ASSERT) > > #define SOFT_LINK_CONSTANT_FOR_HEADER(functionNamespace, framework, variableName, variableType) \ >- WTF_EXTERN_C_BEGIN \ >- extern const variableType variableName; \ >- WTF_EXTERN_C_END \ > namespace functionNamespace { \ > variableType get_##framework##_##variableName(); \ > } > > #define SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(functionNamespace, framework, variableName, variableType, export) \ >- WTF_EXTERN_C_BEGIN \ >- extern const variableType variableName; \ >- WTF_EXTERN_C_END \ > namespace functionNamespace { \ > export variableType get_##framework##_##variableName(); \ > variableType get_##framework##_##variableName() \ >@@ -459,19 +453,13 @@ > SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(functionNamespace, framework, variableName, variableType, ) > > #define SOFT_LINK_CONSTANT_MAY_FAIL_FOR_HEADER(functionNamespace, framework, variableName, variableType) \ >- WTF_EXTERN_C_BEGIN \ >- extern const variableType variableName; \ >- WTF_EXTERN_C_END \ > namespace functionNamespace { \ > bool canLoad_##framework##_##variableName(); \ > bool init_##framework##_##variableName(); \ > variableType get_##framework##_##variableName(); \ > } > >-#define SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(functionNamespace, framework, variableName, variableType) \ >- WTF_EXTERN_C_BEGIN \ >- extern const variableType variableName; \ >- WTF_EXTERN_C_END \ >+#define SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(functionNamespace, framework, variableName, variableType, export) \ > namespace functionNamespace { \ > static variableType constant##framework##variableName; \ > bool init_##framework##_##variableName(); \ >@@ -483,19 +471,22 @@ > constant##framework##variableName = *static_cast<variableType const *>(constant); \ > return true; \ > } \ >- bool canLoad_##framework##_##variableName(); \ >+ export bool canLoad_##framework##_##variableName(); \ > bool canLoad_##framework##_##variableName() \ > { \ > static bool loaded = init_##framework##_##variableName(); \ > return loaded; \ > } \ >- variableType get_##framework##_##variableName(); \ >+ export variableType get_##framework##_##variableName(); \ > variableType get_##framework##_##variableName() \ > { \ > return constant##framework##variableName; \ > } \ > } > >+#define SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(functionNamespace, framework, variableName, variableType) \ >+ SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(functionNamespace, framework, variableName, variableType, ) >+ > #define SOFT_LINK_FUNCTION_FOR_HEADER(functionNamespace, framework, functionName, resultType, parameterDeclarations, parameterNames) \ > WTF_EXTERN_C_BEGIN \ > resultType functionName parameterDeclarations; \ >diff --git a/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj b/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj >index d164a4c72adb8d5dc0d604de8b6d1e555c75215f..a65e91d6990e56e9755c8c5bb2768e0f98f5b540 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 = ( >@@ -693,6 +707,7 @@ > A30D41211F0DD0EA00B71954 /* KillRing.h in Headers */, > 0C5AF91C1F43A4C7002EAC02 /* LaunchServicesSPI.h in Headers */, > 1C4876D91F8D7F4E00CCEEBD /* Logging.h in Headers */, >+ 44E1A8AF21FA54E600C3048E /* LookupSoftLink.h in Headers */, > 0C77858B1F45130F00F4EBB6 /* LookupSPI.h in Headers */, > 0C2DA1481F3BEB4900DBC317 /* MachVMSPI.h in Headers */, > 0C5AF91D1F43A4C7002EAC02 /* MediaPlayerSPI.h in Headers */, >@@ -867,6 +882,7 @@ > A30D41221F0DD0EA00B71954 /* KillRing.cpp in Sources */, > A30D41251F0DD12D00B71954 /* KillRingMac.mm in Sources */, > 1C4876D81F8D7F4E00CCEEBD /* Logging.cpp in Sources */, >+ 44E1A8B021FA54EB00C3048E /* LookupSoftLink.mm in Sources */, > 0CF99CA41F736375007EE793 /* MediaTimeAVFoundation.cpp in Sources */, > A1F63CA021A4DBF7006FB43B /* PassKitSoftLink.mm in Sources */, > A1175B4F1F6B337300C4B9F0 /* PopupMenu.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/ios/UIKitSoftLink.h b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h >index 21f414b77bc6d37a908d61819e95e33f36dec94c..f933959e62b8cce53cf13309b8496dea7eb0c482 100644 >--- a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h >+++ b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h >@@ -34,6 +34,7 @@ > > SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, UIKit) > >+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIAccessibilityAnnouncementNotification, UIAccessibilityNotifications) > SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIApplicationWillResignActiveNotification, NSNotificationName) > SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIApplicationWillEnterForegroundNotification, NSNotificationName) > SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIApplicationDidBecomeActiveNotification, NSNotificationName) >@@ -63,6 +64,5 @@ SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsGrayscaleEnabled, BOO > SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ()) > SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsReduceMotionEnabled, BOOL, (void), ()) > SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityPostNotification, void, (UIAccessibilityNotifications n, id argument), (n, argument)) >-SOFT_LINK_VARIABLE_FOR_HEADER(PAL, UIKit, UIAccessibilityAnnouncementNotification, UIAccessibilityNotifications) > > #endif >diff --git a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm >index 143b8eb900f5cdec44e7fe249edcab6794f0c7c9..33715ccc9bcd55dde959e2871d8b956eebb7516a 100644 >--- a/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm >+++ b/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm >@@ -34,6 +34,7 @@ @class CUICatalog; > > SOFT_LINK_FRAMEWORK_FOR_SOURCE(PAL, UIKit) > >+SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIAccessibilityAnnouncementNotification, UIAccessibilityNotifications) > SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIApplicationWillResignActiveNotification, NSNotificationName) > SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIApplicationWillEnterForegroundNotification, NSNotificationName) > SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIApplicationDidBecomeActiveNotification, NSNotificationName) >@@ -63,6 +64,5 @@ SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, UIKit, UIAccessibilityIsGrayscaleEnabled, BOO > SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, UIKit, UIAccessibilityIsInvertColorsEnabled, BOOL, (void), ()) > SOFT_LINK_FUNCTION_FOR_SOURCE_WITH_EXPORT(PAL, UIKit, UIAccessibilityIsReduceMotionEnabled, BOOL, (void), (), PAL_EXPORT) > SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, UIKit, UIAccessibilityPostNotification, void, (UIAccessibilityNotifications n, id argument), (n, argument)) >-SOFT_LINK_VARIABLE_FOR_SOURCE(PAL, UIKit, UIAccessibilityAnnouncementNotification, UIAccessibilityNotifications) > > #endif >diff --git a/Source/WebCore/PAL/pal/mac/LookupSoftLink.h b/Source/WebCore/PAL/pal/mac/LookupSoftLink.h >new file mode 100644 >index 0000000000000000000000000000000000000000..a4cc7938fddd7a67a5f97e77d29c5b0a4a3a7bfe >--- /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_CONSTANT_MAY_FAIL_FOR_HEADER(PAL, Lookup, LUTermOptionDisableSearchTermIndicator, NSString *) >+ >+#if !ENABLE(REVEAL) >+SOFT_LINK_CONSTANT_MAY_FAIL_FOR_HEADER(PAL, Lookup, LUNotificationPopoverWillClose, NSString *) >+#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..1366e8a873302cda3a9d8b377963d15a7c475706 >--- /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_CONSTANT_MAY_FAIL_FOR_SOURCE(PAL, Lookup, LUTermOptionDisableSearchTermIndicator, NSString *) >+ >+#if !ENABLE(REVEAL) >+SOFT_LINK_CONSTANT_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/WebCore/platform/ios/ValidationBubbleIOS.mm b/Source/WebCore/platform/ios/ValidationBubbleIOS.mm >index a96d59ee35627eecad8866913f85212ea939bec8..9e562adc1a18b13e4a820978690e17414bdcb9a5 100644 >--- a/Source/WebCore/platform/ios/ValidationBubbleIOS.mm >+++ b/Source/WebCore/platform/ios/ValidationBubbleIOS.mm >@@ -135,7 +135,7 @@ void ValidationBubble::show() > [protectedThis->m_popoverController.get().view setAccessibilityElementsHidden:YES]; > }]; > >- PAL::softLinkUIKitUIAccessibilityPostNotification(*PAL::get_UIKit_UIAccessibilityAnnouncementNotification(), m_message); >+ PAL::softLinkUIKitUIAccessibilityPostNotification(PAL::get_UIKit_UIAccessibilityAnnouncementNotification(), m_message); > } > > static UIViewController *fallbackViewController(UIView *view) >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