[webkit-reviews] review granted: [Bug 209391] [iOS][WK2] Set text trait isSingleLineDocument : [Attachment 394206] Patch and unit test

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Mar 22 09:44:39 PDT 2020


Darin Adler <darin at apple.com> has granted Daniel Bates <dbates at webkit.org>'s
request for review:
Bug 209391: [iOS][WK2] Set text trait isSingleLineDocument
https://bugs.webkit.org/show_bug.cgi?id=209391

Attachment 394206: Patch and unit test

https://bugs.webkit.org/attachment.cgi?id=394206&action=review




--- Comment #8 from Darin Adler <darin at apple.com> ---
Comment on attachment 394206
  --> https://bugs.webkit.org/attachment.cgi?id=394206
Patch and unit test

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

r=me if you can get this to build; looks like there are build failures on some
bots

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4980
> +    [_traits setIsSingleLineDocument:(_focusedElementInformation.elementType
!= WebKit::InputType::TextArea && _focusedElementInformation.elementType !=
WebKit::InputType::ContentEditable)];

Seems to me this should be backed by a switch statement since we need to look
at this list any time we add a new input type and a switch statement without a
defauit will helpfully give us an error if a type isn’t listed as one of the
cases, which is what we want.

Also, is there any practical way to configure a text area or content editable
to behave as a single line document? If so, would be nice if doing that gave
the correct desired behavior.


More information about the webkit-reviews mailing list