Changeset 232040 in webkit


Ignore:
Timestamp:
May 21, 2018 5:19:28 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Source/WebKit:
[iOS] Click events only fire once when editing
https://bugs.webkit.org/show_bug.cgi?id=185777

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-05-21
Reviewed by Tim Horton.

gestureRecognizerShouldBegin: was returning false for the single tap gesture when a node was being
edited. This is an artifact of how the gesture was previously handled with the text selection assistant.
This condition is now removed, allowing the single tap gesture to go through and correctly propagate the
click event.

Also added an early return to _didGetTapHighlightForRequest: in order to prevent the tap highlight from
being shown when the node is already being assisted.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
(-[WKContentView gestureRecognizerShouldBegin:]):

LayoutTests:
Added test to verify behaviour when tapping multiple times on an editable node.
https://bugs.webkit.org/show_bug.cgi?id=185777

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-05-21
Reviewed by Tim Horton.

  • fast/events/ios/click-event-while-editing-node-expected.txt: Added.
  • fast/events/ios/click-event-while-editing-node.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r232037 r232040  
     12018-05-21  Aditya Keerthi  <akeerthi@apple.com>
     2
     3        Added test to verify behaviour when tapping multiple times on an editable node.
     4        https://bugs.webkit.org/show_bug.cgi?id=185777
     5
     6        Reviewed by Tim Horton.
     7
     8        * fast/events/ios/click-event-while-editing-node-expected.txt: Added.
     9        * fast/events/ios/click-event-while-editing-node.html: Added.
     10
    1112018-05-21  Commit Queue  <commit-queue@webkit.org>
    212
  • trunk/Source/WebKit/ChangeLog

    r232032 r232040  
     12018-05-21  Aditya Keerthi  <akeerthi@apple.com>
     2
     3        [iOS] Click events only fire once when editing
     4        https://bugs.webkit.org/show_bug.cgi?id=185777
     5
     6        Reviewed by Tim Horton.
     7
     8        gestureRecognizerShouldBegin: was returning false for the single tap gesture when a node was being
     9        edited. This is an artifact of how the gesture was previously handled with the text selection assistant.
     10        This condition is now removed, allowing the single tap gesture to go through and correctly propagate the
     11        click event.
     12
     13        Also added an early return to _didGetTapHighlightForRequest: in order to prevent the tap highlight from
     14        being shown when the node is already being assisted.
     15
     16        * UIProcess/ios/WKContentViewInteraction.mm:
     17        (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
     18        (-[WKContentView gestureRecognizerShouldBegin:]):
     19
    1202018-05-21  Daniel Bates  <dabates@apple.com>
    221
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r231810 r232040  
    11761176        return;
    11771177
     1178    if (_potentialTapInProgress && hasAssistedNode(_assistedNodeInformation) && _positionInformation.nodeAtPositionIsAssistedNode)
     1179        return;
     1180
    11781181    _isTapHighlightIDValid = NO;
    11791182
     
    15471550        || gestureRecognizer == _doubleTapGestureRecognizer
    15481551        || gestureRecognizer == _nonBlockingDoubleTapGestureRecognizer
    1549         || gestureRecognizer == _twoFingerDoubleTapGestureRecognizer
    1550         || gestureRecognizer == _singleTapGestureRecognizer) {
     1552        || gestureRecognizer == _twoFingerDoubleTapGestureRecognizer) {
    15511553
    15521554        if (hasAssistedNode(_assistedNodeInformation)) {
Note: See TracChangeset for help on using the changeset viewer.