Title: [285821] branches/safari-613.1.8-branch/Source/WebCore/PAL
Revision
285821
Author
[email protected]
Date
2021-11-15 12:15:25 -0800 (Mon, 15 Nov 2021)

Log Message

Cherry-pick r285811. rdar://problem/85422144

    Declare NSTextListMarker* as type NSTextListMarkerFormat when soft-linking
    https://bugs.webkit.org/show_bug.cgi?id=233064
    rdar://85341122

    Reviewed by Tim Horton.

    Followup to r285744. Avoid build errors due to defining these constants as a different type of symbol
    (NSString * vs. NSTextListMarkerFormat). To address this, we directly import `NSTextList.h` if it's available in
    the SDK; otherwise, fall back to defining NSTextListMarkerFormat. In both cases, we need to keep soft linking
    each of these constants, since WebCore cannot explicitly link against UIKit.

    * pal/spi/cocoa/NSAttributedStringSPI.h:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285811 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-613.1.8-branch/Source/WebCore/PAL/ChangeLog (285820 => 285821)


--- branches/safari-613.1.8-branch/Source/WebCore/PAL/ChangeLog	2021-11-15 20:15:22 UTC (rev 285820)
+++ branches/safari-613.1.8-branch/Source/WebCore/PAL/ChangeLog	2021-11-15 20:15:25 UTC (rev 285821)
@@ -1,5 +1,40 @@
 2021-11-15  Alan Coon  <[email protected]>
 
+        Cherry-pick r285811. rdar://problem/85422144
+
+    Declare NSTextListMarker* as type NSTextListMarkerFormat when soft-linking
+    https://bugs.webkit.org/show_bug.cgi?id=233064
+    rdar://85341122
+    
+    Reviewed by Tim Horton.
+    
+    Followup to r285744. Avoid build errors due to defining these constants as a different type of symbol
+    (NSString * vs. NSTextListMarkerFormat). To address this, we directly import `NSTextList.h` if it's available in
+    the SDK; otherwise, fall back to defining NSTextListMarkerFormat. In both cases, we need to keep soft linking
+    each of these constants, since WebCore cannot explicitly link against UIKit.
+    
+    * pal/spi/cocoa/NSAttributedStringSPI.h:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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
+
+            Reviewed by Tim Horton.
+
+            Followup to r285744. Avoid build errors due to defining these constants as a different type of symbol
+            (NSString * vs. NSTextListMarkerFormat). To address this, we directly import `NSTextList.h` if it's available in
+            the SDK; otherwise, fall back to defining NSTextListMarkerFormat. In both cases, we need to keep soft linking
+            each of these constants, since WebCore cannot explicitly link against UIKit.
+
+            * pal/spi/cocoa/NSAttributedStringSPI.h:
+
+2021-11-15  Alan Coon  <[email protected]>
+
         Cherry-pick r285744. rdar://problem/85422144
 
     Stop statically declaring various UIFoundation constants in NSAttributedStringSPI.h

Modified: branches/safari-613.1.8-branch/Source/WebCore/PAL/pal/spi/cocoa/NSAttributedStringSPI.h (285820 => 285821)


--- branches/safari-613.1.8-branch/Source/WebCore/PAL/pal/spi/cocoa/NSAttributedStringSPI.h	2021-11-15 20:15:22 UTC (rev 285820)
+++ branches/safari-613.1.8-branch/Source/WebCore/PAL/pal/spi/cocoa/NSAttributedStringSPI.h	2021-11-15 20:15:25 UTC (rev 285821)
@@ -95,31 +95,37 @@
 #define NSMarkedClauseSegmentAttributeName getNSMarkedClauseSegmentAttributeName()
 SOFT_LINK_CONSTANT(UIFoundation, NSTextAlternativesAttributeName, NSString *)
 #define NSTextAlternativesAttributeName getNSTextAlternativesAttributeName()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerCircle, NSString *)
+
+#if __has_include(<UIKit/NSTextList.h>)
+#import <UIKit/NSTextList.h>
+#else
+typedef NSString *NSTextListMarkerFormat;
+#endif
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerCircle, NSTextListMarkerFormat)
 #define NSTextListMarkerCircle getNSTextListMarkerCircle()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDisc, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDisc, NSTextListMarkerFormat)
 #define NSTextListMarkerDisc getNSTextListMarkerDisc()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerSquare, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerSquare, NSTextListMarkerFormat)
 #define NSTextListMarkerSquare getNSTextListMarkerSquare()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseHexadecimal, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseHexadecimal, NSTextListMarkerFormat)
 #define NSTextListMarkerLowercaseHexadecimal getNSTextListMarkerLowercaseHexadecimal()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseHexadecimal, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseHexadecimal, NSTextListMarkerFormat)
 #define NSTextListMarkerUppercaseHexadecimal getNSTextListMarkerUppercaseHexadecimal()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerOctal, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerOctal, NSTextListMarkerFormat)
 #define NSTextListMarkerOctal getNSTextListMarkerOctal()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseAlpha, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseAlpha, NSTextListMarkerFormat)
 #define NSTextListMarkerLowercaseAlpha getNSTextListMarkerLowercaseAlpha()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseAlpha, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseAlpha, NSTextListMarkerFormat)
 #define NSTextListMarkerUppercaseAlpha getNSTextListMarkerUppercaseAlpha()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseLatin, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseLatin, NSTextListMarkerFormat)
 #define NSTextListMarkerLowercaseLatin getNSTextListMarkerLowercaseLatin()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseLatin, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseLatin, NSTextListMarkerFormat)
 #define NSTextListMarkerUppercaseLatin getNSTextListMarkerUppercaseLatin()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseRoman, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseRoman, NSTextListMarkerFormat)
 #define NSTextListMarkerLowercaseRoman getNSTextListMarkerLowercaseRoman()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseRoman, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseRoman, NSTextListMarkerFormat)
 #define NSTextListMarkerUppercaseRoman getNSTextListMarkerUppercaseRoman()
-SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDecimal, NSString *)
+SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDecimal, NSTextListMarkerFormat)
 #define NSTextListMarkerDecimal getNSTextListMarkerDecimal()
 
 // We don't softlink NSSuperscriptAttributeName because UIFoundation stopped exporting it.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to