Changeset 240497 in webkit


Ignore:
Timestamp:
Jan 25, 2019 12:45:04 PM (5 years ago)
Author:
rniwa@webkit.org
Message:

iOS: inputmode="none" disables hardware keyboard's globe key
https://bugs.webkit.org/show_bug.cgi?id=193811
<rdar://problem/47406553>

Reviewed by Wenson Hsieh.

Source/WebKit:

Removed the support for inputmode="none" for now since we need a new SPI from UIKit
to properly implement this feature some time in the future.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _zoomToRevealFocusedElement]):
(-[WKContentView inputView]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView textInputTraits]):

LayoutTests:

Updated and renamed the test expecting the keyboard to update upon inputmode content attribute changed
to use inputmode="decimal" instead of inputmode="none", and updated another test to expect inputmode="none"
has no effect instead of hiding the keyboard.

  • fast/forms/ios/inputmode-change-update-keyboard-expected.txt: Renamed from inputmode-none-removed-expected.txt.
  • fast/forms/ios/inputmode-change-update-keyboard.html: Renamed from inputmode-none-removed.html.
  • fast/forms/ios/inputmode-none-expected.txt:
  • fast/forms/ios/inputmode-none.html:
Location:
trunk
Files:
2 added
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r240492 r240497  
     12019-01-25  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        iOS: inputmode="none" disables hardware keyboard's globe key
     4        https://bugs.webkit.org/show_bug.cgi?id=193811
     5        <rdar://problem/47406553>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        Updated and renamed the test expecting the keyboard to update upon inputmode content attribute changed
     10        to use inputmode="decimal" instead of inputmode="none", and updated another test to expect inputmode="none"
     11        has no effect instead of hiding the keyboard.
     12
     13        * fast/forms/ios/inputmode-change-update-keyboard-expected.txt: Renamed from inputmode-none-removed-expected.txt.
     14        * fast/forms/ios/inputmode-change-update-keyboard.html: Renamed from inputmode-none-removed.html.
     15        * fast/forms/ios/inputmode-none-expected.txt:
     16        * fast/forms/ios/inputmode-none.html:
     17
    1182019-01-25  Jonathan Bedard  <jbedard@apple.com>
    219
  • trunk/LayoutTests/fast/forms/ios/inputmode-none-expected.txt

    r235426 r240497  
    66
    77ACTIVATE input with inputmode=text
    8 PASS systemKeyboardRect.height > 0 is true
     8PASS textKeyboardHeight = systemKeyboardRect.height; systemKeyboardRect.height > 0 is true
    99PASS inputWithSystemKeyboard.value is "Text"
    1010
    1111ACTIVATE input with inputmode=none
    12 PASS systemKeyboardRect.height === 0 is true
     12PASS systemKeyboardRect.height is textKeyboardHeight
    1313
    1414TEST enter text in input with inputmode=none
  • trunk/LayoutTests/fast/forms/ios/inputmode-none.html

    r235426 r240497  
    2121    await UIHelper.activateFormControl(inputWithSystemKeyboard);
    2222    systemKeyboardRect = await UIHelper.inputViewBounds();
    23     shouldBe('systemKeyboardRect.height > 0', 'true');
     23    shouldBe('textKeyboardHeight = systemKeyboardRect.height; systemKeyboardRect.height > 0', 'true');
    2424    await UIHelper.enterText("Text");
    2525    shouldBe('inputWithSystemKeyboard.value', '"Text"');
     
    2828    await UIHelper.activateFormControl(inputWithoutSystemKeyboard);
    2929    systemKeyboardRect = await UIHelper.inputViewBounds();
    30     shouldBe('systemKeyboardRect.height === 0', 'true');
     30    shouldBe('systemKeyboardRect.height', 'textKeyboardHeight');
    3131
    3232    debug('\nTEST enter text in input with inputmode=none');
  • trunk/Source/WebKit/ChangeLog

    r240494 r240497  
     12019-01-25  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        iOS: inputmode="none" disables hardware keyboard's globe key
     4        https://bugs.webkit.org/show_bug.cgi?id=193811
     5        <rdar://problem/47406553>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        Removed the support for inputmode="none" for now since we need a new SPI from UIKit
     10        to properly implement this feature some time in the future.
     11
     12        * UIProcess/ios/WKContentViewInteraction.mm:
     13        (-[WKContentView _zoomToRevealFocusedElement]):
     14        (-[WKContentView inputView]):
     15        (-[WKContentView requiresAccessoryView]):
     16        (-[WKContentView textInputTraits]):
     17
    1182019-01-25  David Kilzer  <ddkilzer@apple.com>
    219
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r240491 r240497  
    14211421        maximumScale:_focusedElementInformation.maximumScaleFactorIgnoringAlwaysScalable
    14221422        allowScaling:_focusedElementInformation.allowsUserScalingIgnoringAlwaysScalable && !currentUserInterfaceIdiomIsPad()
    1423         forceScroll:(_focusedElementInformation.inputMode == WebCore::InputMode::None) ? !currentUserInterfaceIdiomIsPad() : [self requiresAccessoryView]];
     1423        forceScroll:[self requiresAccessoryView]];
    14241424}
    14251425
     
    14281428    if (!hasFocusedElement(_focusedElementInformation))
    14291429        return nil;
    1430 
    1431     if (_focusedElementInformation.inputMode == WebCore::InputMode::None)
    1432         return [[UIView new] autorelease];
    14331430
    14341431    if (!_inputPeripheral) {
     
    22082205    if ([_formInputSession customInputAccessoryView])
    22092206        return YES;
    2210 
    2211     if (_focusedElementInformation.inputMode == WebCore::InputMode::None)
    2212         return NO;
    22132207
    22142208    switch (_focusedElementInformation.elementType) {
     
    38133807
    38143808    switch (_focusedElementInformation.inputMode) {
     3809    case WebCore::InputMode::None:
    38153810    case WebCore::InputMode::Unspecified:
    38163811        switch (_focusedElementInformation.elementType) {
     
    38493844            [_traits setKeyboardType:UIKeyboardTypeDefault];
    38503845        }
    3851         break;
    3852     case WebCore::InputMode::None:
    38533846        break;
    38543847    case WebCore::InputMode::Text:
Note: See TracChangeset for help on using the changeset viewer.