Title: [241187] branches/safari-607-branch
- Revision
- 241187
- Author
- [email protected]
- Date
- 2019-02-07 21:36:25 -0800 (Thu, 07 Feb 2019)
Log Message
Cherry-pick r241171. rdar://problem/47908156
[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 Tim Horton.
Source/WebKit:
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:]):
LayoutTests:
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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-607-branch/LayoutTests/ChangeLog (241186 => 241187)
--- branches/safari-607-branch/LayoutTests/ChangeLog 2019-02-08 05:36:21 UTC (rev 241186)
+++ branches/safari-607-branch/LayoutTests/ChangeLog 2019-02-08 05:36:25 UTC (rev 241187)
@@ -1,5 +1,48 @@
2019-02-07 Babak Shafiei <[email protected]>
+ Cherry-pick r241171. rdar://problem/47908156
+
+ [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 Tim Horton.
+
+ Source/WebKit:
+
+ 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:]):
+
+ LayoutTests:
+
+ 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.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-02-07 Wenson Hsieh <[email protected]>
+
+ [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 Tim Horton.
+
+ 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-07 Babak Shafiei <[email protected]>
+
Cherry-pick r241150. rdar://problem/47908154
Overflow element scrollbar is light for dark mode content.
Added: branches/safari-607-branch/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click-expected.txt (0 => 241187)
--- branches/safari-607-branch/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click-expected.txt (rev 0)
+++ branches/safari-607-branch/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click-expected.txt 2019-02-08 05:36:25 UTC (rev 241187)
@@ -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".
Added: branches/safari-607-branch/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click.html (0 => 241187)
--- branches/safari-607-branch/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click.html (rev 0)
+++ branches/safari-607-branch/LayoutTests/fast/events/touch/ios/pencil-tap-dispatches-click.html 2019-02-08 05:36:25 UTC (rev 241187)
@@ -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=""
+ <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=""
+</body>
+</html>
Modified: branches/safari-607-branch/Source/WebKit/ChangeLog (241186 => 241187)
--- branches/safari-607-branch/Source/WebKit/ChangeLog 2019-02-08 05:36:21 UTC (rev 241186)
+++ branches/safari-607-branch/Source/WebKit/ChangeLog 2019-02-08 05:36:25 UTC (rev 241187)
@@ -1,5 +1,51 @@
2019-02-07 Babak Shafiei <[email protected]>
+ Cherry-pick r241171. rdar://problem/47908156
+
+ [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 Tim Horton.
+
+ Source/WebKit:
+
+ 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:]):
+
+ LayoutTests:
+
+ 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.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-02-07 Wenson Hsieh <[email protected]>
+
+ [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 Tim Horton.
+
+ 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 Babak Shafiei <[email protected]>
+
Cherry-pick r241143. rdar://problem/47908161
Permit additional IOKit Properties needed by Media PlugIns on older Mac Hardware
Modified: branches/safari-607-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (241186 => 241187)
--- branches/safari-607-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-02-08 05:36:21 UTC (rev 241186)
+++ branches/safari-607-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2019-02-08 05:36:25 UTC (rev 241187)
@@ -1730,6 +1730,9 @@
{
CGPoint point = [gestureRecognizer locationInView:self];
+ if (gestureRecognizer == _stylusSingleTapGestureRecognizer)
+ return _webView._stylusTapGestureShouldCreateEditableImage;
+
if (gestureRecognizer == _highlightLongPressGestureRecognizer
|| gestureRecognizer == _doubleTapGestureRecognizer
|| gestureRecognizer == _nonBlockingDoubleTapGestureRecognizer
@@ -1976,9 +1979,7 @@
- (void)_stylusSingleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
{
- if (!_webView._stylusTapGestureShouldCreateEditableImage)
- return;
-
+ ASSERT(_webView._stylusTapGestureShouldCreateEditableImage);
ASSERT(gestureRecognizer == _stylusSingleTapGestureRecognizer);
_page->handleStylusSingleTapAtPoint(WebCore::roundedIntPoint(gestureRecognizer.location), ++_latestTapID);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes