Changeset 261906 in webkit


Ignore:
Timestamp:
May 19, 2020 10:44:29 PM (4 years ago)
Author:
Wenson Hsieh
Message:

REGRESSION (r258919): fast/events/ios/key-events-comprehensive/key-events-control tests are failing
https://bugs.webkit.org/show_bug.cgi?id=212124
<rdar://problem/60893744>

Reviewed by Tim Horton.

After the changes in r258919, WKContentView's text input traits report that we're in a single line input, even
when there is no editable focused element. This prevents UIKit from allowing WebKit to handle the CTRL + M
key command, which is interpreted at the system level as inserting a line break in a multi-line editable area.

It seems odd to consider ourselves in a single line input when there isn't even an editable element focused
element; for now, we can fix these failing tests by just going with the default value for the text input traits'
setIsSingleLineDocument property, but not explicitly setting it to either NO or YES when no element is
focused.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView textInputTraits]):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r261901 r261906  
     12020-05-19  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        REGRESSION (r258919): fast/events/ios/key-events-comprehensive/key-events-control tests are failing
     4        https://bugs.webkit.org/show_bug.cgi?id=212124
     5        <rdar://problem/60893744>
     6
     7        Reviewed by Tim Horton.
     8
     9        After the changes in r258919, WKContentView's text input traits report that we're in a single line input, even
     10        when there is no editable focused element. This prevents UIKit from allowing WebKit to handle the `CTRL + M`
     11        key command, which is interpreted at the system level as inserting a line break in a multi-line editable area.
     12
     13        It seems odd to consider ourselves in a single line input when there isn't even an editable element focused
     14        element; for now, we can fix these failing tests by just going with the default value for the text input traits'
     15        `setIsSingleLineDocument` property, but not explicitly setting it to either `NO` or `YES` when no element is
     16        focused.
     17
     18        * UIProcess/ios/WKContentViewInteraction.mm:
     19        (-[WKContentView textInputTraits]):
     20
    1212020-05-19  Sam Weinig  <weinig@apple.com>
    222
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r261838 r261906  
    50625062    case WebKit::InputType::Email:
    50635063    case WebKit::InputType::Month:
    5064     case WebKit::InputType::None:
    50655064    case WebKit::InputType::Number:
    50665065    case WebKit::InputType::NumberPad:
     
    50745073    case WebKit::InputType::Week:
    50755074        [_traits setIsSingleLineDocument:YES];
     5075        break;
     5076    case WebKit::InputType::None:
    50765077        break;
    50775078    }
Note: See TracChangeset for help on using the changeset viewer.