Diff
Modified: trunk/Source/WTF/ChangeLog (243369 => 243370)
--- trunk/Source/WTF/ChangeLog 2019-03-22 07:54:30 UTC (rev 243369)
+++ trunk/Source/WTF/ChangeLog 2019-03-22 09:40:41 UTC (rev 243370)
@@ -1,3 +1,11 @@
+2019-03-22 Tim Horton <[email protected]>
+
+ Fix the build after r243354
+ https://bugs.webkit.org/show_bug.cgi?id=196138
+ <rdar://problem/49145951>
+
+ * wtf/Platform.h:
+
2019-03-21 Eric Carlson <[email protected]>
Add UI process WebRTC runtime logging.
Modified: trunk/Source/WTF/wtf/Platform.h (243369 => 243370)
--- trunk/Source/WTF/wtf/Platform.h 2019-03-22 07:54:30 UTC (rev 243369)
+++ trunk/Source/WTF/wtf/Platform.h 2019-03-22 09:40:41 UTC (rev 243370)
@@ -1518,6 +1518,10 @@
#define HAVE_UI_WEB_TOUCH_EVENTS_GESTURE_RECOGNIZER_WITH_ACTIVE_TOUCHES_BY_ID 1
#endif
+#if PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000
+#define HAVE_UI_WK_DOCUMENT_CONTEXT 1
+#endif
+
#if PLATFORM(IOSMAC)
#define ENABLE_PLATFORM_DRIVEN_TEXT_CHECKING 1
#endif
Modified: trunk/Source/WebKit/ChangeLog (243369 => 243370)
--- trunk/Source/WebKit/ChangeLog 2019-03-22 07:54:30 UTC (rev 243369)
+++ trunk/Source/WebKit/ChangeLog 2019-03-22 09:40:41 UTC (rev 243370)
@@ -1,3 +1,14 @@
+2019-03-22 Tim Horton <[email protected]>
+
+ Fix the build after r243354
+ https://bugs.webkit.org/show_bug.cgi?id=196138
+ <rdar://problem/49145951>
+
+ * Platform/spi/ios/UIKitSPI.h:
+ * Shared/DocumentEditingContext.mm:
+ (WebKit::DocumentEditingContext::toPlatformContext):
+ * UIProcess/ios/WKContentViewInteraction.mm:
+
2019-03-21 Simon Fraser <[email protected]>
Clean up some TiledCoreAnimationDrawingArea members
Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (243369 => 243370)
--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2019-03-22 07:54:30 UTC (rev 243369)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h 2019-03-22 09:40:41 UTC (rev 243370)
@@ -1034,6 +1034,36 @@
@property (assign, nonatomic, setter=_setCentersPopoverIfSourceViewNotSet:, getter=_centersPopoverIfSourceViewNotSet) BOOL _centersPopoverIfSourceViewNotSet;
@end
+@interface UIWKDocumentContext : NSObject
+
+@property (nonatomic, copy) NSObject *contextBefore;
+@property (nonatomic, copy) NSObject *selectedText;
+@property (nonatomic, copy) NSObject *contextAfter;
+@property (nonatomic, copy) NSObject *markedText;
+@property (nonatomic, assign) NSRange selectedRangeInMarkedText;
+@property (nonatomic, copy) NSAttributedString *annotatedText;
+
+- (void)addTextRect:(CGRect)rect forCharacterRange:(NSRange)range;
+
+@end
+
+typedef NS_OPTIONS(NSInteger, UIWKDocumentRequestFlags) {
+ UIWKDocumentRequestNone = 0,
+ UIWKDocumentRequestText = 1 << 0,
+ UIWKDocumentRequestAttributed = 1 << 1,
+ UIWKDocumentRequestRects = 1 << 2,
+ UIWKDocumentRequestSpatial = 1 << 3,
+ UIWKDocumentRequestAnnotation = 1 << 4,
+};
+
+@interface UIWKDocumentRequest : NSObject
+@property (nonatomic, assign) UIWKDocumentRequestFlags flags;
+@property (nonatomic, assign) UITextGranularity surroundingGranularity;
+@property (nonatomic, assign) NSInteger granularityCount;
+@property (nonatomic, assign) CGRect documentRect;
+@property (nonatomic, retain) id <NSCopying> inputElementIdentifier;
+@end
+
#endif // USE(APPLE_INTERNAL_SDK)
@interface UIGestureRecognizer (Staging_45970040)
@@ -1140,36 +1170,6 @@
#endif
}
-@interface UIWKDocumentContext : NSObject
-
-@property (nonatomic, copy) NSObject *contextBefore;
-@property (nonatomic, copy) NSObject *selectedText;
-@property (nonatomic, copy) NSObject *contextAfter;
-@property (nonatomic, copy) NSObject *markedText;
-@property (nonatomic, assign) NSRange selectedRangeInMarkedText;
-@property (nonatomic, copy) NSAttributedString *annotatedText;
-
-- (void)addTextRect:(CGRect)rect forCharacterRange:(NSRange)range;
-
-@end
-
-typedef NS_OPTIONS(NSInteger, UIWKDocumentRequestFlags) {
- UIWKDocumentRequestNone = 0,
- UIWKDocumentRequestText = 1 << 0,
- UIWKDocumentRequestAttributed = 1 << 1,
- UIWKDocumentRequestRects = 1 << 2,
- UIWKDocumentRequestSpatial = 1 << 3,
- UIWKDocumentRequestAnnotation = 1 << 4,
-};
-
-@interface UIWKDocumentRequest : NSObject
-@property (nonatomic, assign) UIWKDocumentRequestFlags flags;
-@property (nonatomic, assign) UITextGranularity surroundingGranularity;
-@property (nonatomic, assign) NSInteger granularityCount;
-@property (nonatomic, assign) CGRect documentRect;
-@property (nonatomic, retain) id <NSCopying> inputElementIdentifier;
-@end
-
WTF_EXTERN_C_BEGIN
BOOL UIKeyboardEnabledInputModesAllowOneToManyShortcuts(void);
Modified: trunk/Source/WebKit/Shared/DocumentEditingContext.mm (243369 => 243370)
--- trunk/Source/WebKit/Shared/DocumentEditingContext.mm 2019-03-22 07:54:30 UTC (rev 243369)
+++ trunk/Source/WebKit/Shared/DocumentEditingContext.mm 2019-03-22 09:40:41 UTC (rev 243370)
@@ -41,6 +41,7 @@
UIWKDocumentContext *DocumentEditingContext::toPlatformContext(OptionSet<DocumentEditingContextRequest::Options> options)
{
+#if HAVE(UI_WK_DOCUMENT_CONTEXT)
RetainPtr<UIWKDocumentContext> platformContext = adoptNS([[NSClassFromString(@"UIWKDocumentContext") alloc] init]);
if (options.contains(DocumentEditingContextRequest::Options::AttributedText)) {
@@ -63,6 +64,10 @@
[platformContext setAnnotatedText:annotatedText.string.get()];
return platformContext.autorelease();
+#else
+ UNUSED_PARAM(options);
+ return nil;
+#endif
}
}
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (243369 => 243370)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-03-22 07:54:30 UTC (rev 243369)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-03-22 09:40:41 UTC (rev 243370)
@@ -6284,6 +6284,7 @@
return nil;
}
+#if HAVE(UI_WK_DOCUMENT_CONTEXT)
static inline OptionSet<WebKit::DocumentEditingContextRequest::Options> toWebDocumentRequestOptions(UIWKDocumentRequestFlags flags)
{
@@ -6345,6 +6346,7 @@
}];
}
+#endif
#pragma mark - UIDragInteractionDelegate
Modified: trunk/Tools/ChangeLog (243369 => 243370)
--- trunk/Tools/ChangeLog 2019-03-22 07:54:30 UTC (rev 243369)
+++ trunk/Tools/ChangeLog 2019-03-22 09:40:41 UTC (rev 243370)
@@ -1,3 +1,13 @@
+2019-03-22 Tim Horton <[email protected]>
+
+ Fix the build after r243354
+ https://bugs.webkit.org/show_bug.cgi?id=196138
+ <rdar://problem/49145951>
+
+ * TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm:
+ (TEST):
+ * TestWebKitAPI/ios/UIKitSPI.h:
+
2019-03-21 Tim Horton <[email protected]>
Adopt UIWKDocumentContext
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm (243369 => 243370)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm 2019-03-22 07:54:30 UTC (rev 243369)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/DocumentEditingContext.mm 2019-03-22 09:40:41 UTC (rev 243370)
@@ -25,7 +25,7 @@
#import "config.h"
-#if PLATFORM(IOS_FAMILY)
+#if PLATFORM(IOS_FAMILY) && HAVE(UI_WK_DOCUMENT_CONTEXT)
#import "PlatformUtilities.h"
#import "Test.h"
@@ -236,4 +236,4 @@
EXPECT_NSSTRING_EQ(" world", context.contextAfter);
}
-#endif // PLATFORM(IOS_FAMILY)
+#endif // PLATFORM(IOS_FAMILY) && HAVE(UI_WK_DOCUMENT_CONTEXT)
Modified: trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h (243369 => 243370)
--- trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h 2019-03-22 07:54:30 UTC (rev 243369)
+++ trunk/Tools/TestWebKitAPI/ios/UIKitSPI.h 2019-03-22 09:40:41 UTC (rev 243370)
@@ -37,6 +37,7 @@
#import <UIKit/UITextInputTraits_Private.h>
#import <UIKit/UITextInput_Private.h>
#import <UIKit/UIViewController_Private.h>
+#import <UIKit/UIWKTextInteractionAssistant.h>
#if ENABLE(DRAG_SUPPORT)
@protocol UIDragSession;
@@ -98,6 +99,38 @@
+ (UICalloutBar *)sharedCalloutBar;
@end
+@interface UIWKDocumentContext : NSObject
+
+@property (nonatomic, copy) NSObject *contextBefore;
+@property (nonatomic, copy) NSObject *selectedText;
+@property (nonatomic, copy) NSObject *contextAfter;
+@property (nonatomic, copy) NSObject *markedText;
+@property (nonatomic, assign) NSRange selectedRangeInMarkedText;
+@property (nonatomic, copy) NSAttributedString *annotatedText;
+
+- (NSArray<NSValue *> *)characterRectsForCharacterRange:(NSRange)range;
+
+@end
+
+typedef NS_OPTIONS(NSInteger, UIWKDocumentRequestFlags) {
+ UIWKDocumentRequestNone = 0,
+ UIWKDocumentRequestText = 1 << 0,
+ UIWKDocumentRequestAttributed = 1 << 1,
+ UIWKDocumentRequestRects = 1 << 2,
+ UIWKDocumentRequestSpatial = 1 << 3,
+ UIWKDocumentRequestAnnotation = 1 << 4,
+};
+
+@interface UIWKDocumentRequest : NSObject
+
+@property (nonatomic, assign) UIWKDocumentRequestFlags flags;
+@property (nonatomic, assign) UITextGranularity surroundingGranularity;
+@property (nonatomic, assign) NSInteger granularityCount;
+@property (nonatomic, assign) CGRect documentRect;
+@property (nonatomic, retain) id <NSCopying> inputElementIdentifier;
+
+@end
+
#endif
@protocol UITextInputTraits_Private_Proposed_SPI_34583628 <UITextInputPrivate>
@@ -141,36 +174,4 @@
+ (BOOL)isInHardwareKeyboardMode;
@end
-@interface UIWKDocumentContext : NSObject
-
-@property (nonatomic, copy) NSObject *contextBefore;
-@property (nonatomic, copy) NSObject *selectedText;
-@property (nonatomic, copy) NSObject *contextAfter;
-@property (nonatomic, copy) NSObject *markedText;
-@property (nonatomic, assign) NSRange selectedRangeInMarkedText;
-@property (nonatomic, copy) NSAttributedString *annotatedText;
-
-- (NSArray<NSValue *> *)characterRectsForCharacterRange:(NSRange)range;
-
-@end
-
-typedef NS_OPTIONS(NSInteger, UIWKDocumentRequestFlags) {
- UIWKDocumentRequestNone = 0,
- UIWKDocumentRequestText = 1 << 0,
- UIWKDocumentRequestAttributed = 1 << 1,
- UIWKDocumentRequestRects = 1 << 2,
- UIWKDocumentRequestSpatial = 1 << 3,
- UIWKDocumentRequestAnnotation = 1 << 4,
-};
-
-@interface UIWKDocumentRequest : NSObject
-
-@property (nonatomic, assign) UIWKDocumentRequestFlags flags;
-@property (nonatomic, assign) UITextGranularity surroundingGranularity;
-@property (nonatomic, assign) NSInteger granularityCount;
-@property (nonatomic, assign) CGRect documentRect;
-@property (nonatomic, retain) id <NSCopying> inputElementIdentifier;
-
-@end
-
#endif // PLATFORM(IOS_FAMILY)