Title: [240168] trunk
Revision
240168
Author
ddkil...@apple.com
Date
2019-01-18 12:41:58 -0800 (Fri, 18 Jan 2019)

Log Message

Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
<https://webkit.org/b/193568>
<rdar://problem/47381130>

Reviewed by Alex Christensen.

Source/WebCore:

This does the following:
- Removes local soft-linking of UIKit.
- Switches to using PAL functions for soft-linking.

* SourcesCocoa.txt: Add 4 source files to UnifiedSources.
* WebCore.xcodeproj/project.pbxproj: Remove 4 sources files
from WebCore target now that they are in UnifiedSources.
* editing/cocoa/DictionaryLookup.mm:
* editing/cocoa/HTMLConverter.mm: Move SPI to UIKitSPI.h. Remove
declarations in public headers.
(_fontForNameAndSize): Change use of getUIFontClass() to
PlatformFontClass.
(HTMLConverter::_processElement): Add cast here since compiler
finds the wrong selector for +clearColor and thinks it returns a
`CIColor *` object.  The same cast already exists in
VideoFullscreenInterfaceAVKit.mm.
* page/cocoa/SettingsBaseCocoa.mm:
(WebCore::SettingsBase::defaultTextAutosizingEnabled):
* platform/audio/ios/MediaSessionManagerIOS.mm:
(-[WebMediaSessionHelper initWithCallback:]):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::exernalDeviceDisplayNameForPlayer):
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::showLetterpressedGlyphsWithAdvances):
* platform/ios/DragImageIOS.mm:
(WebCore::scaleDragImage):
(WebCore::createDragImageFromImage):
(WebCore::cascadeForSystemFont):
(WebCore::createDragImageForLink):
(WebCore::createDragImageForSelection):
(WebCore::createDragImageForRange):
(WebCore::createDragImageForColor):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::PlatformPasteboard):
(WebCore::PlatformPasteboard::color):
(WebCore::registerItemToPasteboard):
(WebCore::PlatformPasteboard::setColor):
* platform/ios/ThemeIOS.mm:
(WebCore::ThemeIOS::userPrefersReducedMotion const):
* platform/ios/UserAgentIOS.mm:
(WebCore::isClassic):
(WebCore::isClassicPad):
(WebCore::isClassicPhone):
* platform/ios/ValidationBubbleIOS.mm:
(-[WebValidationBubbleTapRecognizer initWithPopoverController:]):
(WebCore::ValidationBubble::ValidationBubble):
(WebCore::ValidationBubble::show):
(WebCore::fallbackViewController):
* platform/ios/VideoFullscreenInterfaceAVKit.mm:
(clearUIColor):
(allocWebAVPictureInPicturePlayerLayerViewInstance):
(WebAVPlayerLayerView_videoView):
(fallbackViewController):
(VideoFullscreenInterfaceAVKit::doSetup):
* platform/ios/WebEvent.mm:
(+[WebEvent modifierFlags]):
* platform/ios/WebItemProviderPasteboard.mm:
(allLoadableClasses):
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(VideoFullscreenControllerContext::setUpFullscreen):
* platform/network/mac/WebCoreURLResponse.mm: Add missing header
after unified sources were updated.
* rendering/RenderThemeIOS.mm:
(WebCore::contentSizeCategoryDidChange):
(WebCore::RenderThemeIOS::RenderThemeIOS):
(WebCore::RenderThemeIOS::contentSizeCategory):
(WebCore::RenderThemeIOS::systemColor const):
(WebCore::attachmentActionColor):
(WebCore::attachmentTitleColor):
(WebCore::attachmentSubtitleColor):
(WebCore::iconForAttachment):
* testing/Internals.mm:
(WebCore::Internals::userPrefersReducedMotion const):

Source/WebCore/PAL:

* pal/ios/UIKitSoftLink.h:
* pal/ios/UIKitSoftLink.mm:
- Add constants, classes and functions that were previously
  soft-linked in separate source files.
- UIAccessibilityAnnouncementNotification is declared as a
  variable because this constant is not marked as `const` in
  UIKit.
* pal/spi/ios/UIKitSPI.h:
- Move SPI declarations from HTMLConverter.mm to here.

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
- Remove unused soft-linking macros.
(-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
(-[WebUITextIndicatorData initWithImage:scale:]):
- Update to use exported PAL functions.

Tools:

Make sure no one re-introduces UIKit soft-linking by adding a
style rule.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_language): Add softlink/uikit check.
(CppChecker): Enable softlink/uikit check.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest): Add test for softlink/uikit.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (240167 => 240168)


--- trunk/Source/WebCore/ChangeLog	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/ChangeLog	2019-01-18 20:41:58 UTC (rev 240168)
@@ -1,3 +1,85 @@
+2019-01-18  David Kilzer  <ddkil...@apple.com>
+
+        Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
+        <https://webkit.org/b/193568>
+        <rdar://problem/47381130>
+
+        Reviewed by Alex Christensen.
+
+        This does the following:
+        - Removes local soft-linking of UIKit.
+        - Switches to using PAL functions for soft-linking.
+
+        * SourcesCocoa.txt: Add 4 source files to UnifiedSources.
+        * WebCore.xcodeproj/project.pbxproj: Remove 4 sources files
+        from WebCore target now that they are in UnifiedSources.
+        * editing/cocoa/DictionaryLookup.mm:
+        * editing/cocoa/HTMLConverter.mm: Move SPI to UIKitSPI.h. Remove
+        declarations in public headers.
+        (_fontForNameAndSize): Change use of getUIFontClass() to
+        PlatformFontClass.
+        (HTMLConverter::_processElement): Add cast here since compiler
+        finds the wrong selector for +clearColor and thinks it returns a
+        `CIColor *` object.  The same cast already exists in
+        VideoFullscreenInterfaceAVKit.mm.
+        * page/cocoa/SettingsBaseCocoa.mm:
+        (WebCore::SettingsBase::defaultTextAutosizingEnabled):
+        * platform/audio/ios/MediaSessionManagerIOS.mm:
+        (-[WebMediaSessionHelper initWithCallback:]):
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::exernalDeviceDisplayNameForPlayer):
+        * platform/graphics/cocoa/FontCascadeCocoa.mm:
+        (WebCore::showLetterpressedGlyphsWithAdvances):
+        * platform/ios/DragImageIOS.mm:
+        (WebCore::scaleDragImage):
+        (WebCore::createDragImageFromImage):
+        (WebCore::cascadeForSystemFont):
+        (WebCore::createDragImageForLink):
+        (WebCore::createDragImageForSelection):
+        (WebCore::createDragImageForRange):
+        (WebCore::createDragImageForColor):
+        * platform/ios/PlatformPasteboardIOS.mm:
+        (WebCore::PlatformPasteboard::PlatformPasteboard):
+        (WebCore::PlatformPasteboard::color):
+        (WebCore::registerItemToPasteboard):
+        (WebCore::PlatformPasteboard::setColor):
+        * platform/ios/ThemeIOS.mm:
+        (WebCore::ThemeIOS::userPrefersReducedMotion const):
+        * platform/ios/UserAgentIOS.mm:
+        (WebCore::isClassic):
+        (WebCore::isClassicPad):
+        (WebCore::isClassicPhone):
+        * platform/ios/ValidationBubbleIOS.mm:
+        (-[WebValidationBubbleTapRecognizer initWithPopoverController:]):
+        (WebCore::ValidationBubble::ValidationBubble):
+        (WebCore::ValidationBubble::show):
+        (WebCore::fallbackViewController):
+        * platform/ios/VideoFullscreenInterfaceAVKit.mm:
+        (clearUIColor):
+        (allocWebAVPictureInPicturePlayerLayerViewInstance):
+        (WebAVPlayerLayerView_videoView):
+        (fallbackViewController):
+        (VideoFullscreenInterfaceAVKit::doSetup):
+        * platform/ios/WebEvent.mm:
+        (+[WebEvent modifierFlags]):
+        * platform/ios/WebItemProviderPasteboard.mm:
+        (allLoadableClasses):
+        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+        (VideoFullscreenControllerContext::setUpFullscreen):
+        * platform/network/mac/WebCoreURLResponse.mm: Add missing header
+        after unified sources were updated.
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::contentSizeCategoryDidChange):
+        (WebCore::RenderThemeIOS::RenderThemeIOS):
+        (WebCore::RenderThemeIOS::contentSizeCategory):
+        (WebCore::RenderThemeIOS::systemColor const):
+        (WebCore::attachmentActionColor):
+        (WebCore::attachmentTitleColor):
+        (WebCore::attachmentSubtitleColor):
+        (WebCore::iconForAttachment):
+        * testing/Internals.mm:
+        (WebCore::Internals::userPrefersReducedMotion const):
+
 2019-01-18  Antti Koivisto  <an...@apple.com>
 
         Implement asynchronous frame scrolling for iOS

Modified: trunk/Source/WebCore/PAL/ChangeLog (240167 => 240168)


--- trunk/Source/WebCore/PAL/ChangeLog	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/PAL/ChangeLog	2019-01-18 20:41:58 UTC (rev 240168)
@@ -1,3 +1,21 @@
+2019-01-18  David Kilzer  <ddkil...@apple.com>
+
+        Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
+        <https://webkit.org/b/193568>
+        <rdar://problem/47381130>
+
+        Reviewed by Alex Christensen.
+
+        * pal/ios/UIKitSoftLink.h:
+        * pal/ios/UIKitSoftLink.mm:
+        - Add constants, classes and functions that were previously
+          soft-linked in separate source files.
+        - UIAccessibilityAnnouncementNotification is declared as a
+          variable because this constant is not marked as `const` in
+          UIKit.
+        * pal/spi/ios/UIKitSPI.h:
+        - Move SPI declarations from HTMLConverter.mm to here.
+
 2019-01-17  Truitt Savell  <tsav...@apple.com>
 
         Unreviewed, rolling out r240124.

