WebKit Bugzilla
Attachment 361451 Details for
Bug 194415
: [iOS] Clicking links in Safari using Apple Pencil is much more difficult after r238475
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194415-20190207145024.patch (text/plain), 5.97 KB, created by
Wenson Hsieh
on 2019-02-07 14:50:24 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2019-02-07 14:50:24 PST
Size:
5.97 KB
patch
obsolete
>Subversion Revision: 241040 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index fb01eee83fa0e48a1b40d359062e9a748dbdfac5..f3ef47a15a0f7b01d48af0831e49aca74e3d804f 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,19 @@ >+2019-02-07 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Clicking links in Safari using Apple Pencil is much more difficult after r238475 >+ https://bugs.webkit.org/show_bug.cgi?id=194415 >+ <rdar://problem/47550281> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Fix the bug by not firing the Apple-pencil-exclusive tap gesture recognizer in the case where editable images >+ are disabled. This gesture recognizer is only used for inserting editable images, and currently conflicts with >+ the synthetic click gesture recognizer used to recognize clicks from generic digitizer inputs. >+ >+ * UIProcess/ios/WKContentViewInteraction.mm: >+ (-[WKContentView gestureRecognizerShouldBegin:]): >+ (-[WKContentView _stylusSingleTapRecognized:]): >+ > 2019-02-07 Wenson Hsieh <wenson_hsieh@apple.com> > > [iOS] [WK2] Modernize autocorrection context code >diff --git a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >index a747df9f8bf0d41f698ba86b8d42dd02461c1b95..a4e7fc1c3e77672af31ce1af35e3d9ad39e127ed 100644 >--- a/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >+++ b/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >@@ -1830,6 +1830,9 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer > { > CGPoint point = [gestureRecognizer locationInView:self]; > >+ if (gestureRecognizer == _stylusSingleTapGestureRecognizer) >+ return _webView._stylusTapGestureShouldCreateEditableImage; >+ > if (gestureRecognizer == _highlightLongPressGestureRecognizer > || gestureRecognizer == _doubleTapGestureRecognizer > || gestureRecognizer == _nonBlockingDoubleTapGestureRecognizer >@@ -2076,9 +2079,7 @@ - (void)_twoFingerSingleTapGestureRecognized:(UITapGestureRecognizer *)gestureRe > > - (void)_stylusSingleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer > { >- if (!_webView._stylusTapGestureShouldCreateEditableImage) >- return; >- >+ ASSERT(_webView._stylusTapGestureShouldCreateEditableImage); > ASSERT(gestureRecognizer == _stylusSingleTapGestureRecognizer); > _page->handleStylusSingleTapAtPoint(WebCore::roundedIntPoint(gestureRecognizer.location), ++_latestTapID); > } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index dcde0fc23cb6b2a4c2fe6981ed45fd2f7a6b7286..7f7bdcfaf319ed832e091849922cb13068e4b178 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,16 @@ >+2019-02-07 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] Clicking links in Safari using Apple Pencil is much more difficult after r238475 >+ https://bugs.webkit.org/show_bug.cgi?id=194415 >+ <rdar://problem/47550281> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add a layout test to verify that a stylus tap dispatches clicks. >+ >+ * fast/events/touch/ios/pencil-tap-dispatches-click-expected.txt: Added. >+ * fast/events/touch/ios/pencil-tap-dispatches-click.html: Added. >+ > 2019-02-06 David Kilzer <ddkilzer@apple.com> > > Revert part of r241015 that skipped all WebGL tests >diff --git a/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click-expected.txt b/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..a445f3e0264c4cda96a987372d7f8371e5d70af4 >--- /dev/null >+++ b/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click-expected.txt >@@ -0,0 +1,7 @@ >+PASS >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+Verifies that tapping an element with a stylus dispatches a click event. To manually test, tap the black square above and check that the text in the square reads 'PASS'. >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >diff --git a/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click.html b/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f30796fd883b5144b57c72c34ed70c6fa90eb800 >--- /dev/null >+++ b/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click.html >@@ -0,0 +1,51 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> >+ >+<html> >+<meta name="viewport" content="initial-scale=1, width=device-width"> >+<head> >+ <script src="../../../../resources/js-test.js"></script> >+ <style> >+ body { >+ margin: none; >+ } >+ >+ #target { >+ border: 1px black solid; >+ width: 200px; >+ height: 200px; >+ } >+ </style> >+</head> >+<body> >+ <div id="target">FAIL</div> >+ <div id="console"></div> >+ <p id="description"></p> >+ <script> >+ description("Verifies that tapping an element with a stylus dispatches a click event. To manually test, tap the black square above and check that the text in the square reads 'PASS'."); >+ jsTestIsAsync = true; >+ >+ function tapUsingStylus(x, y) { >+ return new Promise(resolve => { >+ testRunner.runUIScript(`(() => { >+ uiController.stylusDownAtPoint(${x}, ${y}, 0, 0, 0, () => { }); >+ uiController.stylusUpAtPoint(${x}, ${y}, () => uiController.uiScriptComplete()); >+ })()`, resolve); >+ }) >+ } >+ >+ async function runTest() { >+ if (window.testRunner) >+ await tapUsingStylus(100, 100); >+ } >+ >+ const target = document.getElementById("target"); >+ target.addEventListener("click", () => { >+ target.textContent = "PASS"; >+ finishJSTest(); >+ }); >+ >+ addEventListener("load", runTest, false); >+ </script> >+ <script src="../../../../resources/js-test-post.js"></script> >+</body> >+</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 194415
: 361451