Title: [203791] trunk/Source/WebKit2
Revision
203791
Author
[email protected]
Date
2016-07-27 14:00:42 -0700 (Wed, 27 Jul 2016)

Log Message

[iOS] Remove unused textContentType SPI from _WKFormInputSession
https://bugs.webkit.org/show_bug.cgi?id=160260

Patch by Chelsea Pugh <[email protected]> on 2016-07-27
Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/_WKFormInputSession.h: Remove unused SPI.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textInputTraits]): Set textContentType of _traits to whatever we classify it as based
on the assisted node info. The default textContentType is nil, and that is our fallback in our method
for determining textContentType.
(-[WKFormInputSession textContentType]): Deleted.
(-[WKFormInputSession setTextContentType:]): Deleted.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (203790 => 203791)


--- trunk/Source/WebKit2/ChangeLog	2016-07-27 20:55:23 UTC (rev 203790)
+++ trunk/Source/WebKit2/ChangeLog	2016-07-27 21:00:42 UTC (rev 203791)
@@ -1,3 +1,19 @@
+2016-07-27  Chelsea Pugh  <[email protected]>
+
+        [iOS] Remove unused textContentType SPI from _WKFormInputSession
+        https://bugs.webkit.org/show_bug.cgi?id=160260
+
+        Reviewed by Dan Bernstein.
+
+        * UIProcess/API/Cocoa/_WKFormInputSession.h: Remove unused SPI.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView textInputTraits]): Set textContentType of _traits to whatever we classify it as based
+        on the assisted node info. The default textContentType is nil, and that is our fallback in our method
+        for determining textContentType.
+        (-[WKFormInputSession textContentType]): Deleted.
+        (-[WKFormInputSession setTextContentType:]): Deleted.
+
 2016-07-27  Chris Dumez  <[email protected]>
 
         Fix m_isInBackground initialization for Safari View Services

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKFormInputSession.h (203790 => 203791)


--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKFormInputSession.h	2016-07-27 20:55:23 UTC (rev 203790)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKFormInputSession.h	2016-07-27 21:00:42 UTC (rev 203791)
@@ -43,7 +43,6 @@
 @property (nonatomic, strong) UIView *customInputView WK_API_AVAILABLE(ios(WK_IOS_TBA));
 @property (nonatomic, copy) NSArray<UITextSuggestion *> *suggestions WK_API_AVAILABLE(ios(WK_IOS_TBA));
 @property (nonatomic) BOOL accessoryViewShouldNotShow WK_API_AVAILABLE(ios(WK_IOS_TBA));
-@property (nonatomic, copy) NSString *textContentType WK_API_AVAILABLE(ios(WK_IOS_TBA));
 @property (nonatomic) BOOL forceSecureTextEntry WK_API_AVAILABLE(ios(WK_IOS_TBA));
 #endif
 

Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (203790 => 203791)


--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2016-07-27 20:55:23 UTC (rev 203790)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2016-07-27 21:00:42 UTC (rev 203791)
@@ -264,7 +264,6 @@
     RetainPtr<WKFocusedElementInfo> _focusedElementInfo;
     RetainPtr<UIView> _customInputView;
     RetainPtr<NSArray<UITextSuggestion *>> _suggestions;
-    RetainPtr<NSString> _textContentType;
     BOOL _accessoryViewShouldNotShow;
     BOOL _forceSecureTextEntry;
 }
@@ -367,20 +366,6 @@
 #endif
 }
 
-- (NSString *)textContentType
-{
-    return _textContentType.get();
-}
-
-- (void)setTextContentType:(NSString *)textContentType
-{
-    if (textContentType == _textContentType || [textContentType isEqualToString:_textContentType.get()])
-        return;
-
-    _textContentType = adoptNS([textContentType copy]);
-    [_contentView reloadInputViews];
-}
-
 - (void)invalidate
 {
 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
@@ -3024,10 +3009,7 @@
     }
 
 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000
-    if (NSString *textContentType = [_formInputSession textContentType])
-        [_traits setTextContentType:textContentType];
-    else
-        [_traits setTextContentType:contentTypeFromFieldName(_assistedNodeInformation.autofillFieldName)];
+    [_traits setTextContentType:contentTypeFromFieldName(_assistedNodeInformation.autofillFieldName)];
 #endif
 
     return _traits.get();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to