Modified: trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h (240167 => 240168)


--- trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.h	2019-01-18 20:41:58 UTC (rev 240168)
@@ -30,15 +30,39 @@
 #import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/SoftLinking.h>
 
+@class CUICatalog;
+
 SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, UIKit)
 
+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)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIApplicationDidEnterBackgroundNotification, NSNotificationName)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIContentSizeCategoryDidChangeNotification, NSNotificationName)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UIFontTextStyleCallout, UIFontTextStyle)
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, UIKit, UITextEffectsBeneathStatusBarWindowLevel, UIWindowLevel)
 SOFT_LINK_CLASS_FOR_HEADER(PAL, NSParagraphStyle)
 SOFT_LINK_CLASS_FOR_HEADER(PAL, NSShadow)
 SOFT_LINK_CLASS_FOR_HEADER(PAL, NSTextList)
 SOFT_LINK_CLASS_FOR_HEADER(PAL, UIApplication)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIColor)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIDevice)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIDocumentInteractionController)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIFont)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIGraphicsImageRenderer)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIImage)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UILabel)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIPasteboard)
 SOFT_LINK_CLASS_FOR_HEADER(PAL, UIScreen)
-SOFT_LINK_CLASS_FOR_HEADER(PAL, UIColor)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UITapGestureRecognizer)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIView)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIViewController)
+SOFT_LINK_CLASS_FOR_HEADER(PAL, UIWindow)
+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, _UIKitGetTextEffectsCatalog, CUICatalog *, (void), ())
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ())
 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

Modified: trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm (240167 => 240168)


--- trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/PAL/pal/ios/UIKitSoftLink.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -30,15 +30,39 @@
 #import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/SoftLinking.h>
 
+@class CUICatalog;
+
 SOFT_LINK_FRAMEWORK_FOR_SOURCE(PAL, UIKit)
 
+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)
+SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIApplicationDidEnterBackgroundNotification, NSNotificationName)
+SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIContentSizeCategoryDidChangeNotification, NSNotificationName)
+SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UIFontTextStyleCallout, UIFontTextStyle)
+SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, UIKit, UITextEffectsBeneathStatusBarWindowLevel, UIWindowLevel)
 SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, NSParagraphStyle)
 SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, NSShadow)
 SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, NSTextList)
 SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIApplication)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, UIKit, UIColor, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIDevice)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIDocumentInteractionController)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIFont)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIGraphicsImageRenderer)
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, UIKit, UIImage, PAL_EXPORT)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UILabel)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIPasteboard)
 SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIScreen)
-SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIColor)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UITapGestureRecognizer)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIView)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIViewController)
+SOFT_LINK_CLASS_FOR_SOURCE(PAL, UIKit, UIWindow)
+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, UIKit, _UIKitGetTextEffectsCatalog, CUICatalog *, (void), ())
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, UIKit, UIAccessibilityIsGrayscaleEnabled, BOOL, (void), ())
 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

Modified: trunk/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h (240167 => 240168)


--- trunk/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h	2019-01-18 20:41:58 UTC (rev 240168)
@@ -32,10 +32,12 @@
 #if USE(APPLE_INTERNAL_SDK)
 
 #import <UIKit/NSParagraphStyle_Private.h>
+#import <UIKit/NSTextAttachment_Private.h>
 #import <UIKit/NSTextList.h>
 #import <UIKit/UIApplicationSceneConstants.h>
 #import <UIKit/UIApplication_Private.h>
 #import <UIKit/UIColor_Private.h>
+#import <UIKit/UIFont_Private.h>
 #import <UIKit/UIInterface_Private.h>
 #import <UIKit/UIScreen_Private.h>
 #import <UIKit/UIViewController_Private.h>
@@ -66,6 +68,15 @@
     UIApplicationSceneClassicModeOriginalPad = 4,
 };
 
+typedef enum {
+    UIFontTraitPlain       = 0x00000000,
+    UIFontTraitItalic      = 0x00000001, // 1 << 0
+    UIFontTraitBold        = 0x00000002, // 1 << 1
+    UIFontTraitThin        = (1 << 2),
+    UIFontTraitLight       = (1 << 3),
+    UIFontTraitUltraLight  = (1 << 4)
+} UIFontTrait;
+
 @interface NSParagraphStyle ()
 - (NSArray *)textLists;
 @end
@@ -74,10 +85,15 @@
 - (void)setTextLists:(NSArray *)textLists;
 @end
 
+@interface NSTextAttachment ()
+- (id)initWithFileWrapper:(NSFileWrapper *)fileWrapper;
+@end
+
 @interface NSTextList : NSObject
 - (instancetype)initWithMarkerFormat:(NSString *)format options:(NSUInteger)mask;
 @property (readonly, copy) NSString *markerFormat;
 @property NSInteger startingItemNumber;
+- (NSString *)markerForItemNumber:(NSInteger)itemNum;
 @end
 
 @interface UIApplication ()
@@ -98,8 +114,16 @@
 
 + (UIColor *)_disambiguated_due_to_CIImage_colorWithCGColor:(CGColorRef)cgColor;
 
+- (CGFloat)alphaComponent;
+
 @end
 
+@interface UIFont ()
+
++ (UIFont *)fontWithFamilyName:(NSString *)familyName traits:(UIFontTrait)traits size:(CGFloat)fontSize;
+
+@end
+
 @interface UIScreen ()
 
 @property (nonatomic, readonly) CGRect _referenceBounds;

Modified: trunk/Source/WebCore/SourcesCocoa.txt (240167 => 240168)


--- trunk/Source/WebCore/SourcesCocoa.txt	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/SourcesCocoa.txt	2019-01-18 20:41:58 UTC (rev 240168)
@@ -416,15 +416,15 @@
 platform/ios/ScrollViewIOS.mm
 platform/ios/SelectionRect.cpp
 platform/ios/SystemMemoryIOS.cpp
-platform/ios/ThemeIOS.mm @no-unify
+platform/ios/ThemeIOS.mm
 platform/ios/TileControllerMemoryHandlerIOS.cpp
-platform/ios/UserAgentIOS.mm @no-unify
-platform/ios/ValidationBubbleIOS.mm @no-unify
+platform/ios/UserAgentIOS.mm
+platform/ios/ValidationBubbleIOS.mm
 platform/ios/VideoFullscreenInterfaceAVKit.mm @no-unify
 platform/ios/WebAVPlayerController.mm
 platform/ios/WebBackgroundTaskController.mm
 platform/ios/WebCoreMotionManager.mm
-platform/ios/WebEvent.mm @no-unify
+platform/ios/WebEvent.mm
 platform/ios/WebItemProviderPasteboard.mm @no-unify
 platform/ios/WebSQLiteDatabaseTrackerClient.mm
 platform/ios/WebVideoFullscreenControllerAVKit.mm

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (240167 => 240168)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2019-01-18 20:41:58 UTC (rev 240168)
@@ -809,7 +809,6 @@
 		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 */; };
-		2D92A79D2134AF9500F493FD /* UserAgentIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = A3AF9D8320325691006CAD06 /* UserAgentIOS.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 */; };
@@ -1229,7 +1228,6 @@
 		44A28AAF12DFB8BF00AE923B /* MathMLNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A28AAE12DFB8BF00AE923B /* MathMLNames.h */; };
 		44C991860F3D1EBE00586670 /* ScrollbarThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 44C991850F3D1EBE00586670 /* ScrollbarThemeIOS.h */; };
 		44C9919F0F3D210E00586670 /* ThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 44C9919D0F3D210E00586670 /* ThemeIOS.h */; };
-		44C991A00F3D210E00586670 /* ThemeIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 44C9919E0F3D210E00586670 /* ThemeIOS.mm */; };
 		44DAB5B215A623580097C1E4 /* Extensions3DOpenGLCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 44DAB5B015A623580097C1E4 /* Extensions3DOpenGLCommon.h */; };
 		450CEBF115073BBE002BB149 /* LabelableElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 450CEBEF15073BBE002BB149 /* LabelableElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		4512502315DCE37D002F84E2 /* SpinButtonElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4512502115DCE37D002F84E2 /* SpinButtonElement.h */; };
@@ -2437,7 +2435,6 @@
 		8379363F1FBBB0B400C8023C /* ServiceWorkerClientData.h in Headers */ = {isa = PBXBuildFile; fileRef = 8379363E1FBBB0A500C8023C /* ServiceWorkerClientData.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		837964CF1F8DB69D00218EA0 /* GeolocationPositionIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 837964CE1F8DB69A00218EA0 /* GeolocationPositionIOS.mm */; };
 		837A80131E1E127300026B9F /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 837A80111E1E127300026B9F /* Localizable.stringsdict */; };
-		837B7D201DC3F55000D051FC /* ValidationBubbleIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 837B7D1F1DC3F54C00D051FC /* ValidationBubbleIOS.mm */; };
 		837D46271FA2A8CE0054E1FA /* ServiceWorkerClientIdentifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 837D46251FA2A8C50054E1FA /* ServiceWorkerClientIdentifier.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		837FB3451F9EA06D00D0FC31 /* ExtendableMessageEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 837FB3401F9EA06600D0FC31 /* ExtendableMessageEvent.h */; };
 		8386A96D19F61B2E00E1EC4A /* StyleBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8386A96C19F61B2E00E1EC4A /* StyleBuilder.h */; };
@@ -4203,7 +4200,6 @@
 		CE08C3D2152B599A0021B8C2 /* AlternativeTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = CE08C3D0152B599A0021B8C2 /* AlternativeTextController.h */; settings = {ATTRIBUTES = (); }; };
 		CE1866451F72E5B400A0CAB6 /* MarkedText.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1866431F72E5B400A0CAB6 /* MarkedText.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CE2849871CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h in Headers */ = {isa = PBXBuildFile; fileRef = CE2849861CA360DF00B4A57F /* ContentSecurityPolicyDirectiveNames.h */; };
