Title: [203861] branches/safari-602-branch/Source/WebKit2

Diff

Modified: branches/safari-602-branch/Source/WebKit2/ChangeLog (203860 => 203861)


--- branches/safari-602-branch/Source/WebKit2/ChangeLog	2016-07-29 07:11:08 UTC (rev 203860)
+++ branches/safari-602-branch/Source/WebKit2/ChangeLog	2016-07-29 07:11:10 UTC (rev 203861)
@@ -1,3 +1,22 @@
+2016-07-28  Babak Shafiei  <bshaf...@apple.com>
+
+        Merge r203630. rdar://problem/27504958
+
+    2016-07-22  Chelsea Pugh  <cp...@apple.com>
+
+            [iOS] Clients should be able to decide if they want secure text entry in a form field
+            https://bugs.webkit.org/show_bug.cgi?id=160109
+            rdar://problem/27504958
+
+            Reviewed by Dan Bernstein.
+
+            * UIProcess/API/Cocoa/_WKFormInputSession.h:
+            * UIProcess/ios/WKContentViewInteraction.mm:
+            (-[WKFormInputSession forceSecureTextEntry]): Getter.
+            (-[WKFormInputSession setForceSecureTextEntry:]): Setter.
+            (-[WKContentView textInputTraits]): If the form input session has specified that secure text
+            entry is desired, we should use secure text entry.
+
 2016-07-22  Babak Shafiei  <bshaf...@apple.com>
 
         Merge r203545. rdar://problem/26964090

Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/API/Cocoa/_WKFormInputSession.h (203860 => 203861)


--- branches/safari-602-branch/Source/WebKit2/UIProcess/API/Cocoa/_WKFormInputSession.h	2016-07-29 07:11:08 UTC (rev 203860)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/API/Cocoa/_WKFormInputSession.h	2016-07-29 07:11:10 UTC (rev 203861)
@@ -44,6 +44,7 @@
 @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
 
 @end

Modified: branches/safari-602-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (203860 => 203861)


--- branches/safari-602-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2016-07-29 07:11:08 UTC (rev 203860)
+++ branches/safari-602-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm	2016-07-29 07:11:10 UTC (rev 203861)
@@ -266,6 +266,7 @@
     RetainPtr<NSArray<UITextSuggestion *>> _suggestions;
     RetainPtr<NSString> _textContentType;
     BOOL _accessoryViewShouldNotShow;
+    BOOL _forceSecureTextEntry;
 }
 
 - (instancetype)initWithContentView:(WKContentView *)view focusedElementInfo:(WKFocusedElementInfo *)elementInfo userObject:(NSObject <NSSecureCoding> *)userObject
@@ -324,6 +325,20 @@
     [_contentView reloadInputViews];
 }
 
+- (BOOL)forceSecureTextEntry
+{
+    return _forceSecureTextEntry;
+}
+
+- (void)setForceSecureTextEntry:(BOOL)forceSecureTextEntry
+{
+    if (_forceSecureTextEntry == forceSecureTextEntry)
+        return;
+
+    _forceSecureTextEntry = forceSecureTextEntry;
+    [_contentView reloadInputViews];
+}
+
 - (UIView *)customInputView
 {
     return _customInputView.get();
@@ -2974,7 +2989,7 @@
     if (!_traits)
         _traits = adoptNS([[UITextInputTraits alloc] init]);
 
-    [_traits setSecureTextEntry:_assistedNodeInformation.elementType == InputType::Password];
+    [_traits setSecureTextEntry:_assistedNodeInformation.elementType == InputType::Password || [_formInputSession forceSecureTextEntry]];
     [_traits setShortcutConversionType:_assistedNodeInformation.elementType == InputType::Password ? UITextShortcutConversionTypeNo : UITextShortcutConversionTypeDefault];
 
     if (!_assistedNodeInformation.formAction.isEmpty())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to