Title: [285828] trunk/Source
Revision
285828
Author
[email protected]
Date
2021-11-15 13:40:08 -0800 (Mon, 15 Nov 2021)

Log Message

Unreviewed, fix the internal iOS 15 build

Source/WebCore/PAL:

In the internal iOS 15 SDK, <UIKit/NSTextList.h> does not define NSTextListMarkerFormat. Add a separate SDK
version check instead and only attempt to soft-link these constants if we're compiling against an SDK that we
know exports these symbols.

* pal/spi/cocoa/NSAttributedStringSPI.h:

Source/WTF:

Add a new compile-time flag.

* wtf/PlatformHave.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (285827 => 285828)


--- trunk/Source/WTF/ChangeLog	2021-11-15 21:18:03 UTC (rev 285827)
+++ trunk/Source/WTF/ChangeLog	2021-11-15 21:40:08 UTC (rev 285828)
@@ -1,3 +1,11 @@
+2021-11-15  Wenson Hsieh  <[email protected]>
+
+        Unreviewed, fix the internal iOS 15 build
+
+        Add a new compile-time flag.
+
+        * wtf/PlatformHave.h:
+
 2021-11-13  Simon Fraser  <[email protected]>
 
         Run a ScrollAnimationMomentum for the momentum phase of a scroll

Modified: trunk/Source/WTF/wtf/PlatformHave.h (285827 => 285828)


--- trunk/Source/WTF/wtf/PlatformHave.h	2021-11-15 21:18:03 UTC (rev 285827)
+++ trunk/Source/WTF/wtf/PlatformHave.h	2021-11-15 21:40:08 UTC (rev 285828)
@@ -1090,3 +1090,10 @@
     || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 80400)
 #define HAVE_AUDIOSESSION_PROCESSASSERTION 1
 #endif
+
+#if (PLATFORM(MAC) \
+    || ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000) \
+    || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 90000) \
+    || (PLATFORM(APPLETV) && __TV_OS_VERSION_MAX_ALLOWED >= 160000))
+#define HAVE_NSTEXTLIST_MARKER_FORMATS 1
+#endif

Modified: trunk/Source/WebCore/PAL/ChangeLog (285827 => 285828)


--- trunk/Source/WebCore/PAL/ChangeLog	2021-11-15 21:18:03 UTC (rev 285827)
+++ trunk/Source/WebCore/PAL/ChangeLog	2021-11-15 21:40:08 UTC (rev 285828)
@@ -1,5 +1,15 @@
 2021-11-15  Wenson Hsieh  <[email protected]>
 
+        Unreviewed, fix the internal iOS 15 build
+
+        In the internal iOS 15 SDK, <UIKit/NSTextList.h> does not define NSTextListMarkerFormat. Add a separate SDK
+        version check instead and only attempt to soft-link these constants if we're compiling against an SDK that we
+        know exports these symbols.
+
+        * pal/spi/cocoa/NSAttributedStringSPI.h:
+
+2021-11-15  Wenson Hsieh  <[email protected]>
+
         Declare NSTextListMarker* as type NSTextListMarkerFormat when soft-linking
         https://bugs.webkit.org/show_bug.cgi?id=233064
         rdar://85341122

Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAttributedStringSPI.h (285827 => 285828)


--- trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAttributedStringSPI.h	2021-11-15 21:18:03 UTC (rev 285827)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/NSAttributedStringSPI.h	2021-11-15 21:40:08 UTC (rev 285828)
@@ -96,11 +96,12 @@
 SOFT_LINK_CONSTANT(UIFoundation, NSTextAlternativesAttributeName, NSString *)
 #define NSTextAlternativesAttributeName getNSTextAlternativesAttributeName()
 
-#if __has_include(<UIKit/NSTextList.h>)
+#if HAVE(NSTEXTLIST_MARKER_FORMATS)
+#if USE(APPLE_INTERNAL_SDK)
 #import <UIKit/NSTextList.h>
 #else
 typedef NSString *NSTextListMarkerFormat;
-#endif
+#endif // USE(APPLE_INTERNAL_SDK)
 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerCircle, NSTextListMarkerFormat)
 #define NSTextListMarkerCircle getNSTextListMarkerCircle()
 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDisc, NSTextListMarkerFormat)
@@ -127,6 +128,22 @@
 #define NSTextListMarkerUppercaseRoman getNSTextListMarkerUppercaseRoman()
 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDecimal, NSTextListMarkerFormat)
 #define NSTextListMarkerDecimal getNSTextListMarkerDecimal()
+#else
+typedef NSString *NSTextListMarkerFormat;
+static NSTextListMarkerFormat const NSTextListMarkerCircle = @"{circle}";
+static NSTextListMarkerFormat const NSTextListMarkerDisc = @"{disc}";
+static NSTextListMarkerFormat const NSTextListMarkerSquare = @"{square}";
+static NSTextListMarkerFormat const NSTextListMarkerLowercaseHexadecimal = @"{lower-hexadecimal}";
+static NSTextListMarkerFormat const NSTextListMarkerUppercaseHexadecimal = @"{upper-hexadecimal}";
+static NSTextListMarkerFormat const NSTextListMarkerOctal = @"{octal}";
+static NSTextListMarkerFormat const NSTextListMarkerLowercaseAlpha = @"{lower-alpha}";
+static NSTextListMarkerFormat const NSTextListMarkerUppercaseAlpha = @"{upper-alpha}";
+static NSTextListMarkerFormat const NSTextListMarkerLowercaseLatin = @"{lower-latin}";
+static NSTextListMarkerFormat const NSTextListMarkerUppercaseLatin = @"{upper-latin}";
+static NSTextListMarkerFormat const NSTextListMarkerLowercaseRoman = @"{lower-roman}";
+static NSTextListMarkerFormat const NSTextListMarkerUppercaseRoman = @"{upper-roman}";
+static NSTextListMarkerFormat const NSTextListMarkerDecimal = @"{decimal}";
+#endif // HAVE(NSTEXTLIST_MARKER_FORMATS)
 
 // We don't softlink NSSuperscriptAttributeName because UIFoundation stopped exporting it.
 // This attribute is being deprecated at the API level, but internally UIFoundation
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to