-		CE4ECCD6215AA81200558C41 /* WebEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = FE0D84EA1048436E001A179E /* WebEvent.mm */; };
 		CE5FA255209E48C50051D700 /* ContentSecurityPolicyClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CE5FA253209E48C50051D700 /* ContentSecurityPolicyClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CE6DADFA1C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = CE6DADF81C591E6A003F6A88 /* ContentSecurityPolicyResponseHeaders.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		CE799F981C6A46BC0097B518 /* ContentSecurityPolicySourceList.h in Headers */ = {isa = PBXBuildFile; fileRef = CE799F961C6A46BC0097B518 /* ContentSecurityPolicySourceList.h */; };
@@ -32833,7 +32829,6 @@
 				9759E94514EF1CF80026A2DD /* TextTrackCueList.cpp in Sources */,
 				076970861463AD8700F502CF /* TextTrackList.cpp in Sources */,
 				CD1E7347167BC78E009A885D /* TextTrackRepresentation.cpp in Sources */,
-				44C991A00F3D210E00586670 /* ThemeIOS.mm in Sources */,
 				51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
 				070334D9145A006F008D8D45 /* TrackBase.cpp in Sources */,
 				070334D31459FFAD008D8D45 /* TrackEvent.cpp in Sources */,
@@ -33431,12 +33426,10 @@
 				2D8B92FD203D13E1009C868F /* UnifiedSource528.cpp in Sources */,
 				2D8B92FE203D13E1009C868F /* UnifiedSource529.cpp in Sources */,
 				2D8B92FF203D13E1009C868F /* UnifiedSource530.cpp in Sources */,
-				2D92A79D2134AF9500F493FD /* UserAgentIOS.mm in Sources */,
 				532042021F9A9F1000B81B2A /* UserAgentScriptsData.cpp in Sources */,
 				7C3B79711908757B00B47A2D /* UserMessageHandler.cpp in Sources */,
 				7CE68344192143A800F4D928 /* UserMessageHandlerDescriptor.cpp in Sources */,
 				7C73FB07191EF417007DE061 /* UserMessageHandlersNamespace.cpp in Sources */,
-				837B7D201DC3F55000D051FC /* ValidationBubbleIOS.mm in Sources */,
 				3FBC4AF3189881560046EE38 /* VideoFullscreenInterfaceAVKit.mm in Sources */,
 				52D5A18F1C54592300DE34A3 /* VideoFullscreenLayerManagerObjC.mm in Sources */,
 				BE88E0DE1715D2A200658D98 /* VideoTrack.cpp in Sources */,
@@ -33458,7 +33451,6 @@
 				CD7E05221651C28200C1201F /* WebCoreAVFResourceLoader.mm in Sources */,
 				CD225C0B1C46FBF400140761 /* WebCoreNSURLSession.mm in Sources */,
 				93F19B0708245E59001E9ABC /* WebCoreView.m in Sources */,
-				CE4ECCD6215AA81200558C41 /* WebEvent.mm in Sources */,
 				D3F3D36D1A69B7DC0059FC2B /* WebGL2RenderingContext.cpp in Sources */,
 				49C7B9C81042D32F0009D447 /* WebGLBuffer.cpp in Sources */,
 				D08B00E220A282490004BC0A /* WebGLCompressedTextureASTC.cpp in Sources */,

Modified: trunk/Source/WebCore/editing/cocoa/DictionaryLookup.mm (240167 => 240168)


--- trunk/Source/WebCore/editing/cocoa/DictionaryLookup.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/editing/cocoa/DictionaryLookup.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -46,6 +46,7 @@
 #import "VisiblePosition.h"
 #import "VisibleSelection.h"
 #import "VisibleUnits.h"
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/cg/CoreGraphicsSPI.h>
 #import <pal/spi/cocoa/RevealSPI.h>
 #import <pal/spi/ios/UIKitSPI.h>
@@ -64,10 +65,6 @@
 SOFT_LINK_PRIVATE_FRAMEWORK(UIKitMacHelper)
 SOFT_LINK(UIKitMacHelper, UINSSharedRevealController, id<UINSRevealController>, (void), ())
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIApplication)
-
-
 #endif // PLATFORM(IOSMAC)
 
 #if PLATFORM(MAC)

Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (240167 => 240168)


--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -65,9 +65,10 @@
 #import "TextIterator.h"
 #import "VisibleSelection.h"
 #import <objc/runtime.h>
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/cocoa/NSAttributedStringSPI.h>
+#import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/ASCIICType.h>
-#import <wtf/SoftLinking.h>
 #import <wtf/text/StringBuilder.h>
 
 #if PLATFORM(IOS_FAMILY)
@@ -74,10 +75,6 @@
 
 #import "WAKAppKitStubs.h"
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIColor)
-
-SOFT_LINK_CLASS(UIFoundation, UIFont)
 SOFT_LINK_CLASS(UIFoundation, NSColor)
 SOFT_LINK_CLASS(UIFoundation, NSShadow)
 SOFT_LINK_CLASS(UIFoundation, NSTextAttachment)
@@ -97,10 +94,10 @@
 #define PlatformNSTextTable         getNSTextTableClass()
 #define PlatformNSTextTab           getNSTextTabClass()
 #define PlatformColor               UIColor
-#define PlatformColorClass          getUIColorClass()
+#define PlatformColorClass          PAL::getUIColorClass()
 #define PlatformNSColorClass        getNSColorClass()
 #define PlatformFont                UIFont
-#define PlatformFontClass           getUIFontClass()
+#define PlatformFontClass           PAL::getUIFontClass()
 
 #else
 
@@ -124,15 +121,6 @@
 
 #if PLATFORM(IOS_FAMILY)
 
-typedef enum {
-    UIFontTraitPlain       = 0x00000000,
-    UIFontTraitItalic      = 0x00000001, // 1 << 0
-    UIFontTraitBold        = 0x00000002, // 1 << 1
-    UIFontTraitThin        = (1 << 2),
-    UIFontTraitLight       = (1 << 3),
-    UIFontTraitUltraLight  = (1 << 4)
-} UIFontTrait;
-
 enum {
     NSTextBlockAbsoluteValueType    = 0,    // Absolute value in points
     NSTextBlockPercentageValueType  = 1     // Percentage value (out of 100)
@@ -170,20 +158,6 @@
 };
 typedef NSUInteger NSTextBlockVerticalAlignment;
 
-typedef NS_ENUM(NSInteger, NSTextAlignment) {
-    NSTextAlignmentLeft      = 0,    // Visually left aligned
-    NSTextAlignmentCenter    = 1,    // Visually centered
-    NSTextAlignmentRight     = 2,    // Visually right aligned
-    NSTextAlignmentJustified = 3,    // Fully-justified. The last line in a paragraph is natural-aligned.
-    NSTextAlignmentNatural   = 4,    // Indicates the default alignment for script
-} NS_ENUM_AVAILABLE_IOS(6_0);
-
-typedef NS_ENUM(NSInteger, NSWritingDirection) {
-    NSWritingDirectionNatural       = -1,    // Determines direction using the Unicode Bidi Algorithm rules P2 and P3
-    NSWritingDirectionLeftToRight   =  0,    // Left to right writing direction
-    NSWritingDirectionRightToLeft   =  1     // Right to left writing direction
-} NS_ENUM_AVAILABLE_IOS(6_0);
-
 enum {
     NSEnterCharacter                = 0x0003,
     NSBackspaceCharacter            = 0x0008,
@@ -195,7 +169,6 @@
     NSDeleteCharacter               = 0x007f,
     NSLineSeparatorCharacter        = 0x2028,
     NSParagraphSeparatorCharacter   = 0x2029,
-    NSAttachmentCharacter           = 0xFFFC // Replacement character is used for attachments
 };
 
 enum {
@@ -206,59 +179,19 @@
 };
 typedef NSUInteger NSTextTabType;
 
-@interface UIColor : NSObject
-+ (UIColor *)clearColor;
-- (CGFloat)alphaComponent;
-@end
-
 @interface NSColor : UIColor
 + (id)colorWithCalibratedRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;
 @end
 
-@interface UIFont
-+ (UIFont *)fontWithName:(NSString *)fontName size:(CGFloat)fontSize;
-+ (UIFont *)fontWithFamilyName:(NSString *)familyName traits:(UIFontTrait)traits size:(CGFloat)fontSize;
-- (NSString *)familyName;
-- (CGFloat)pointSize;
-- (UIFont *)fontWithSize:(CGFloat)fontSize;
-+ (NSArray *)familyNames;
-+ (NSArray *)fontNamesForFamilyName:(NSString *)familyName;
-+ (UIFont *)systemFontOfSize:(CGFloat)fontSize;
-@end
-
-@interface NSTextTab
+@interface NSTextTab ()
 - (id)initWithType:(NSTextTabType)type location:(CGFloat)loc;
-- (id)initWithTextAlignment:(NSTextAlignment)alignment location:(CGFloat)loc options:(NSDictionary *)options;
-- (CGFloat)location;
-- (void)release;
 @end
 
-@interface NSParagraphStyle : NSObject
-+ (NSParagraphStyle *)defaultParagraphStyle;
-- (void)setAlignment:(NSTextAlignment)alignment;
-- (void)setBaseWritingDirection:(NSWritingDirection)writingDirection;
-- (void)setHeadIndent:(CGFloat)aFloat;
-- (CGFloat)headIndent;
+@interface NSParagraphStyle ()
 - (void)setHeaderLevel:(NSInteger)level;
-- (void)setFirstLineHeadIndent:(CGFloat)aFloat;
-- (void)setTailIndent:(CGFloat)aFloat;
-- (void)setParagraphSpacing:(CGFloat)paragraphSpacing;
-- (void)setTextLists:(NSArray *)array;
 - (void)setTextBlocks:(NSArray *)array;
