[Webkit-unassigned] [Bug 157995] [iOS] Allow clients to override the type of an input field

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 23 20:53:45 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=157995

mitz at webkit.org <mitz at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #279594|review?                     |review-
              Flags|                            |

--- Comment #7 from mitz at webkit.org <mitz at webkit.org> ---
Comment on attachment 279594
  --> https://bugs.webkit.org/attachment.cgi?id=279594
Fix ChangeLog spacing

View in context: https://bugs.webkit.org/attachment.cgi?id=279594&action=review

> Source/WebKit2/UIProcess/API/Cocoa/_WKFormInputSession.h:46
> + at property (nonatomic, strong) NSString *textContentType WK_AVAILABLE(NA, WK_IOS_TBA);

This should be copy, not strong…

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:362
> +    if (textContentType == _textContentType)

…so this should check for equality in addition to checking for identity…

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:365
> +    _textContentType = textContentType;

…and this should make a copy and adopt it.

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3021
> +    if (NSString *textContentType = [_formInputSession textContentType])
> +        [_traits setTextContentType:textContentType];
> +    else if (NSString *textContentType = contentTypeFromFieldName(_assistedNodeInformation.autofillFieldName))
> +        [_traits setTextContentType:textContentType];

The problem with this implementation is that if the field’s autofillFieldName is, say, None, and the client uses the SPI to set textContentType to some non-nil value and then back to nil, the traits’ textContentType doesn’t revert to whatever the default value is for None. Is there a way to avoid this issue?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160524/6e3ce11f/attachment.html>


More information about the webkit-unassigned mailing list