Title: [247650] trunk
- Revision
- 247650
- Author
- commit-qu...@webkit.org
- Date
- 2019-07-19 12:47:54 -0700 (Fri, 19 Jul 2019)
Log Message
Links stop working after long-pressing a link (WK1)
https://bugs.webkit.org/show_bug.cgi?id=199952
<rdar://problem/52291860>
Patch by Antoine Quint <grao...@apple.com> on 2019-07-19
Reviewed by Wenson Hsieh.
Source/WebCore:
Test: fast/events/touch/ios/click-after-long-press.html
When EventHandler::tryToBeginDragAtPoint() is called, we must reset m_mousePressed to false so that
WebChromeClientIOS::observedContentChange() is called by EventHandler::mousePressed() when we would
process the next tap after a drag interaction.
* page/ios/EventHandlerIOS.mm:
(WebCore::EventHandler::tryToBeginDragAtPoint):
LayoutTests:
* fast/events/touch/ios/click-after-long-press-expected.txt: Added.
* fast/events/touch/ios/click-after-long-press.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (247649 => 247650)
--- trunk/LayoutTests/ChangeLog 2019-07-19 18:06:09 UTC (rev 247649)
+++ trunk/LayoutTests/ChangeLog 2019-07-19 19:47:54 UTC (rev 247650)
@@ -1,3 +1,14 @@
+2019-07-19 Antoine Quint <grao...@apple.com>
+
+ Links stop working after long-pressing a link (WK1)
+ https://bugs.webkit.org/show_bug.cgi?id=199952
+ <rdar://problem/52291860>
+
+ Reviewed by Wenson Hsieh.
+
+ * fast/events/touch/ios/click-after-long-press-expected.txt: Added.
+ * fast/events/touch/ios/click-after-long-press.html: Added.
+
2019-07-19 Alex Christensen <achristen...@webkit.org>
Rebase fast/forms/ios/typing-in-input-in-iframe.html after r244141
Added: trunk/LayoutTests/fast/events/touch/ios/click-after-long-press-expected.txt (0 => 247650)
--- trunk/LayoutTests/fast/events/touch/ios/click-after-long-press-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/click-after-long-press-expected.txt 2019-07-19 19:47:54 UTC (rev 247650)
@@ -0,0 +1 @@
+PASS
Added: trunk/LayoutTests/fast/events/touch/ios/click-after-long-press.html (0 => 247650)
--- trunk/LayoutTests/fast/events/touch/ios/click-after-long-press.html (rev 0)
+++ trunk/LayoutTests/fast/events/touch/ios/click-after-long-press.html 2019-07-19 19:47:54 UTC (rev 247650)
@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<html>
+<head>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ let ranAllSteps = false;
+
+ function longPress(continuation)
+ {
+ // We start by long-pressing on the target which should display a menu.
+ testRunner.runUIScript(`
+ (function() {
+ uiController.longPressAtPoint(100, 100, function() {
+ uiController.uiScriptComplete();
+ });
+ })();`, tapToDismiss);
+ }
+
+ function tapToDismiss()
+ {
+ // Then we tap to dismiss the panel.
+ testRunner.runUIScript(`
+ (function() {
+ uiController.singleTapAtPoint(0, 0, function() {
+ uiController.uiScriptComplete();
+ });
+ })();`, tapToClick);
+ }
+
+ function tapToClick()
+ {
+ // And tap again to trigger a click event.
+ document.getElementById('target').addEventListener("click", event => {
+ event.currentTarget.textContent = "PASS";
+ testRunner.notifyDone();
+ });
+
+ testRunner.runUIScript(`
+ (function() {
+ uiController.singleTapAtPoint(100, 100, function() {
+ uiController.uiScriptComplete();
+ });
+ })();`);
+ }
+
+ window.addEventListener('load', event => {
+ if (testRunner.runUIScript)
+ longPress();
+ });
+ </script>
+ <style>
+ #target {
+ height: 100px;
+ width: 200px;
+ }
+ </style>
+ <meta name="viewport" content="initial-scale=1">
+</head>
+<body>
+<div id="target">
+ <img src="" width="320" height="240" alt="Dice">
+ FAIL.
+</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (247649 => 247650)
--- trunk/Source/WebCore/ChangeLog 2019-07-19 18:06:09 UTC (rev 247649)
+++ trunk/Source/WebCore/ChangeLog 2019-07-19 19:47:54 UTC (rev 247650)
@@ -1,3 +1,20 @@
+2019-07-19 Antoine Quint <grao...@apple.com>
+
+ Links stop working after long-pressing a link (WK1)
+ https://bugs.webkit.org/show_bug.cgi?id=199952
+ <rdar://problem/52291860>
+
+ Reviewed by Wenson Hsieh.
+
+ Test: fast/events/touch/ios/click-after-long-press.html
+
+ When EventHandler::tryToBeginDragAtPoint() is called, we must reset m_mousePressed to false so that
+ WebChromeClientIOS::observedContentChange() is called by EventHandler::mousePressed() when we would
+ process the next tap after a drag interaction.
+
+ * page/ios/EventHandlerIOS.mm:
+ (WebCore::EventHandler::tryToBeginDragAtPoint):
+
2019-07-19 Sihui Liu <sihui_...@apple.com>
IndexedDB: error in starting version change transaction may be neglected
Modified: trunk/Source/WebCore/page/ios/EventHandlerIOS.mm (247649 => 247650)
--- trunk/Source/WebCore/page/ios/EventHandlerIOS.mm 2019-07-19 18:06:09 UTC (rev 247649)
+++ trunk/Source/WebCore/page/ios/EventHandlerIOS.mm 2019-07-19 19:47:54 UTC (rev 247650)
@@ -698,6 +698,9 @@
bool handledDrag = m_mouseDownMayStartDrag && handleMouseDraggedEvent(hitTestedMouseEvent, DontCheckDragHysteresis);
// Reset this bit to prevent autoscrolling from updating the selection with the last mouse location.
m_mouseDownMayStartSelect = false;
+ // Reset this bit to ensure that WebChromeClientIOS::observedContentChange() is called by EventHandler::mousePressed()
+ // when we would process the next tap after a drag interaction.
+ m_mousePressed = false;
return handledDrag;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes