Diff
Modified: trunk/LayoutTests/ChangeLog (248661 => 248662)
--- trunk/LayoutTests/ChangeLog 2019-08-14 03:38:07 UTC (rev 248661)
+++ trunk/LayoutTests/ChangeLog 2019-08-14 06:06:52 UTC (rev 248662)
@@ -1,3 +1,20 @@
+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 Saam Barati <sbar...@apple.com>
[WHLSL] Make lexing faster
Added: trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt (0 => 248662)
--- trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt (rev 0)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active-expected.txt 2019-08-14 06:06:52 UTC (rev 248662)
@@ -0,0 +1,3 @@
+
+PASS Disconnecting the capture element during a touch interaction redirects further pointer events to the hit-testing element.
+
Added: trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html (0 => 248662)
--- trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html (rev 0)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-element-removed-while-pointer-active.html 2019-08-14 06:06:52 UTC (rev 248662)
@@ -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: trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt (0 => 248662)
--- trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt (rev 0)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active-expected.txt 2019-08-14 06:06:52 UTC (rev 248662)
@@ -0,0 +1,3 @@
+
+PASS Releasing pointer capture during a touch interaction redirects further pointer events to the hit-testing element.
+
Added: trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html (0 => 248662)
--- trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html (rev 0)
+++ trunk/LayoutTests/pointerevents/ios/pointer-events-implicit-capture-released-while-pointer-active.html 2019-08-14 06:06:52 UTC (rev 248662)
@@ -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