Title: [258711] trunk
Revision
258711
Author
cfleiz...@apple.com
Date
2020-03-19 10:45:37 -0700 (Thu, 19 Mar 2020)

Log Message

Source/WebCore:
AX: VO and safari: can't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html

If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners
and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.

* accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AccessibilityObject::hasTouchEventListener const):

LayoutTests:
AX: VO and safari: caan't press the play button
https://bugs.webkit.org/show_bug.cgi?id=209249

Reviewed by Darin Adler.

* accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt: Added.
* accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (258710 => 258711)


--- trunk/LayoutTests/ChangeLog	2020-03-19 17:44:22 UTC (rev 258710)
+++ trunk/LayoutTests/ChangeLog	2020-03-19 17:45:37 UTC (rev 258711)
@@ -1,3 +1,13 @@
+2020-03-19  Chris Fleizach  <cfleiz...@apple.com>
+
+        AX: VO and safari: caan't press the play button
+        https://bugs.webkit.org/show_bug.cgi?id=209249
+
+        Reviewed by Darin Adler.
+
+        * accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt: Added.
+        * accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.
+
 2020-03-19  Sihui Liu  <sihui_...@apple.com>
 
         Flaky Test: storage/indexeddb/cursor-leak.html and storage/indexeddb/cursor-leak-private.html

Added: trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt (0 => 258711)


--- trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt	2020-03-19 17:45:37 UTC (rev 258711)
@@ -0,0 +1,12 @@
+
+Make sure that the audio element shadow node elements have touch event listeners.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS button.boolAttributeValue('AXHasTouchEventListener') is true
+PASS button.description is 'AXLabel: Play'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow.html (0 => 258711)


--- trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow.html	2020-03-19 17:45:37 UTC (rev 258711)
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML><!-- webkit-test-runner [ enableModernMediaControls=true ] -->
+<html>
+<head>
+<script src=""
+<script src=""
+<script src=""
+<script>
+var successfullyParsed = false;
+</script>
+</head>
+<body _ontouchstart_="var x = 5;">
+
+<audio id="audio1" width=100 height=100 controls aria-label="Audio One" _onloadstart_="go();"></audio>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+    description("Make sure that the audio element shadow node elements have touch event listeners.");
+
+    window.jsTestIsAsync = true;
+    var audio = document.querySelector('audio');
+    audio.src = "" "../../../media/content/test");
+
+    var button;
+    var audioElement;
+    function go() {
+        if (window.accessibilityController) {
+            audioElement = accessibilityController.accessibleElementById("audio1");
+            button = audioElement.childAtIndex(0).childAtIndex(0);
+            shouldBeTrue("button.boolAttributeValue('AXHasTouchEventListener')");
+            shouldBe("button.description", "'AXLabel: Play'");
+            finishJSTest();
+        }
+    }
+
+    successfullyParsed = true;
+</script>
+
+<script src=""
+
+</body>
+</html>
+

Modified: trunk/Source/WebCore/ChangeLog (258710 => 258711)


--- trunk/Source/WebCore/ChangeLog	2020-03-19 17:44:22 UTC (rev 258710)
+++ trunk/Source/WebCore/ChangeLog	2020-03-19 17:45:37 UTC (rev 258711)
@@ -1,3 +1,18 @@
+2020-03-19  Chris Fleizach  <cfleiz...@apple.com>
+
+        AX: VO and safari: can't press the play button
+        https://bugs.webkit.org/show_bug.cgi?id=209249
+
+        Reviewed by Darin Adler.
+
+        Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html
+
+        If a node is in a shadowRoot, going up the node parent tree will stop and not check the entire tree for touch event listeners
+        and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.
+
+        * accessibility/ios/AccessibilityObjectIOS.mm:
+        (WebCore::AccessibilityObject::hasTouchEventListener const):
+
 2020-03-19  Andres Gonzalez  <andresg...@apple.com>
 
         [WebAccessibilityObjectWrapper remoteAccessibilityParentObject] must run on the main thread.

Modified: trunk/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm (258710 => 258711)


--- trunk/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm	2020-03-19 17:44:22 UTC (rev 258710)
+++ trunk/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm	2020-03-19 17:45:37 UTC (rev 258711)
@@ -82,7 +82,7 @@
 
 bool AccessibilityObject::hasTouchEventListener() const
 {
-    for (auto* node = this->node(); node; node = node->parentNode()) {
+    for (auto* node = this->node(); node; node = node->parentInComposedTree()) {
         if (node->hasEventListeners(eventNames().touchstartEvent) || node->hasEventListeners(eventNames().touchendEvent))
             return true;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to