⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 285844 in webkit


Ignore:
Timestamp:
Nov 15, 2021, 5:42:16 PM (5 years ago)
Author:
Russell Epstein
Message:

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

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

Location:
branches/safari-613.1.9-branch/Source/WebCore/PAL
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613.1.9-branch/Source/WebCore/PAL/ChangeLog

    r285786 r285844  
     12021-11-15  Russell Epstein  <repstein@apple.com>
     2
     3        Cherry-pick r285811. rdar://problem/85341122
     4
     5    Declare NSTextListMarker* as type NSTextListMarkerFormat when soft-linking
     6    https://bugs.webkit.org/show_bug.cgi?id=233064
     7    rdar://85341122
     8   
     9    Reviewed by Tim Horton.
     10   
     11    Followup to r285744. Avoid build errors due to defining these constants as a different type of symbol
     12    (NSString * vs. NSTextListMarkerFormat). To address this, we directly import `NSTextList.h` if it's available in
     13    the SDK; otherwise, fall back to defining NSTextListMarkerFormat. In both cases, we need to keep soft linking
     14    each of these constants, since WebCore cannot explicitly link against UIKit.
     15   
     16    * pal/spi/cocoa/NSAttributedStringSPI.h:
     17   
     18   
     19    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     20
     21    2021-11-15  Wenson Hsieh  <wenson_hsieh@apple.com>
     22
     23            Declare NSTextListMarker* as type NSTextListMarkerFormat when soft-linking
     24            https://bugs.webkit.org/show_bug.cgi?id=233064
     25            rdar://85341122
     26
     27            Reviewed by Tim Horton.
     28
     29            Followup to r285744. Avoid build errors due to defining these constants as a different type of symbol
     30            (NSString * vs. NSTextListMarkerFormat). To address this, we directly import `NSTextList.h` if it's available in
     31            the SDK; otherwise, fall back to defining NSTextListMarkerFormat. In both cases, we need to keep soft linking
     32            each of these constants, since WebCore cannot explicitly link against UIKit.
     33
     34            * pal/spi/cocoa/NSAttributedStringSPI.h:
     35
    1362021-11-13  Tim Horton  <timothy_horton@apple.com>
    237
  • branches/safari-613.1.9-branch/Source/WebCore/PAL/pal/spi/cocoa/NSAttributedStringSPI.h

    r285744 r285844  
    9696SOFT_LINK_CONSTANT(UIFoundation, NSTextAlternativesAttributeName, NSString *)
    9797#define NSTextAlternativesAttributeName getNSTextAlternativesAttributeName()
    98 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerCircle, NSString *)
     98
     99#if __has_include(<UIKit/NSTextList.h>)
     100#import <UIKit/NSTextList.h>
     101#else
     102typedef NSString *NSTextListMarkerFormat;
     103#endif
     104SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerCircle, NSTextListMarkerFormat)
    99105#define NSTextListMarkerCircle getNSTextListMarkerCircle()
    100 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDisc, NSString *)
     106SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDisc, NSTextListMarkerFormat)
    101107#define NSTextListMarkerDisc getNSTextListMarkerDisc()
    102 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerSquare, NSString *)
     108SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerSquare, NSTextListMarkerFormat)
    103109#define NSTextListMarkerSquare getNSTextListMarkerSquare()
    104 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseHexadecimal, NSString *)
     110SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseHexadecimal, NSTextListMarkerFormat)
    105111#define NSTextListMarkerLowercaseHexadecimal getNSTextListMarkerLowercaseHexadecimal()
    106 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseHexadecimal, NSString *)
     112SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseHexadecimal, NSTextListMarkerFormat)
    107113#define NSTextListMarkerUppercaseHexadecimal getNSTextListMarkerUppercaseHexadecimal()
    108 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerOctal, NSString *)
     114SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerOctal, NSTextListMarkerFormat)
    109115#define NSTextListMarkerOctal getNSTextListMarkerOctal()
    110 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseAlpha, NSString *)
     116SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseAlpha, NSTextListMarkerFormat)
    111117#define NSTextListMarkerLowercaseAlpha getNSTextListMarkerLowercaseAlpha()
    112 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseAlpha, NSString *)
     118SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseAlpha, NSTextListMarkerFormat)
    113119#define NSTextListMarkerUppercaseAlpha getNSTextListMarkerUppercaseAlpha()
    114 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseLatin, NSString *)
     120SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseLatin, NSTextListMarkerFormat)
    115121#define NSTextListMarkerLowercaseLatin getNSTextListMarkerLowercaseLatin()
    116 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseLatin, NSString *)
     122SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseLatin, NSTextListMarkerFormat)
    117123#define NSTextListMarkerUppercaseLatin getNSTextListMarkerUppercaseLatin()
    118 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseRoman, NSString *)
     124SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerLowercaseRoman, NSTextListMarkerFormat)
    119125#define NSTextListMarkerLowercaseRoman getNSTextListMarkerLowercaseRoman()
    120 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseRoman, NSString *)
     126SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerUppercaseRoman, NSTextListMarkerFormat)
    121127#define NSTextListMarkerUppercaseRoman getNSTextListMarkerUppercaseRoman()
    122 SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDecimal, NSString *)
     128SOFT_LINK_CONSTANT(UIFoundation, NSTextListMarkerDecimal, NSTextListMarkerFormat)
    123129#define NSTextListMarkerDecimal getNSTextListMarkerDecimal()
    124130
Note: See TracChangeset for help on using the changeset viewer.