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

Changeset 243370 in webkit


Ignore:
Timestamp:
Mar 22, 2019, 2:40:41 AM (7 years ago)
Author:
timothy_horton@apple.com
Message:

Fix the build after r243354
https://bugs.webkit.org/show_bug.cgi?id=196138
<rdar://problem/49145951>

  • wtf/Platform.h:
  • TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:

(TEST):

  • TestWebKitAPI/ios/UIKitSPI.h:
  • Platform/spi/ios/UIKitSPI.h:
  • Shared/DocumentEditingContext.mm:

(WebKit::DocumentEditingContext::toPlatformContext):

  • UIProcess/ios/WKContentViewInteraction.mm:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r243328 r243370  
     12019-03-22  Tim Horton  <timothy_horton@apple.com>
     2
     3        Fix the build after r243354
     4        https://bugs.webkit.org/show_bug.cgi?id=196138
     5        <rdar://problem/49145951>
     6
     7        * wtf/Platform.h:
     8
    192019-03-21  Eric Carlson  <eric.carlson@apple.com>
    210
  • trunk/Source/WTF/wtf/Platform.h

    r243254 r243370  
    15191519#endif
    15201520
     1521#if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000
     1522#define HAVE_UI_WK_DOCUMENT_CONTEXT 1
     1523#endif
     1524
    15211525#if PLATFORM(IOSMAC)
    15221526#define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
  • trunk/Source/WebKit/ChangeLog

    r243360 r243370  
     12019-03-22  Tim Horton  <timothy_horton@apple.com>
     2
     3        Fix the build after r243354
     4        https://bugs.webkit.org/show_bug.cgi?id=196138
     5        <rdar://problem/49145951>
     6
     7        * Platform/spi/ios/UIKitSPI.h:
     8        * Shared/DocumentEditingContext.mm:
     9        (WebKit::DocumentEditingContext::toPlatformContext):
     10        * UIProcess/ios/WKContentViewInteraction.mm:
     11
    1122019-03-21  Simon Fraser  <simon.fraser@apple.com>
    213
  • trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h

    r243354 r243370  
    10351035@end
    10361036
     1037@interface UIWKDocumentContext : NSObject
     1038
     1039@property (nonatomic, copy) NSObject *contextBefore;
     1040@property (nonatomic, copy) NSObject *selectedText;
     1041@property (nonatomic, copy) NSObject *contextAfter;
     1042@property (nonatomic, copy) NSObject *markedText;
     1043@property (nonatomic, assign) NSRange selectedRangeInMarkedText;
     1044@property (nonatomic, copy) NSAttributedString *annotatedText;
     1045
     1046- (void)addTextRect:(CGRect)rect forCharacterRange:(NSRange)range;
     1047
     1048@end
     1049
     1050typedef NS_OPTIONS(NSInteger, UIWKDocumentRequestFlags) {
     1051    UIWKDocumentRequestNone = 0,
     1052    UIWKDocumentRequestText = 1 << 0,
     1053    UIWKDocumentRequestAttributed = 1 << 1,
     1054    UIWKDocumentRequestRects = 1 << 2,
     1055    UIWKDocumentRequestSpatial = 1 << 3,
     1056    UIWKDocumentRequestAnnotation = 1 << 4,
     1057};
     1058
     1059@interface UIWKDocumentRequest : NSObject
     1060@property (nonatomic, assign) UIWKDocumentRequestFlags flags;
     1061@property (nonatomic, assign) UITextGranularity surroundingGranularity;
     1062@property (nonatomic, assign) NSInteger granularityCount;
     1063@property (nonatomic, assign) CGRect documentRect;
     1064@property (nonatomic, retain) id <NSCopying> inputElementIdentifier;
     1065@end
     1066
    10371067#endif // USE(APPLE_INTERNAL_SDK)
    10381068
     
    11411171}
    11421172
    1143 @interface UIWKDocumentContext : NSObject
    1144 
    1145 @property (nonatomic, copy) NSObject *contextBefore;
    1146 @property (nonatomic, copy) NSObject *selectedText;
    1147 @property (nonatomic, copy) NSObject *contextAfter;
    1148 @property (nonatomic, copy) NSObject *markedText;
    1149 @property (nonatomic, assign) NSRange selectedRangeInMarkedText;
    1150 @property (nonatomic, copy) NSAttributedString *annotatedText;
    1151 
    1152 - (void)addTextRect:(CGRect)rect forCharacterRange:(NSRange)range;
    1153 
    1154 @end
    1155 
    1156 typedef NS_OPTIONS(NSInteger, UIWKDocumentRequestFlags) {
    1157     UIWKDocumentRequestNone = 0,
    1158     UIWKDocumentRequestText = 1 << 0,
    1159     UIWKDocumentRequestAttributed = 1 << 1,
    1160     UIWKDocumentRequestRects = 1 << 2,
    1161     UIWKDocumentRequestSpatial = 1 << 3,
    1162     UIWKDocumentRequestAnnotation = 1 << 4,
    1163 };
    1164 
    1165 @interface UIWKDocumentRequest : NSObject
    1166 @property (nonatomic, assign) UIWKDocumentRequestFlags flags;
    1167 @property (nonatomic, assign) UITextGranularity surroundingGranularity;
    1168 @property (nonatomic, assign) NSInteger granularityCount;
    1169 @property (nonatomic, assign) CGRect documentRect;
    1170 @property (nonatomic, retain) id <NSCopying> inputElementIdentifier;
    1171 @end
    1172 
    11731173WTF_EXTERN_C_BEGIN
    11741174
  • trunk/Source/WebKit/Shared/DocumentEditingContext.mm

    r243354 r243370  
    4242UIWKDocumentContext *DocumentEditingContext::toPlatformContext(OptionSet<DocumentEditingContextRequest::Options> options)
    4343{
     44#if HAVE(UI_WK_DOCUMENT_CONTEXT)
    4445    RetainPtr<UIWKDocumentContext> platformContext = adoptNS([[NSClassFromString(@"UIWKDocumentContext") alloc] init]);
    4546
     
    6465
    6566    return platformContext.autorelease();
     67#else
     68    UNUSED_PARAM(options);
     69    return nil;
     70#endif
    6671}
    6772
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r243354 r243370  
    62856285}
    62866286
     6287#if HAVE(UI_WK_DOCUMENT_CONTEXT)
    62876288
    62886289static inline OptionSet<WebKit::DocumentEditingContextRequest::Options> toWebDocumentRequestOptions(UIWKDocumentRequestFlags flags)
     
    63466347}
    63476348
     6349#endif
    63486350
    63496351#pragma mark - UIDragInteractionDelegate
  • trunk/Tools/ChangeLog

    r243354 r243370  
     12019-03-22  Tim Horton  <timothy_horton@apple.com>
     2
     3        Fix the build after r243354
     4        https://bugs.webkit.org/show_bug.cgi?id=196138
     5        <rdar://problem/49145951>
     6
     7        * TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
     8        (TEST):
     9        * TestWebKitAPI/ios/UIKitSPI.h:
     10
    1112019-03-21  Tim Horton  <timothy_horton@apple.com>
    212
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm

    r243354 r243370  
    2626#import "config.h"
    2727
    28 #if PLATFORM(IOS_FAMILY)
     28#if PLATFORM(IOS_FAMILY) && HAVE(UI_WK_DOCUMENT_CONTEXT)
    2929
    3030#import "PlatformUtilities.h"
     
    237237}
    238238
    239 #endif // PLATFORM(IOS_FAMILY)
     239#endif // PLATFORM(IOS_FAMILY) && HAVE(UI_WK_DOCUMENT_CONTEXT)
  • trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h

    r243354 r243370  
    3838#import <UIKit/UITextInput_Private.h>
    3939#import <UIKit/UIViewController_Private.h>
     40#import <UIKit/UIWKTextInteractionAssistant.h>
    4041
    4142#if ENABLE(DRAG_SUPPORT)
     
    99100@end
    100101
     102@interface UIWKDocumentContext : NSObject
     103
     104@property (nonatomic, copy) NSObject *contextBefore;
     105@property (nonatomic, copy) NSObject *selectedText;
     106@property (nonatomic, copy) NSObject *contextAfter;
     107@property (nonatomic, copy) NSObject *markedText;
     108@property (nonatomic, assign) NSRange selectedRangeInMarkedText;
     109@property (nonatomic, copy) NSAttributedString *annotatedText;
     110
     111- (NSArray<NSValue *> *)characterRectsForCharacterRange:(NSRange)range;
     112
     113@end
     114
     115typedef NS_OPTIONS(NSInteger, UIWKDocumentRequestFlags) {
     116    UIWKDocumentRequestNone = 0,
     117    UIWKDocumentRequestText = 1 << 0,
     118    UIWKDocumentRequestAttributed = 1 << 1,
     119    UIWKDocumentRequestRects = 1 << 2,
     120    UIWKDocumentRequestSpatial = 1 << 3,
     121    UIWKDocumentRequestAnnotation = 1 << 4,
     122};
     123
     124@interface UIWKDocumentRequest : NSObject
     125
     126@property (nonatomic, assign) UIWKDocumentRequestFlags flags;
     127@property (nonatomic, assign) UITextGranularity surroundingGranularity;
     128@property (nonatomic, assign) NSInteger granularityCount;
     129@property (nonatomic, assign) CGRect documentRect;
     130@property (nonatomic, retain) id <NSCopying> inputElementIdentifier;
     131
     132@end
     133
    101134#endif
    102135
     
    142175@end
    143176
    144 @interface UIWKDocumentContext : NSObject
    145 
    146 @property (nonatomic, copy) NSObject *contextBefore;
    147 @property (nonatomic, copy) NSObject *selectedText;
    148 @property (nonatomic, copy) NSObject *contextAfter;
    149 @property (nonatomic, copy) NSObject *markedText;
    150 @property (nonatomic, assign) NSRange selectedRangeInMarkedText;
    151 @property (nonatomic, copy) NSAttributedString *annotatedText;
    152 
    153 - (NSArray<NSValue *> *)characterRectsForCharacterRange:(NSRange)range;
    154 
    155 @end
    156 
    157 typedef NS_OPTIONS(NSInteger, UIWKDocumentRequestFlags) {
    158     UIWKDocumentRequestNone = 0,
    159     UIWKDocumentRequestText = 1 << 0,
    160     UIWKDocumentRequestAttributed = 1 << 1,
    161     UIWKDocumentRequestRects = 1 << 2,
    162     UIWKDocumentRequestSpatial = 1 << 3,
    163     UIWKDocumentRequestAnnotation = 1 << 4,
    164 };
    165 
    166 @interface UIWKDocumentRequest : NSObject
    167 
    168 @property (nonatomic, assign) UIWKDocumentRequestFlags flags;
    169 @property (nonatomic, assign) UITextGranularity surroundingGranularity;
    170 @property (nonatomic, assign) NSInteger granularityCount;
    171 @property (nonatomic, assign) CGRect documentRect;
    172 @property (nonatomic, retain) id <NSCopying> inputElementIdentifier;
    173 
    174 @end
    175 
    176177#endif // PLATFORM(IOS_FAMILY)
Note: See TracChangeset for help on using the changeset viewer.