Title: [248724] branches/safari-608-branch/LayoutTests
Revision
248724
Author
alanc...@apple.com
Date
2019-08-15 10:20:57 -0700 (Thu, 15 Aug 2019)

Log Message

Cherry-pick r248662. rdar://problem/54333792

    [iPadOS] slides.google.com: Cannot dismiss the context menu by tapping on the canvas
    https://bugs.webkit.org/show_bug.cgi?id=200219
    <rdar://problem/53650423>

    Reviewed by Zalan Bujtas.

    While the code change for this bug is all in code private to Safari, we add tests that check that removing implicit pointer capture
    or removing the original target element while the pointer is active correctly fires the "pointerup" event at the element that hit tests
    at the touch release point.

    * pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt: Added.
    * pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html: Added.
    * pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt: Added.
    * pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html: Added.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248662 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-608-branch/LayoutTests/ChangeLog (248723 => 248724)


--- branches/safari-608-branch/LayoutTests/ChangeLog	2019-08-15 17:20:52 UTC (rev 248723)
+++ branches/safari-608-branch/LayoutTests/ChangeLog	2019-08-15 17:20:57 UTC (rev 248724)
@@ -1,3 +1,41 @@
+2019-08-15  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r248662. rdar://problem/54333792
+
+    [iPadOS] slides.google.com: Cannot dismiss the context menu by tapping on the canvas
+    https://bugs.webkit.org/show_bug.cgi?id=200219
+    <rdar://problem/53650423>
+    
+    Reviewed by Zalan Bujtas.
+    
+    While the code change for this bug is all in code private to Safari, we add tests that check that removing implicit pointer capture
+    or removing the original target element while the pointer is active correctly fires the "pointerup" event at the element that hit tests
+    at the touch release point.
+    
+    * pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt: Added.
+    * pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html: Added.
+    * pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt: Added.
+    * pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html: Added.
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-13  Antoine Quint  <grao...@apple.com>
+
+            [iPadOS] slides.google.com: Cannot dismiss the context menu by tapping on the canvas
+            https://bugs.webkit.org/show_bug.cgi?id=200219
+            <rdar://problem/53650423>
+
+            Reviewed by Zalan Bujtas.
+
+            While the code change for this bug is all in code private to Safari, we add tests that check that removing implicit pointer capture
+            or removing the original target element while the pointer is active correctly fires the "pointerup" event at the element that hit tests
+            at the touch release point.
+
+            * pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt: Added.
+            * pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html: Added.
+            * pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt: Added.
+            * pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html: Added.
+
 2019-08-13  Alan Coon  <alanc...@apple.com>
 
         Cherry-pick r248604. rdar://problem/54282801

Added: branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt (0 => 248724)


--- branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt	                        (rev 0)
+++ branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt	2019-08-15 17:20:57 UTC (rev 248724)
@@ -0,0 +1,3 @@
+
+PASS Disconnecting the capture element during a touch interaction redirects further pointer events to the hit-testing element. 
+

Added: branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html (0 => 248724)


--- branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html	                        (rev 0)
+++ branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html	2019-08-15 17:20:57 UTC (rev 248724)
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body style="width: 800px; height: 600px;">
+<script src=""
+<script src=""
+<script src=""
+<script>
+
+'use strict';
+
+target_test((target, test) => {
+    document.body.addEventListener("pointerup", event => {
+        assert_equals(event.target, event.currentTarget, "The pointerup event was fired at the body and not a child element.");
+        test.done();
+    });
+    target.addEventListener("pointerdown", event => target.remove());
+    target.style.touchAction = "none";
+
+    // Tap on the target element, which will remove the target element as the pointerdown event is handled,
+    // which should fire the pointerup event at the body, not the target.
+    ui.tap({ x: 50, y: 50 });
+}, "Disconnecting the capture element during a touch interaction redirects further pointer events to the hit-testing element.");
+
+</script>
+</body>
+</html>
\ No newline at end of file

Added: branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt (0 => 248724)


--- branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt	                        (rev 0)
+++ branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt	2019-08-15 17:20:57 UTC (rev 248724)
@@ -0,0 +1,3 @@
+
+PASS Releasing pointer capture during a touch interaction redirects further pointer events to the hit-testing element. 
+

Added: branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html (0 => 248724)


--- branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html	                        (rev 0)
+++ branches/safari-608-branch/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html	2019-08-15 17:20:57 UTC (rev 248724)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+</head>
+<body style="width: 800px; height: 600px;">
+<script src=""
+<script src=""
+<script src=""
+<script>
+
+'use strict';
+
+target_test({ width: "200px", height: "200px" }, (target, test) => {
+    document.body.addEventListener("pointerup", event => {
+        assert_equals(event.target, event.currentTarget, "The pointerup event was fired at the body and not a child element.");
+        test.done();
+    });
+    target.addEventListener("pointerdown", event => target.releasePointerCapture(event.pointerId));
+    target.style.touchAction = "none";
+
+    // Start the touch sequence over the target element, which will release pointer capture, then move off
+    // of it before releasing the touch, which should fire the pointerup event at the body, not the target.
+    const _one_ = ui.finger();
+    ui.sequence([
+        one.begin({ x: 50, y: 50 }),
+        one.move({ x: 250, y: 250 }),
+        one.end()
+    ]);
+}, "Releasing pointer capture during a touch interaction redirects further pointer events to the hit-testing element.");
+
+</script>
+</body>
+</html>
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to