WebKit Bugzilla
Attachment 340738 Details for
Bug 185777
: Click events only fire once when editing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185777-20180518143659.patch (text/plain), 5.54 KB, created by
Aditya Keerthi
on 2018-05-18 14:37:00 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aditya Keerthi
Created:
2018-05-18 14:37:00 PDT
Size:
5.54 KB
patch
obsolete
>Subversion Revision: 231387 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index dff61eb74030c77c8490608d234179627de341fd..6d8973a01a3698ad3e16ff0a63a8f34f5fbc1ca8 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,22 @@ >+2018-05-18 Aditya Keerthi <akeerthi@apple.com> >+ >+ [iOS] Click events only fire once when editing >+ https://bugs.webkit.org/show_bug.cgi?id=185777 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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:]): >+ > 2018-05-04 Don Olmstead <don.olmstead@sony.com> > > [Win][WebKit] Fix forwarding headers for Windows build >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index c6bf0a97296f6b1c133cb6e9ff5579305de6e3d8..ab730ae6badcd3f78415df0ae9f9e3809c4fe8a0 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -1176,6 +1176,9 @@ static NSValue *nsSizeForTapHighlightBorderRadius(WebCore::IntSize borderRadius, > if (!_isTapHighlightIDValid || _latestTapID != requestID) > return; > >+ if (_potentialTapInProgress && hasAssistedNode(_assistedNodeInformation) && _positionInformation.nodeAtPositionIsAssistedNode) >+ return; >+ > _isTapHighlightIDValid = NO; > > _tapHighlightInformation.quads = highlightedQuads; >@@ -1547,8 +1550,7 @@ static inline bool isSamePair(UIGestureRecognizer *a, UIGestureRecognizer *b, UI > if (gestureRecognizer == _highlightLongPressGestureRecognizer > || gestureRecognizer == _doubleTapGestureRecognizer > || gestureRecognizer == _nonBlockingDoubleTapGestureRecognizer >- || gestureRecognizer == _twoFingerDoubleTapGestureRecognizer >- || gestureRecognizer == _singleTapGestureRecognizer) { >+ || gestureRecognizer == _twoFingerDoubleTapGestureRecognizer) { > > if (hasAssistedNode(_assistedNodeInformation)) { > // Request information about the position with sync message. >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 0cb60a7d0bb5a02cb5ddb48f309fe58656c87803..be3e07564ddd10c0b4db040af830cd6151951571 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-05-18 Aditya Keerthi <akeerthi@apple.com> >+ >+ Added test to verify behaviour when tapping multiple times on an editable node. >+ https://bugs.webkit.org/show_bug.cgi?id=185777 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/events/ios/click-event-while-editing-node-expected.txt: Added. >+ * fast/events/ios/click-event-while-editing-node.html: Added. >+ > 2018-05-04 Ryan Haddad <ryanhaddad@apple.com> > > Mark animations/duplicate-keys.html as flaky on iOS. >diff --git a/LayoutTests/fast/events/ios/click-event-while-editing-node-expected.txt b/LayoutTests/fast/events/ios/click-event-while-editing-node-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..15e86ab7c9028d8d87c17b050af29628332d9e85 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/click-event-while-editing-node-expected.txt >@@ -0,0 +1,9 @@ >+PASS document.getElementById('clicks').textContent is "2" >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+The click event should be fired on a node that is being edited. >+ >+The click count in the editable node is: 2 >+ >+Click me! >diff --git a/LayoutTests/fast/events/ios/click-event-while-editing-node.html b/LayoutTests/fast/events/ios/click-event-while-editing-node.html >new file mode 100644 >index 0000000000000000000000000000000000000000..4de09dc130657eca42b4abd63272b42ca92af8b2 >--- /dev/null >+++ b/LayoutTests/fast/events/ios/click-event-while-editing-node.html >@@ -0,0 +1,36 @@ >+<!DOCTYPE html> >+<html> >+<head> >+ <meta name="viewport" content="width=device-width, initial-scale=1"> >+ <script src="../../../resources/js-test-pre.js"></script> >+ <script src="../../../resources/ui-helper.js"></script> >+</head> >+<body> >+ <div id="description"> >+ <p>The click event should be fired on a node that is being edited.</p> >+ <p>The click count in the editable node is: <span id="clicks">0</span></p> >+ </div> >+ <div id="editable" contenteditable="true" style="width: 100%; height: 500px; border:1px solid black;"> >+ <p>Click me!</p> >+ </div> >+</body> >+<script> >+clickCount = 0; >+editable.addEventListener("click", function(){ >+ clickCount += 1; >+ clicks.textContent = clickCount; >+}); >+ >+if (window.testRunner) { >+ testRunner.dumpAsText(); >+ jsTestIsAsync = true; >+ UIHelper.activateAndWaitForInputSessionAt(50, 300).then(() => { >+ UIHelper.tapAt(50, 300).then(() => { >+ shouldBeEqualToString("document.getElementById('clicks').textContent", `${clickCount}`); >+ finishJSTest(); >+ }); >+ }); >+} >+</script> >+<script src="../../../resources/js-test-post.js"></script> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185777
:
340726
| 340738