-- (void)setMinimumLineHeight:(CGFloat)aFloat;
-- (NSArray *)textLists;
-- (void)removeTabStop:(NSTextTab *)anObject;
-- (void)addTabStop:(NSTextTab *)anObject;
-- (NSArray *)tabStops;
-- (void)setHyphenationFactor:(float)aFactor;
 @end
 
-@interface NSShadow : NSObject
-- (void)setShadowOffset:(CGSize)size;
-- (void)setShadowBlurRadius:(CGFloat)radius;
-- (void)setShadowColor:(UIColor *)color;
-@end
-
 @interface NSTextBlock : NSObject
 - (void)setValue:(CGFloat)val type:(NSTextBlockValueType)type forDimension:(NSTextBlockDimension)dimension;
 - (void)setWidth:(CGFloat)val type:(NSTextBlockValueType)type forLayer:(NSTextBlockLayer)layer edge:(NSRectEdge)edge;
@@ -269,28 +202,6 @@
 - (void)setVerticalAlignment:(NSTextBlockVerticalAlignment)alignment;
 @end
 
-@interface NSTextList
-- (id)initWithMarkerFormat:(NSString *)format options:(NSUInteger)mask;
-- (void)setStartingItemNumber:(NSInteger)itemNum;
-- (NSInteger)startingItemNumber;
-- (NSString *)markerForItemNumber:(NSInteger)itemNum;
-- (void)release;
-@end
-
-@interface NSMutableParagraphStyle : NSParagraphStyle
-- (void)setDefaultTabInterval:(CGFloat)aFloat;
-- (void)setTabStops:(NSArray *)array;
-@end
-
-@interface NSTextAttachment : NSObject
-- (id)initWithFileWrapper:(NSFileWrapper *)fileWrapper;
-#if PLATFORM(IOS_FAMILY)
-- (void)setBounds:(CGRect)bounds;
-@property(retain, nonatomic) NSFileWrapper *fileWrapper;
-#endif
-- (void)release;
-@end
-
 @interface NSTextTable : NSTextBlock
 - (void)setNumberOfColumns:(NSUInteger)numCols;
 - (void)setCollapsesBorders:(BOOL)flag;
@@ -561,7 +472,7 @@
                     }
                 }
                 if (!font && [familyMemberFaceNames count])
-                    font = [getUIFontClass() fontWithName:familyName size:size];
+                    font = [PlatformFontClass fontWithName:familyName size:size];
 #else
                 NSArray *familyMemberArray;
                 NSString *faceName = [fontName substringFromIndex:(dividingRange.location + dividingRange.length)];
@@ -1866,7 +1777,7 @@
     } else if (displayValue == "table-row" && [_textTables count] > 0) {
         PlatformColor *color = _colorForElement(element, CSSPropertyBackgroundColor);
         if (!color)
-            color = [PlatformColorClass clearColor];
+            color = (PlatformColor *)[PlatformColorClass clearColor];
         [_textTableRowBackgroundColors addObject:color];
     } else if (displayValue == "table-cell") {
         while ([_textTables count] < [_textBlocks count] + 1)

Modified: trunk/Source/WebCore/page/cocoa/SettingsBaseCocoa.mm (240167 => 240168)


--- trunk/Source/WebCore/page/cocoa/SettingsBaseCocoa.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/page/cocoa/SettingsBaseCocoa.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -30,15 +30,10 @@
 
 #if PLATFORM(IOS_FAMILY)
 #include "Device.h"
+#include <pal/ios/UIKitSoftLink.h>
 #include <pal/spi/ios/UIKitSPI.h>
-#include <wtf/SoftLinking.h>
 #endif
 
-#if PLATFORM(IOS_FAMILY)
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIApplication)
-#endif
-
 namespace WebCore {
 
 static inline const char* sansSerifTraditionalHanFontFamily()
@@ -130,7 +125,7 @@
 
 bool SettingsBase::defaultTextAutosizingEnabled()
 {
-    return !deviceHasIPadCapability() || [[getUIApplicationClass() sharedApplication] _isClassic];
+    return !deviceHasIPadCapability() || [[PAL::getUIApplicationClass() sharedApplication] _isClassic];
 }
 
 #endif

Modified: trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -35,13 +35,13 @@
 #import "WebCoreThreadRun.h"
 #import <AVFoundation/AVAudioSession.h>
 #import <AVFoundation/AVRouteDetector.h>
-#import <UIKit/UIApplication.h>
 #import <objc/runtime.h>
+#import <pal/ios/UIKitSoftLink.h>
+#import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/BlockObjCExceptions.h>
 #import <wtf/MainThread.h>
 #import <wtf/RAMSize.h>
 #import <wtf/RetainPtr.h>
-#import <wtf/SoftLinking.h>
 
 SOFT_LINK_FRAMEWORK(AVFoundation)
 SOFT_LINK_CLASS(AVFoundation, AVAudioSession)
@@ -59,19 +59,6 @@
 #define AVAudioSessionInterruptionTypeKey getAVAudioSessionInterruptionTypeKey()
 #define AVAudioSessionInterruptionOptionKey getAVAudioSessionInterruptionOptionKey()
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIApplication)
-SOFT_LINK_CONSTANT(UIKit, UIApplicationWillResignActiveNotification, NSString *)
-SOFT_LINK_CONSTANT(UIKit, UIApplicationWillEnterForegroundNotification, NSString *)
-SOFT_LINK_CONSTANT(UIKit, UIApplicationDidBecomeActiveNotification, NSString *)
-SOFT_LINK_CONSTANT(UIKit, UIApplicationDidEnterBackgroundNotification, NSString *)
-
-#define UIApplication getUIApplicationClass()
-#define UIApplicationWillResignActiveNotification getUIApplicationWillResignActiveNotification()
-#define UIApplicationWillEnterForegroundNotification getUIApplicationWillEnterForegroundNotification()
-#define UIApplicationDidBecomeActiveNotification getUIApplicationDidBecomeActiveNotification()
-#define UIApplicationDidEnterBackgroundNotification getUIApplicationDidEnterBackgroundNotification()
-
 WEBCORE_EXPORT NSString* WebUIApplicationWillResignActiveNotification = @"WebUIApplicationWillResignActiveNotification";
 WEBCORE_EXPORT NSString* WebUIApplicationWillEnterForegroundNotification = @"WebUIApplicationWillEnterForegroundNotification";
 WEBCORE_EXPORT NSString* WebUIApplicationDidBecomeActiveNotification = @"WebUIApplicationDidBecomeActiveNotification";
@@ -207,19 +194,19 @@
     NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
     [center addObserver:self selector:@selector(interruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]];
 
