[iOS WK2] API tests added in r222991 are failing in iOS 11 test runners
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Oct 2017 02:36:59 +0000 (02:36 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Oct 2017 02:36:59 +0000 (02:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178037

Reviewed by Tim Horton.

This patch carries out some minor cleanup around UIKitSPI.h in WebKit2, so that the internal SDK isn't required
to implement -[WKContentView insertTextSuggestion:].

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView insertTextSuggestion:]):

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

Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

index 149552b4b77080aad539482d95a25b78c519c795..33910f0f665373d5ee4e8f09c4f40df52589d440 100644 (file)
@@ -1,3 +1,17 @@
+2017-10-06  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [iOS WK2] API tests added in r222991 are failing in iOS 11 test runners
+        https://bugs.webkit.org/show_bug.cgi?id=178037
+
+        Reviewed by Tim Horton.
+
+        This patch carries out some minor cleanup around UIKitSPI.h in WebKit2, so that the internal SDK isn't required
+        to implement -[WKContentView insertTextSuggestion:].
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView insertTextSuggestion:]):
+
 2017-10-06  Chris Dumez  <cdumez@apple.com>
 
         [Beacon][Cocoa] Beacon requests with BufferSource payload should not have a Content-Type HTTP header
index 947caafb222bbaa8983d1c46d162de2704d68032..74c0407cc778db790d4e01cadf45ad5b5191b3aa 100644 (file)
 #import <UIKit/UIInterface_Private.h>
 #import <UIKit/UIKeyboardImpl.h>
 #import <UIKit/UIKeyboardIntl.h>
-#if __has_include(<UIKit/UIKeyboardLoginCredentialsSuggestion.h>)
-#import <UIKit/UIKeyboardLoginCredentialsSuggestion.h>
-#else
-#import <UIKit/UITextInput_Private.h>
-@interface UIKeyboardLoginCredentialsSuggestion : UITextSuggestion
-
-@property (nonatomic, assign) NSString *username;
-@property (nonatomic, assign) NSString *password;
-
-@end
-#endif
 #import <UIKit/UIKeyboard_Private.h>
 #import <UIKit/UILongPressGestureRecognizer_Private.h>
 #import <UIKit/UIPeripheralHost.h>
@@ -400,7 +389,8 @@ typedef enum {
 - (void)willStartScrollingOverflow;
 @end
 
-@class UITextSuggestion;
+@interface UITextSuggestion : NSObject
+@end
 
 @protocol UITextInputSuggestionDelegate <UITextInputDelegate>
 - (void)setSuggestions:(NSArray <UITextSuggestion*> *)suggestions;
@@ -964,6 +954,15 @@ typedef NS_OPTIONS(NSUInteger, UIDragOperation)
 - (UIResponder *)firstResponder;
 @end
 
+#if __has_include(<UIKit/UIKeyboardLoginCredentialsSuggestion.h>)
+#import <UIKit/UIKeyboardLoginCredentialsSuggestion.h>
+#else
+@interface UIKeyboardLoginCredentialsSuggestion : UITextSuggestion
+@property (nonatomic, assign) NSString *username;
+@property (nonatomic, assign) NSString *password;
+@end
+#endif
+
 WTF_EXTERN_C_BEGIN
 
 BOOL UIKeyboardEnabledInputModesAllowOneToManyShortcuts();
index 542f667f636212050405c82c521fd5eeb88e9780..3164699163cd6dfdc7fc9bd68e067161b4f97923 100644 (file)
@@ -2982,7 +2982,6 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
     [self.inputDelegate selectionDidChange:self];
 }
 
-#if USE(APPLE_INTERNAL_SDK)
 - (void)insertTextSuggestion:(UITextSuggestion *)textSuggestion
 {
     // FIXME: Replace NSClassFromString with actual class as soon as UIKit submitted the new class into the iOS SDK.
@@ -2994,7 +2993,6 @@ static void selectionChangedWithTouch(WKContentView *view, const WebCore::IntPoi
     if ([inputDelegate respondsToSelector:@selector(_webView:insertTextSuggestion:inInputSession:)])
         [inputDelegate _webView:_webView insertTextSuggestion:textSuggestion inInputSession:_formInputSession.get()];
 }
-#endif // USE(APPLE_INTERNAL_SDK)
 
 - (NSString *)textInRange:(UITextRange *)range
 {