Changeset 246817 in webkit


Ignore:
Timestamp:
Jun 25, 2019 4:41:31 PM (5 years ago)
Author:
dbates@webkit.org
Message:

Non-editable text selections should be modifiable with hardware keyboard
https://bugs.webkit.org/show_bug.cgi?id=199204
<rdar://problem/51651496>

Reviewed by Wenson Hsieh.

Source/WebKit:

UIKit changes are need for this to work, including <rdar://problem/48322899>.
Note that without these changes, -canPerformAction is never called for _move*
selectors.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView canPerformAction:withSender:]):

LayoutTests:

Add a test, skipped for now, until we have the fix for <rdar://problem/48322899>.

  • editing/selection/ios/select-non-editable-text-using-keyboard-expected.txt: Added.
  • editing/selection/ios/select-non-editable-text-using-keyboard.html: Added.
  • platform/ios/TestExpectations:
  • resources/ui-helper.js:

(window.UIHelper.callFunctionAndWaitForEvent): Added.

Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r246810 r246817  
     12019-06-25  Daniel Bates  <dabates@apple.com>
     2
     3        Non-editable text selections should be modifiable with hardware keyboard
     4        https://bugs.webkit.org/show_bug.cgi?id=199204
     5        <rdar://problem/51651496>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        Add a test, skipped for now, until we have the fix for <rdar://problem/48322899>.
     10
     11        * editing/selection/ios/select-non-editable-text-using-keyboard-expected.txt: Added.
     12        * editing/selection/ios/select-non-editable-text-using-keyboard.html: Added.
     13        * platform/ios/TestExpectations:
     14        * resources/ui-helper.js:
     15        (window.UIHelper.callFunctionAndWaitForEvent): Added.
     16
    1172019-06-25  Daniel Bates  <dabates@apple.com>
    218
  • trunk/LayoutTests/platform/ios/TestExpectations

    r246645 r246817  
    32523252# Was unskipped, but now has missing results in iOS . Skipping on iOS only.
    32533253media/controls-after-reload.html [ Skip ]
     3254
     3255# FIXME: Unskip the following test once we have the fix for <rdar://problem/48322899>.
     3256editing/selection/ios/select-non-editable-text-using-keyboard.html [ Skip ]
  • trunk/LayoutTests/resources/ui-helper.js

    r246570 r246817  
    900900    }
    901901
     902    static callFunctionAndWaitForEvent(functionToCall, target, eventName)
     903    {
     904        return new Promise((resolve) => {
     905            target.addEventListener(eventName, resolve, { once: true });
     906            functionToCall();
     907        });
     908
     909    }
     910
    902911    static callFunctionAndWaitForScrollToFinish(functionToCall, ...theArguments)
    903912    {
  • trunk/Source/WebKit/ChangeLog

    r246810 r246817  
     12019-06-25  Daniel Bates  <dabates@apple.com>
     2
     3        Non-editable text selections should be modifiable with hardware keyboard
     4        https://bugs.webkit.org/show_bug.cgi?id=199204
     5        <rdar://problem/51651496>
     6
     7        Reviewed by Wenson Hsieh.
     8
     9        UIKit changes are need for this to work, including <rdar://problem/48322899>.
     10        Note that without these changes, -canPerformAction is never called for _move*
     11        selectors.
     12
     13        * UIProcess/ios/WKContentViewInteraction.mm:
     14        (-[WKContentView canPerformAction:withSender:]):
     15
    1162019-06-25  Daniel Bates  <dabates@apple.com>
    217
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r246810 r246817  
    28932893    // These are UIKit IPI selectors. We don't want to forward them to the web view.
    28942894    auto editorState = _page->editorState();
    2895     if (action == @selector(_deleteByWord) || action == @selector(_deleteForwardAndNotify:) || action == @selector(_deleteToEndOfParagraph) || action == @selector(_deleteToStartOfLine)
    2896         || action == @selector(_moveDown:withHistory:) || action == @selector(_moveLeft:withHistory:) || action == @selector(_moveRight:withHistory:)
     2895    if (action == @selector(_moveDown:withHistory:) || action == @selector(_moveLeft:withHistory:) || action == @selector(_moveRight:withHistory:)
    28972896        || action == @selector(_moveToEndOfDocument:withHistory:) || action == @selector(_moveToEndOfLine:withHistory:) || action == @selector(_moveToEndOfParagraph:withHistory:)
    28982897        || action == @selector(_moveToEndOfWord:withHistory:) || action == @selector(_moveToStartOfDocument:withHistory:) || action == @selector(_moveToStartOfLine:withHistory:)
    2899         || action == @selector(_moveToStartOfParagraph:withHistory:) || action == @selector(_moveToStartOfWord:withHistory:) || action == @selector(_moveUp:withHistory:)
     2898        || action == @selector(_moveToStartOfParagraph:withHistory:) || action == @selector(_moveToStartOfWord:withHistory:) || action == @selector(_moveUp:withHistory:))
     2899        return YES;
     2900
     2901    if (action == @selector(_deleteByWord) || action == @selector(_deleteForwardAndNotify:) || action == @selector(_deleteToEndOfParagraph) || action == @selector(_deleteToStartOfLine)
    29002902        || action == @selector(_transpose))
    29012903        return editorState.isContentEditable;
Note: See TracChangeset for help on using the changeset viewer.