-    [center addObserver:self selector:@selector(applicationWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];
+    [center addObserver:self selector:@selector(applicationWillEnterForeground:) name:PAL::get_UIKit_UIApplicationWillEnterForegroundNotification() object:nil];
     [center addObserver:self selector:@selector(applicationWillEnterForeground:) name:WebUIApplicationWillEnterForegroundNotification object:nil];
-    [center addObserver:self selector:@selector(applicationDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil];
+    [center addObserver:self selector:@selector(applicationDidBecomeActive:) name:PAL::get_UIKit_UIApplicationDidBecomeActiveNotification() object:nil];
     [center addObserver:self selector:@selector(applicationDidBecomeActive:) name:WebUIApplicationDidBecomeActiveNotification object:nil];
-    [center addObserver:self selector:@selector(applicationWillResignActive:) name:UIApplicationWillResignActiveNotification object:nil];
+    [center addObserver:self selector:@selector(applicationWillResignActive:) name:PAL::get_UIKit_UIApplicationWillResignActiveNotification() object:nil];
     [center addObserver:self selector:@selector(applicationWillResignActive:) name:WebUIApplicationWillResignActiveNotification object:nil];
-    [center addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
+    [center addObserver:self selector:@selector(applicationDidEnterBackground:) name:PAL::get_UIKit_UIApplicationDidEnterBackgroundNotification() object:nil];
     [center addObserver:self selector:@selector(applicationDidEnterBackground:) name:WebUIApplicationDidEnterBackgroundNotification object:nil];
 
     // Now playing won't work unless we turn on the delivery of remote control events.
     dispatch_async(dispatch_get_main_queue(), ^ {
         BEGIN_BLOCK_OBJC_EXCEPTIONS
-        [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
+        [[PAL::getUIApplicationClass() sharedApplication] beginReceivingRemoteControlEvents];
         END_BLOCK_OBJC_EXCEPTIONS
     });
 

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -103,6 +103,7 @@
 #import <CoreImage/CoreImage.h>
 #import <UIKit/UIDevice.h>
 #import <mach/mach_port.h>
+#import <pal/ios/UIKitSoftLink.h>
 #else
 #import <Foundation/NSGeometry.h>
 #import <QuartzCore/CoreImage.h>
@@ -315,10 +316,6 @@
 
 #endif // HAVE(CELESTIAL)
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIDevice)
-#define UIDevice getUIDeviceClass()
-
 #endif // PLATFORM(IOS_FAMILY)
 
 using namespace WebCore;
@@ -2889,7 +2886,7 @@
             break;
 
         // The route is a speaker or HDMI out, override the name to be the localized device model.
-        NSString *localizedDeviceModel = [[UIDevice currentDevice] localizedModel];
+        NSString *localizedDeviceModel = [[PAL::getUIDeviceClass() currentDevice] localizedModel];
 
         // In cases where a route with that name already exists, prefix the name with the model.
         BOOL includeLocalizedDeviceModelName = NO;

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -38,6 +38,7 @@
 #import <wtf/MathExtras.h>
 
 #if PLATFORM(IOS_FAMILY)
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/ios/CoreUISPI.h>
 #import <wtf/SoftLinking.h>
 
@@ -44,10 +45,6 @@
 SOFT_LINK_PRIVATE_FRAMEWORK(CoreUI)
 SOFT_LINK_CLASS(CoreUI, CUICatalog)
 SOFT_LINK_CLASS(CoreUI, CUIStyleEffectConfiguration)
-
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK(UIKit, _UIKitGetTextEffectsCatalog, CUICatalog *, (void), ())
-SOFT_LINK_CLASS(UIKit, UIColor)
 #endif
 
 #ifdef __LP64__
@@ -126,7 +123,7 @@
     CTFontRef ctFont = platformData.ctFont();
     CGContextSetFontSize(context, CTFontGetSize(ctFont));
 
-    static CUICatalog *catalog = _UIKitGetTextEffectsCatalog();
+    static CUICatalog *catalog = PAL::softLink_UIKit__UIKitGetTextEffectsCatalog();
     if (!catalog)
         return;
 

Modified: trunk/Source/WebCore/platform/ios/DragImageIOS.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/ios/DragImageIOS.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/ios/DragImageIOS.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -49,21 +49,9 @@
 #import <UIKit/UIFont.h>
 #import <UIKit/UIGraphicsImageRenderer.h>
 #import <UIKit/UIImage.h>
+#import <pal/ios/UIKitSoftLink.h>
 #import <wtf/NeverDestroyed.h>
-#import <wtf/SoftLinking.h>
 
-IGNORE_WARNINGS_BEGIN("nullability-completeness")
-
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIFont)
-SOFT_LINK_CLASS(UIKit, UIGraphicsImageRenderer)
-SOFT_LINK(UIKit, UIGraphicsBeginImageContextWithOptions, void, (CGSize size, BOOL opaque, CGFloat scale), (size, opaque, scale))
-SOFT_LINK(UIKit, UIGraphicsGetCurrentContext, CGContextRef, (void), ())
-SOFT_LINK(UIKit, UIGraphicsGetImageFromCurrentImageContext, UIImage *, (void), ())
-SOFT_LINK(UIKit, UIGraphicsEndImageContext, void, (void), ())
-
-IGNORE_WARNINGS_END
-
 namespace WebCore {
 
 #if ENABLE(DRAG_SUPPORT)
@@ -78,7 +66,7 @@
     CGSize imageSize = CGSizeMake(scale.width() * CGImageGetWidth(image.get()), scale.height() * CGImageGetHeight(image.get()));
     CGRect imageRect = { CGPointZero, imageSize };
 
-    RetainPtr<UIGraphicsImageRenderer> render = adoptNS([allocUIGraphicsImageRendererInstance() initWithSize:imageSize]);
+    RetainPtr<UIGraphicsImageRenderer> render = adoptNS([PAL::allocUIGraphicsImageRendererInstance() initWithSize:imageSize]);
     UIImage *imageCopy = [render.get() imageWithActions:^(UIGraphicsImageRendererContext *rendererContext) {
         CGContextRef context = rendererContext.CGContext;
         CGContextTranslateCTM(context, 0, imageSize.height);
@@ -103,7 +91,7 @@
         imageSize = adjustedSize;
     }
 
-    RetainPtr<UIGraphicsImageRenderer> render = adoptNS([allocUIGraphicsImageRendererInstance() initWithSize:imageSize]);
+    RetainPtr<UIGraphicsImageRenderer> render = adoptNS([PAL::allocUIGraphicsImageRendererInstance() initWithSize:imageSize]);
     UIImage *imageCopy = [render.get() imageWithActions:^(UIGraphicsImageRendererContext *rendererContext) {
         GraphicsContext context(rendererContext.CGContext);
         context.translate(0, imageSize.height);
@@ -123,7 +111,7 @@
 
 static FontCascade cascadeForSystemFont(CGFloat size)
 {
-    UIFont *font = [getUIFontClass() systemFontOfSize:size];
+    UIFont *font = [PAL::getUIFontClass() systemFontOfSize:size];
     return FontCascade(FontPlatformData(CTFontCreateWithName((CFStringRef)font.fontName, font.pointSize, nil), font.pointSize));
 }
 
@@ -149,7 +137,7 @@
 
     CGRect imageRect = CGRectMake(0, 0, textWidth + 2 * dragImagePadding, textHeight + 2 * dragImagePadding);
 
-    RetainPtr<UIGraphicsImageRenderer> render = adoptNS([allocUIGraphicsImageRendererInstance() initWithSize:imageRect.size]);
+    RetainPtr<UIGraphicsImageRenderer> render = adoptNS([PAL::allocUIGraphicsImageRendererInstance() initWithSize:imageRect.size]);
     UIImage *image = [render.get() imageWithActions:^(UIGraphicsImageRendererContext *rendererContext) {
         GraphicsContext context(rendererContext.CGContext);
         context.translate(0, CGRectGetHeight(imageRect));
@@ -205,7 +193,7 @@
         imageRect.scale(1 / page->deviceScaleFactor());
 
 
-    RetainPtr<UIGraphicsImageRenderer> render = adoptNS([allocUIGraphicsImageRendererInstance() initWithSize:imageRect.size()]);
+    RetainPtr<UIGraphicsImageRenderer> render = adoptNS([PAL::allocUIGraphicsImageRendererInstance() initWithSize:imageRect.size()]);
     UIImage *finalImage = [render.get() imageWithActions:^(UIGraphicsImageRendererContext *rendererContext) {
         GraphicsContext context(rendererContext.CGContext);
         // FIXME: The context flip here should not be necessary, and suggests that somewhere else in the regular
@@ -241,7 +229,7 @@
         return nil;
 
     auto& image = *textIndicator->contentImage();
-    auto render = adoptNS([allocUIGraphicsImageRendererInstance() initWithSize:image.size()]);
+    auto render = adoptNS([PAL::allocUIGraphicsImageRendererInstance() initWithSize:image.size()]);
     UIImage *finalImage = [render.get() imageWithActions:[&image](UIGraphicsImageRendererContext *rendererContext) {
         GraphicsContext context(rendererContext.CGContext);
         context.drawImage(image, FloatPoint());
@@ -255,7 +243,7 @@
     FloatRect imageRect { 0, 0, elementRect.width() * pageScaleFactor, elementRect.height() * pageScaleFactor };
     FloatRoundedRect swatch { imageRect, FloatRoundedRect::Radii(ColorSwatchCornerRadius * pageScaleFactor) };
 
-    auto render = adoptNS([allocUIGraphicsImageRendererInstance() initWithSize:imageRect.size()]);
+    auto render = adoptNS([PAL::allocUIGraphicsImageRendererInstance() initWithSize:imageRect.size()]);
     UIImage *image = [render imageWithActions:^(UIGraphicsImageRendererContext *rendererContext) {
         GraphicsContext context { rendererContext.CGContext };
         context.translate(0, CGRectGetHeight(imageRect));

Modified: trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -38,10 +38,10 @@
 #import <UIKit/UIColor.h>
 #import <UIKit/UIImage.h>
 #import <UIKit/UIPasteboard.h>
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/cocoa/NSKeyedArchiverSPI.h>
 #import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/ListHashSet.h>
-#import <wtf/SoftLinking.h>
 #import <wtf/URL.h>
 #import <wtf/cocoa/NSURLExtras.h>
 #import <wtf/text/StringHash.h>
@@ -50,15 +50,10 @@
 #define PASTEBOARD_SUPPORTS_PRESENTATION_STYLE_AND_TEAM_DATA (PASTEBOARD_SUPPORTS_ITEM_PROVIDERS && !PLATFORM(IOSMAC))
 #define NSURL_SUPPORTS_TITLE (!PLATFORM(IOSMAC))
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIColor)
-SOFT_LINK_CLASS(UIKit, UIImage)
-SOFT_LINK_CLASS(UIKit, UIPasteboard)
-
 namespace WebCore {
 
 PlatformPasteboard::PlatformPasteboard()
-    : m_pasteboard([getUIPasteboardClass() generalPasteboard])
+    : m_pasteboard([PAL::getUIPasteboardClass() generalPasteboard])
 {
 }
 
@@ -68,11 +63,11 @@
     if (name == "data interaction pasteboard")
         m_pasteboard = [WebItemProviderPasteboard sharedInstance];
     else
-        m_pasteboard = [getUIPasteboardClass() generalPasteboard];
+        m_pasteboard = [PAL::getUIPasteboardClass() generalPasteboard];
 }
 #else
 PlatformPasteboard::PlatformPasteboard(const String&)
-    : m_pasteboard([getUIPasteboardClass() generalPasteboard])
+    : m_pasteboard([PAL::getUIPasteboardClass() generalPasteboard])
 {
 }
 #endif
@@ -231,7 +226,7 @@
 Color PlatformPasteboard::color()
 {
     NSData *data = "" dataForPasteboardType:UIColorPboardType];
-    UIColor *uiColor = [NSKeyedUnarchiver unarchivedObjectOfClass:getUIColorClass() fromData:data error:nil];
+    UIColor *uiColor = [NSKeyedUnarchiver unarchivedObjectOfClass:PAL::getUIColorClass() fromData:data error:nil];
     return Color(uiColor.CGColor);
 }
 
@@ -303,7 +298,7 @@
 #if PLATFORM(IOSMAC)
     // In iOSMac, -[UIPasteboard setItemProviders:] is not yet supported, so we fall back to setting an item dictionary when
     // populating the pasteboard upon copy.
-    if ([pasteboard isKindOfClass:getUIPasteboardClass()]) {
+    if ([pasteboard isKindOfClass:PAL::getUIPasteboardClass()]) {
         auto itemDictionary = adoptNS([[NSMutableDictionary alloc] init]);
         [representationsToRegister enumerateItems:[itemDictionary] (id <WebItemProviderRegistrar> item, NSUInteger) {
             if ([item respondsToSelector:@selector(typeIdentifierForClient)] && [item respondsToSelector:@selector(dataForClient)])
@@ -326,7 +321,7 @@
 long PlatformPasteboard::setColor(const Color& color)
 {
     auto representationsToRegister = adoptNS([[WebItemProviderRegistrationInfoList alloc] init]);
-    UIColor *uiColor = [getUIColorClass() colorWithCGColor:cachedCGColor(color)];
+    UIColor *uiColor = [PAL::getUIColorClass() colorWithCGColor:cachedCGColor(color)];
     [representationsToRegister addData:[NSKeyedArchiver archivedDataWithRootObject:uiColor requiringSecureCoding:NO error:nil] forType:UIColorPboardType];
     registerItemToPasteboard(representationsToRegister.get(), m_pasteboard.get());
     return 0;

Modified: trunk/Source/WebCore/platform/ios/ThemeIOS.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/ios/ThemeIOS.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/ios/ThemeIOS.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -28,12 +28,9 @@
 
 #if PLATFORM(IOS_FAMILY)
 
+#import <pal/ios/UIKitSoftLink.h>
 #import <wtf/NeverDestroyed.h>
-#import <wtf/SoftLinking.h>
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK(UIKit, UIAccessibilityIsReduceMotionEnabled, BOOL, (void), ())
-
 using namespace std;
 
 namespace WebCore {
@@ -46,7 +43,7 @@
 
 bool ThemeIOS::userPrefersReducedMotion() const
 {
-    return UIAccessibilityIsReduceMotionEnabled();
+    return PAL::softLink_UIKit_UIAccessibilityIsReduceMotionEnabled();
 }
 
 }

Modified: trunk/Source/WebCore/platform/ios/UserAgentIOS.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/ios/UserAgentIOS.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/ios/UserAgentIOS.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -30,29 +30,26 @@
 
 #import "Device.h"
 #import "SystemVersion.h"
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/ios/MobileGestaltSPI.h>
 #import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/RetainPtr.h>
-#import <wtf/SoftLinking.h>
 
-SOFT_LINK_FRAMEWORK(UIKit);
-SOFT_LINK_CLASS(UIKit, UIApplication);
-
 namespace WebCore {
 
 static inline bool isClassic()
 {
-    return [[getUIApplicationClass() sharedApplication] _isClassic];
+    return [[PAL::getUIApplicationClass() sharedApplication] _isClassic];
 }
 
 static inline bool isClassicPad()
 {
-    return [getUIApplicationClass() _classicMode] == UIApplicationSceneClassicModeOriginalPad;
+    return [PAL::getUIApplicationClass() _classicMode] == UIApplicationSceneClassicModeOriginalPad;
 }
 
 static inline bool isClassicPhone()
 {
-    return isClassic() && [getUIApplicationClass() _classicMode] != UIApplicationSceneClassicModeOriginalPad;
+    return isClassic() && [PAL::getUIApplicationClass() _classicMode] != UIApplicationSceneClassicModeOriginalPad;
 }
 
 static inline NSString *osNameForUserAgent()

Modified: trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/ios/ValidationBubbleIOS.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -29,23 +29,12 @@
 
 #import "ValidationBubble.h"
 
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/SoftLinking.h>
 #import <wtf/text/WTFString.h>
 
-SOFT_LINK_FRAMEWORK(UIKit);
-SOFT_LINK_CLASS(UIKit, UIFont);
-SOFT_LINK_CLASS(UIKit, UILabel);
-SOFT_LINK_CLASS(UIKit, UIPopoverPresentationController);
-SOFT_LINK_CLASS(UIKit, UITapGestureRecognizer);
-SOFT_LINK_CLASS(UIKit, UIView);
-SOFT_LINK_CLASS(UIKit, UIViewController);
-SOFT_LINK_CONSTANT(UIKit, UIFontTextStyleCallout, UIFontTextStyle);
-SOFT_LINK_CONSTANT(UIKit, UIAccessibilityAnnouncementNotification, UIAccessibilityNotifications);
-#define UIAccessibilityPostNotification getUIAccessibilityPostNotification
-SOFT_LINK(UIKit, UIAccessibilityPostNotification, void, (UIAccessibilityNotifications n, id argument), (n, argument));
-
 @interface WebValidationBubbleTapRecognizer : NSObject
 @end
 
@@ -61,7 +50,7 @@
         return nil;
 
     _popoverController = popoverController;
-    _tapGestureRecognizer = adoptNS([allocUITapGestureRecognizerInstance() initWithTarget:self action:@selector(dismissPopover)]);
+    _tapGestureRecognizer = adoptNS([PAL::allocUITapGestureRecognizerInstance() initWithTarget:self action:@selector(dismissPopover)]);
     [[_popoverController view] addGestureRecognizer:_tapGestureRecognizer.get()];
 
     return self;
@@ -106,16 +95,16 @@
     : m_view(view)
     , m_message(message)
 {
-    m_popoverController = adoptNS([allocUIViewControllerInstance() init]);
+    m_popoverController = adoptNS([PAL::allocUIViewControllerInstance() init]);
     [m_popoverController setModalPresentationStyle:UIModalPresentationPopover];
 
-    RetainPtr<UIView> popoverView = adoptNS([allocUIViewInstance() initWithFrame:CGRectZero]);
+    RetainPtr<UIView> popoverView = adoptNS([PAL::allocUIViewInstance() initWithFrame:CGRectZero]);
     [m_popoverController setView:popoverView.get()];
     m_tapRecognizer = adoptNS([[WebValidationBubbleTapRecognizer alloc] initWithPopoverController:m_popoverController.get()]);
 
-    RetainPtr<UILabel> label = adoptNS([allocUILabelInstance() initWithFrame:CGRectZero]);
+    RetainPtr<UILabel> label = adoptNS([PAL::allocUILabelInstance() initWithFrame:CGRectZero]);
     [label setText:message];
-    [label setFont:[getUIFontClass() preferredFontForTextStyle:getUIFontTextStyleCallout()]];
+    [label setFont:[PAL::getUIFontClass() preferredFontForTextStyle:PAL::get_UIKit_UIFontTextStyleCallout()]];
     m_fontSize = [[label font] pointSize];
     [label setLineBreakMode:NSLineBreakByTruncatingTail];
     [label setNumberOfLines:4];
@@ -146,13 +135,13 @@
         [protectedThis->m_popoverController.get().view setAccessibilityElementsHidden:YES];
     }];
 
-    UIAccessibilityPostNotification(getUIAccessibilityAnnouncementNotification(), m_message);
+    PAL::softLinkUIKitUIAccessibilityPostNotification(*PAL::get_UIKit_UIAccessibilityAnnouncementNotification(), m_message);
 }
 
 static UIViewController *fallbackViewController(UIView *view)
 {
     for (UIView *currentView = view; currentView; currentView = currentView.superview) {
-        if (UIViewController *viewController = [getUIViewControllerClass() viewControllerForView:currentView])
+        if (UIViewController *viewController = [PAL::getUIViewControllerClass() viewControllerForView:currentView])
             return viewController;
     }
     NSLog(@"Failed to find a view controller to show form validation popover");

Modified: trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -43,6 +43,7 @@
 #import <UIKit/UIWindow.h>
 #import <objc/message.h>
 #import <objc/runtime.h>
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/cocoa/AVKitSPI.h>
 #import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/RetainPtr.h>
@@ -65,15 +66,6 @@
 SOFT_LINK_CLASS_OPTIONAL(AVKit, AVPlayerViewController)
 SOFT_LINK_CLASS_OPTIONAL(AVKit, __AVPlayerLayerView)
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIApplication)
-SOFT_LINK_CLASS(UIKit, UIScreen)
-SOFT_LINK_CLASS(UIKit, UIWindow)
-SOFT_LINK_CLASS(UIKit, UIView)
-SOFT_LINK_CLASS(UIKit, UIViewController)
-SOFT_LINK_CLASS(UIKit, UIColor)
-SOFT_LINK_CONSTANT(UIKit, UITextEffectsBeneathStatusBarWindowLevel, UIWindowLevel)
-
 @interface UIWindow ()
 - (BOOL)_isHostedInAnotherProcess;
 @end
@@ -84,7 +76,7 @@
 
 static UIColor *clearUIColor()
 {
-    return (UIColor *)[getUIColorClass() clearColor];
+    return (UIColor *)[PAL::getUIColorClass() clearColor];
 }
 
 #if !LOG_DISABLED
@@ -398,7 +390,7 @@
     static Class theClass = nil;
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
-        theClass = objc_allocateClassPair(getUIViewClass(), "WebAVPictureInPicturePlayerLayerView", 0);
+        theClass = objc_allocateClassPair(PAL::getUIViewClass(), "WebAVPictureInPicturePlayerLayerView", 0);
         objc_registerClassPair(theClass);
         Class metaClass = objc_getMetaClass("WebAVPictureInPicturePlayerLayerView");
         class_addMethod(metaClass, @selector(layerClass), (IMP)WebAVPictureInPicturePlayerLayerView_layerClass, "@@:");
@@ -450,7 +442,7 @@
     CALayer* videoLayer = [webAVPlayerLayer videoSublayer];
     if (!videoLayer || !videoLayer.delegate)
         return nil;
-    ASSERT([[videoLayer delegate] isKindOfClass:getUIViewClass()]);
+    ASSERT([[videoLayer delegate] isKindOfClass:PAL::getUIViewClass()]);
     return (UIView *)[videoLayer delegate];
 }
 
@@ -829,7 +821,7 @@
 static UIViewController *fallbackViewController(UIView *view)
 {
     for (UIView *currentView = view; currentView; currentView = currentView.superview) {
-        if (UIViewController *viewController = [getUIViewControllerClass() viewControllerForView:currentView]) {
+        if (UIViewController *viewController = [PAL::getUIViewControllerClass() viewControllerForView:currentView]) {
             if (![viewController parentViewController])
                 return viewController;
         }
@@ -1207,14 +1199,14 @@
 #if !PLATFORM(WATCHOS)
     if (![[m_parentView window] _isHostedInAnotherProcess] && !m_window) {
         if (!m_window)
-            m_window = adoptNS([allocUIWindowInstance() initWithFrame:[[getUIScreenClass() mainScreen] bounds]]);
+            m_window = adoptNS([PAL::allocUIWindowInstance() initWithFrame:[[PAL::getUIScreenClass() mainScreen] bounds]]);
         [m_window setBackgroundColor:clearUIColor()];
         if (!m_viewController)
-            m_viewController = adoptNS([allocUIViewControllerInstance() init]);
+            m_viewController = adoptNS([PAL::allocUIViewControllerInstance() init]);
         [[m_viewController view] setFrame:[m_window bounds]];
         [m_viewController _setIgnoreAppSupportedOrientations:YES];
         [m_window setRootViewController:m_viewController.get()];
-        [m_window setWindowLevel:getUITextEffectsBeneathStatusBarWindowLevel() + 1];
+        [m_window setWindowLevel:PAL::get_UIKit_UITextEffectsBeneathStatusBarWindowLevel() + 1];
         [m_window makeKeyAndVisible];
     }
 #endif

Modified: trunk/Source/WebCore/platform/ios/WebEvent.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/ios/WebEvent.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/ios/WebEvent.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -35,16 +35,11 @@
 
 #import "KeyEventCodesIOS.h"
 #import "WAKAppKitStubs.h"
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/cocoa/IOKitSPI.h>
 #import <pal/spi/ios/GraphicsServicesSPI.h>
 #import <pal/spi/ios/UIKitSPI.h>
-#import <wtf/SoftLinking.h>
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIApplication);
-
-#define UIApplication getUIApplicationClass()
-
 using WebCore::windowsKeyCodeForKeyCode;
 using WebCore::windowsKeyCodeForCharCode;
 
@@ -463,7 +458,7 @@
 
 + (WebEventFlags)modifierFlags
 {
-    return GSEventIsHardwareKeyboardAttached() ? GSKeyboardGetModifierState([UIApplication sharedApplication]._hardwareKeyboard) : 0;
+    return GSEventIsHardwareKeyboardAttached() ? GSKeyboardGetModifierState([PAL::getUIApplicationClass() sharedApplication]._hardwareKeyboard) : 0;
 }
 
 @end

Modified: trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -36,16 +36,12 @@
 #import <UIKit/UIImage.h>
 #import <WebCore/FileSystem.h>
 #import <WebCore/Pasteboard.h>
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/BlockPtr.h>
 #import <wtf/OSObjectPtr.h>
 #import <wtf/RetainPtr.h>
-#import <wtf/SoftLinking.h>
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIColor)
-SOFT_LINK_CLASS(UIKit, UIImage)
-
 typedef void(^ItemProviderDataLoadCompletionHandler)(NSData *, NSError *);
 typedef void(^ItemProviderFileLoadCompletionHandler)(NSURL *, BOOL, NSError *);
 typedef NSMutableDictionary<NSString *, NSURL *> TypeToFileURLMap;
@@ -579,7 +575,7 @@
 
 static NSArray<Class<NSItemProviderReading>> *allLoadableClasses()
 {
-    return @[ [getUIColorClass() class], [getUIImageClass() class], [NSURL class], [NSString class], [NSAttributedString class] ];
+    return @[ [PAL::getUIColorClass() class], [PAL::getUIImageClass() class], [NSURL class], [NSString class], [NSAttributedString class] ];
 }
 
 static Class classForTypeIdentifier(NSString *typeIdentifier, NSString *&outTypeIdentifierToLoad)

Modified: trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -43,12 +43,9 @@
 #import <WebCore/HTMLVideoElement.h>
 #import <WebCore/RenderVideo.h>
 #import <WebCore/WebCoreThreadRun.h>
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/cocoa/QuartzCoreSPI.h>
-#import <wtf/SoftLinking.h>
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIView)
-
 using namespace WebCore;
 
 #if !HAVE(AVKIT)
@@ -969,7 +966,7 @@
         m_interface->setVideoFullscreenModel(this);
         m_interface->setVideoFullscreenChangeObserver(this);
 
-        m_videoFullscreenView = adoptNS([allocUIViewInstance() init]);
+        m_videoFullscreenView = adoptNS([PAL::allocUIViewInstance() init]);
 
         m_interface->setupFullscreen(*m_videoFullscreenView.get(), videoElementClientRect, viewRef.get(), mode, allowsPictureInPicture, false);
     });

Modified: trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm (240167 => 240168)


--- trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/platform/network/mac/WebCoreURLResponse.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -30,6 +30,7 @@
 #import "WebCoreURLResponse.h"
 
 #import "MIMETypeRegistry.h"
+#import "ResourceResponse.h"
 #import "UTIUtilities.h"
 #import <pal/spi/cf/CFNetworkSPI.h>
 #import <wtf/Assertions.h>

Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (240167 => 240168)


--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -70,21 +70,13 @@
 #import <CoreGraphics/CoreGraphics.h>
 #import <CoreImage/CoreImage.h>
 #import <objc/runtime.h>
+#import <pal/ios/UIKitSoftLink.h>
 #import <pal/spi/cocoa/CoreTextSPI.h>
 #import <pal/spi/ios/UIKitSPI.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/RefPtr.h>
-#import <wtf/SoftLinking.h>
 #import <wtf/StdLibExtras.h>
 
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIApplication)
-SOFT_LINK_CLASS(UIKit, UIColor)
-SOFT_LINK_CLASS(UIKit, UIDocumentInteractionController)
-SOFT_LINK_CLASS(UIKit, UIImage)
-SOFT_LINK_CONSTANT(UIKit, UIContentSizeCategoryDidChangeNotification, CFStringRef)
-#define UIContentSizeCategoryDidChangeNotification getUIContentSizeCategoryDidChangeNotification()
-
 @interface WebCoreRenderThemeBundle : NSObject
 @end
 
@@ -286,7 +278,7 @@
 
 static void contentSizeCategoryDidChange(CFNotificationCenterRef, void*, CFStringRef name, const void*, CFDictionaryRef)
 {
-    ASSERT_UNUSED(name, CFEqual(name, UIContentSizeCategoryDidChangeNotification));
+    ASSERT_UNUSED(name, CFEqual(name, PAL::get_UIKit_UIContentSizeCategoryDidChangeNotification()));
     WebThreadRun(^{
         Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment();
     });
@@ -294,7 +286,7 @@
 
 RenderThemeIOS::RenderThemeIOS()
 {
-    CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, contentSizeCategoryDidChange, UIContentSizeCategoryDidChangeNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
+    CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, contentSizeCategoryDidChange, (__bridge CFStringRef)PAL::get_UIKit_UIContentSizeCategoryDidChangeNotification(), 0, CFNotificationSuspensionBehaviorDeliverImmediately);
 }
 
 RenderTheme& RenderTheme::singleton()
@@ -313,7 +305,7 @@
 {
     if (!_contentSizeCategory().isNull())
         return (__bridge CFStringRef)static_cast<NSString*>(_contentSizeCategory());
-    return (CFStringRef)[[getUIApplicationClass() sharedApplication] preferredContentSizeCategory];
+    return (CFStringRef)[[PAL::getUIApplicationClass() sharedApplication] preferredContentSizeCategory];
 }
 
 void RenderThemeIOS::setContentSizeCategory(const String& contentSizeCategory)
@@ -1436,28 +1428,28 @@
     Color color;
     switch (cssValueID) {
     case CSSValueAppleWirelessPlaybackTargetActive:
-        color = [getUIColorClass() systemBlueColor].CGColor;
+        color = [PAL::getUIColorClass() systemBlueColor].CGColor;
         break;
     case CSSValueAppleSystemBlue:
-        color = [getUIColorClass() systemBlueColor].CGColor;
+        color = [PAL::getUIColorClass() systemBlueColor].CGColor;
         break;
     case CSSValueAppleSystemGray:
-        color = [getUIColorClass() systemGrayColor].CGColor;
+        color = [PAL::getUIColorClass() systemGrayColor].CGColor;
         break;
     case CSSValueAppleSystemGreen:
-        color = [getUIColorClass() systemGreenColor].CGColor;
+        color = [PAL::getUIColorClass() systemGreenColor].CGColor;
         break;
     case CSSValueAppleSystemOrange:
-        color = [getUIColorClass() systemOrangeColor].CGColor;
+        color = [PAL::getUIColorClass() systemOrangeColor].CGColor;
         break;
     case CSSValueAppleSystemPink:
-        color = [getUIColorClass() systemPinkColor].CGColor;
+        color = [PAL::getUIColorClass() systemPinkColor].CGColor;
         break;
     case CSSValueAppleSystemRed:
-        color = [getUIColorClass() systemRedColor].CGColor;
+        color = [PAL::getUIColorClass() systemRedColor].CGColor;
         break;
     case CSSValueAppleSystemYellow:
-        color = [getUIColorClass() systemYellowColor].CGColor;
+        color = [PAL::getUIColorClass() systemYellowColor].CGColor;
         break;
     default:
         break;
@@ -1501,7 +1493,7 @@
 
 static UIColor *attachmentActionColor(const RenderAttachment& attachment)
 {
-    return [getUIColorClass() colorWithCGColor:cachedCGColor(attachment.style().visitedDependentColor(CSSPropertyColor))];
+    return [PAL::getUIColorClass() colorWithCGColor:cachedCGColor(attachment.style().visitedDependentColor(CSSPropertyColor))];
 }
 
 static RetainPtr<CTFontRef> attachmentTitleFont()
@@ -1510,10 +1502,10 @@
     return adoptCF(CTFontCreateWithFontDescriptor(fontDescriptor.get(), 0, nullptr));
 }
 
-static UIColor *attachmentTitleColor() { return [getUIColorClass() systemGrayColor]; }
+static UIColor *attachmentTitleColor() { return [PAL::getUIColorClass() systemGrayColor]; }
 
 static RetainPtr<CTFontRef> attachmentSubtitleFont() { return attachmentTitleFont(); }
-static UIColor *attachmentSubtitleColor() { return [getUIColorClass() systemGrayColor]; }
+static UIColor *attachmentSubtitleColor() { return [PAL::getUIColorClass() systemGrayColor]; }
 
 struct RenderAttachmentInfo {
     explicit RenderAttachmentInfo(const RenderAttachment&);
@@ -1635,7 +1627,7 @@
 
 static RetainPtr<UIImage> iconForAttachment(const RenderAttachment& attachment, FloatSize& size)
 {
-    auto documentInteractionController = adoptNS([allocUIDocumentInteractionControllerInstance() init]);
+    auto documentInteractionController = adoptNS([PAL::allocUIDocumentInteractionControllerInstance() init]);
 
     String fileName;
     if (File* file = attachment.attachmentElement().file())

Modified: trunk/Source/WebCore/testing/Internals.mm (240167 => 240168)


--- trunk/Source/WebCore/testing/Internals.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebCore/testing/Internals.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -32,14 +32,9 @@
 #import "EventHandler.h"
 #import "HitTestResult.h"
 #import "Range.h"
-#import <wtf/SoftLinking.h>
+#import <pal/ios/UIKitSoftLink.h>
 #import <wtf/cocoa/NSURLExtras.h>
 
-#if PLATFORM(IOS_FAMILY)
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK(UIKit, UIAccessibilityIsReduceMotionEnabled, BOOL, (void), ())
-#endif
-
 namespace WebCore {
 
 String Internals::userVisibleString(const DOMURL& url)
@@ -50,7 +45,7 @@
 bool Internals::userPrefersReducedMotion() const
 {
 #if PLATFORM(IOS_FAMILY)
-    return UIAccessibilityIsReduceMotionEnabled();
+    return PAL::softLink_UIKit_UIAccessibilityIsReduceMotionEnabled();
 #else
     return [[NSWorkspace sharedWorkspace] accessibilityDisplayShouldReduceMotion];
 #endif

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (240167 => 240168)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2019-01-18 20:41:58 UTC (rev 240168)
@@ -1,3 +1,17 @@
+2019-01-18  David Kilzer  <ddkil...@apple.com>
+
+        Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
+        <https://webkit.org/b/193568>
+        <rdar://problem/47381130>
+
+        Reviewed by Alex Christensen.
+
+        * WebView/WebView.mm:
+        - Remove unused soft-linking macros.
+        (-[WebUITextIndicatorData initWithImage:textIndicatorData:scale:]):
+        (-[WebUITextIndicatorData initWithImage:scale:]):
+        - Update to use exported PAL functions.
+
 2019-01-17  Truitt Savell  <tsav...@apple.com>
 
         Unreviewed, rolling out r240124.

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (240167 => 240168)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-01-18 20:41:58 UTC (rev 240168)
@@ -335,17 +335,9 @@
 #endif
 
 #if ENABLE(DATA_INTERACTION)
-#import <UIKit/UIBezierPath.h>
 #import <UIKit/UIColor.h>
 #import <UIKit/UIImage.h>
-SOFT_LINK_FRAMEWORK(UIKit)
-SOFT_LINK_CLASS(UIKit, UIBezierPath)
-SOFT_LINK_CLASS(UIKit, UIColor)
-SOFT_LINK_CLASS(UIKit, UIImage)
-SOFT_LINK(UIKit, UIGraphicsBeginImageContextWithOptions, void, (CGSize size, BOOL opaque, CGFloat scale), (size, opaque, scale))
-SOFT_LINK(UIKit, UIGraphicsGetCurrentContext, CGContextRef, (void), ())
-SOFT_LINK(UIKit, UIGraphicsGetImageFromCurrentImageContext, UIImage *, (void), ())
-SOFT_LINK(UIKit, UIGraphicsEndImageContext, void, (void), ())
+#import <pal/ios/UIKitSoftLink.h>
 #endif
 
 #if HAVE(TOUCH_BAR) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
@@ -701,7 +693,7 @@
     if (!(self = [super init]))
         return nil;
     
-    _dataInteractionImage = [allocUIImageInstance() initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored];
+    _dataInteractionImage = [PAL::allocUIImageInstance() initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored];
     _selectionRectInRootViewCoordinates = indicatorData.selectionRectInRootViewCoordinates;
     _textBoundingRectInRootViewCoordinates = indicatorData.textBoundingRectInRootViewCoordinates;
     
@@ -711,20 +703,20 @@
     _textRectsInBoundingRectCoordinates = [[NSArray arrayWithArray:textRectsInBoundingRectCoordinates] retain];
     _contentImageScaleFactor = indicatorData.contentImageScaleFactor;
     if (indicatorData.contentImageWithHighlight)
-        _contentImageWithHighlight = [allocUIImageInstance() initWithCGImage:indicatorData.contentImageWithHighlight.get()->nativeImage().get() scale:scale orientation:UIImageOrientationDownMirrored];
+        _contentImageWithHighlight = [PAL::allocUIImageInstance() initWithCGImage:indicatorData.contentImageWithHighlight.get()->nativeImage().get() scale:scale orientation:UIImageOrientationDownMirrored];
     if (indicatorData.contentImage)
-        _contentImage = [allocUIImageInstance() initWithCGImage:indicatorData.contentImage.get()->nativeImage().get() scale:scale orientation:UIImageOrientationUp];
+        _contentImage = [PAL::allocUIImageInstance() initWithCGImage:indicatorData.contentImage.get()->nativeImage().get() scale:scale orientation:UIImageOrientationUp];
 
     if (indicatorData.contentImageWithoutSelection) {
         auto nativeImage = indicatorData.contentImageWithoutSelection.get()->nativeImage();
         if (nativeImage) {
-            _contentImageWithoutSelection = [allocUIImageInstance() initWithCGImage:nativeImage.get() scale:scale orientation:UIImageOrientationUp];
+            _contentImageWithoutSelection = [PAL::allocUIImageInstance() initWithCGImage:nativeImage.get() scale:scale orientation:UIImageOrientationUp];
             _contentImageWithoutSelectionRectInRootViewCoordinates = indicatorData.contentImageWithoutSelectionRectInRootViewCoordinates;
         }
     }
 
     if (indicatorData.options & TextIndicatorOptionComputeEstimatedBackgroundColor)
-        _estimatedBackgroundColor = [allocUIColorInstance() initWithCGColor:cachedCGColor(indicatorData.estimatedBackgroundColor)];
+        _estimatedBackgroundColor = [PAL::allocUIColorInstance() initWithCGColor:cachedCGColor(indicatorData.estimatedBackgroundColor)];
 
     return self;
 }
@@ -734,7 +726,7 @@
     if (!(self = [super init]))
         return nil;
     
-    _dataInteractionImage = [allocUIImageInstance() initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored];
+    _dataInteractionImage = [PAL::allocUIImageInstance() initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored];
     
     return self;
 }

Modified: trunk/Tools/ChangeLog (240167 => 240168)


--- trunk/Tools/ChangeLog	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Tools/ChangeLog	2019-01-18 20:41:58 UTC (rev 240168)
@@ -1,3 +1,20 @@
+2019-01-18  David Kilzer  <ddkil...@apple.com>
+
+        Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
+        <https://webkit.org/b/193568>
+        <rdar://problem/47381130>
+
+        Reviewed by Alex Christensen.
+
+        Make sure no one re-introduces UIKit soft-linking by adding a
+        style rule.
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (check_language): Add softlink/uikit check.
+        (CppChecker): Enable softlink/uikit check.
+        * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+        (CppStyleTest): Add test for softlink/uikit.
+
 2019-01-18  Joanmarie Diggs  <jdi...@igalia.com>
 
         [GTK] install-dependencies tool looks for libunistring-dev for dnf

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (240167 => 240168)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2019-01-18 20:41:58 UTC (rev 240168)
@@ -3332,6 +3332,10 @@
                           'RetainPtr<> should never contain a type with \'*\'. Correct: RetainPtr<NSString>, RetainPtr<CFStringRef>.')
                 break
 
+    if search(r'^\s*SOFT_LINK_FRAMEWORK\(UIKit\)', line):
+        error(line_number, 'softlink/uikit', 5,
+              'Use #import <pal/ios/UIKitSoftLink.h> and update pal/ios/UIKitSoftLink.mm to soft-link to UIKit.framework.')
+
     # Check for suspicious usage of "if" like
     # } if (a == b) {
     if search(r'\}\s*if\s*\(', line):
@@ -4084,6 +4088,7 @@
         'security/assertion',
         'security/printf',
         'security/temp_file',
+        'softlink/uikit',
         'whitespace/blank_line',
         'whitespace/braces',
         'whitespace/brackets',

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (240167 => 240168)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2019-01-18 20:39:32 UTC (rev 240167)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py	2019-01-18 20:41:58 UTC (rev 240168)
@@ -1688,6 +1688,15 @@
             '  [runtime/retainptr] [5]')
         self.assert_lint('''RetainPtr<NSDictionary<NSString *, NSArray<NSString *>>> dictionary;''', '')
 
+    def test_softlink(self):
+        self.assert_lint(
+            '''SOFT_LINK_FRAMEWORK(AVFoundation)''',
+            '')
+        self.assert_lint(
+            '''SOFT_LINK_FRAMEWORK(UIKit)''',
+            'Use #import <pal/ios/UIKitSoftLink.h> and update pal/ios/UIKitSoftLink.mm to soft-link to UIKit.framework.'
+            '  [softlink/uikit] [5]')
+
     # Variable-length arrays are not permitted.
     def test_variable_length_array_detection(self):
         errmsg = ('Do not use variable-length arrays.  Use an appropriately named '
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to