Title: [258854] branches/safari-609-branch
Revision
258854
Author
repst...@apple.com
Date
2020-03-23 10:00:08 -0700 (Mon, 23 Mar 2020)

Log Message

Cherry-pick r258711. rdar://problem/60756645

    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.

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

Modified Paths

Added Paths

Diff

Modified: branches/safari-609-branch/LayoutTests/ChangeLog (258853 => 258854)


--- branches/safari-609-branch/LayoutTests/ChangeLog	2020-03-23 17:00:04 UTC (rev 258853)
+++ branches/safari-609-branch/LayoutTests/ChangeLog	2020-03-23 17:00:08 UTC (rev 258854)
@@ -1,4 +1,4 @@
-2020-03-17  Alan Coon  <alanc...@apple.com>
+b"2020-03-23  Russell Epstein  <repst...@apple.com>\n\n        Cherry-pick r258711. rdar://problem/60756645\n\n    Source/WebCore:\n    AX: VO and safari: can't press the play button\n    https://bugs.webkit.org/show_bug.cgi?id=209249\n    \n    Reviewed by Darin Adler.\n    \n    Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html\n    \n    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\n    and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.\n    \n    * accessibility/ios/AccessibilityObjectIOS.mm:\n    (WebCore::AccessibilityObject::hasTouchEventListener const):\n    \n    LayoutTests:\n    AX: VO and safari: caan't press the play button\n    https://bugs.webkit.org/show_bug.cgi?id=209249\n    \n    Reviewed by Darin Adler.\n    \n    * accessibility/ios-simulator/has-touch-event-listener-wit
 h-shadow-expected.txt: Added.\n    * accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.\n    \n    \n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258711 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n    2020-03-19  Chris Fleizach  <cfleiz...@apple.com>\n\n            AX: VO and safari: caan't press the play button\n            https://bugs.webkit.org/show_bug.cgi?id=209249\n\n            Reviewed by Darin Adler.\n\n            * accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt: Added.\n            * accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.\n\n"2020-03-17  Alan Coon  <alanc...@apple.com>
 
         Cherry-pick r258459. rdar://problem/60539192
 

Added: branches/safari-609-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt (0 => 258854)


--- branches/safari-609-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt	                        (rev 0)
+++ branches/safari-609-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow-expected.txt	2020-03-23 17:00:08 UTC (rev 258854)
@@ -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: branches/safari-609-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow.html (0 => 258854)


--- branches/safari-609-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow.html	                        (rev 0)
+++ branches/safari-609-branch/LayoutTests/accessibility/ios-simulator/has-touch-event-listener-with-shadow.html	2020-03-23 17:00:08 UTC (rev 258854)
@@ -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: branches/safari-609-branch/Source/WebCore/ChangeLog (258853 => 258854)


--- branches/safari-609-branch/Source/WebCore/ChangeLog	2020-03-23 17:00:04 UTC (rev 258853)
+++ branches/safari-609-branch/Source/WebCore/ChangeLog	2020-03-23 17:00:08 UTC (rev 258854)
@@ -1,4 +1,4 @@
-2020-03-17  Alan Coon  <alanc...@apple.com>
+b"2020-03-23  Russell Epstein  <repst...@apple.com>\n\n        Cherry-pick r258711. rdar://problem/60756645\n\n    Source/WebCore:\n    AX: VO and safari: can't press the play button\n    https://bugs.webkit.org/show_bug.cgi?id=209249\n    \n    Reviewed by Darin Adler.\n    \n    Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html\n    \n    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\n    and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.\n    \n    * accessibility/ios/AccessibilityObjectIOS.mm:\n    (WebCore::AccessibilityObject::hasTouchEventListener const):\n    \n    LayoutTests:\n    AX: VO and safari: caan't press the play button\n    https://bugs.webkit.org/show_bug.cgi?id=209249\n    \n    Reviewed by Darin Adler.\n    \n    * accessibility/ios-simulator/has-touch-event-listener-wit
 h-shadow-expected.txt: Added.\n    * accessibility/ios-simulator/has-touch-event-listener-with-shadow.html: Added.\n    \n    \n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258711 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n    2020-03-19  Chris Fleizach  <cfleiz...@apple.com>\n\n            AX: VO and safari: can't press the play button\n            https://bugs.webkit.org/show_bug.cgi?id=209249\n\n            Reviewed by Darin Adler.\n\n            Test: accessibility/ios-simulator/has-touch-event-listener-with-shadow.html\n\n            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\n            and a touch event won't be dispatched. We need to change to use the parentInComposedTree instead to go up the chain.\n\n            * accessibility/ios/AccessibilityObjectIOS.mm:\n            (WebCore::AccessibilityObject::hasTouchEventListener const):\n\n"2020-03-17  Alan Coon  <ala
 nc...@apple.com>
 
         Apply patch. rdar://problem/60396271
 

Modified: branches/safari-609-branch/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm (258853 => 258854)


--- branches/safari-609-branch/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm	2020-03-23 17:00:04 UTC (rev 258853)
+++ branches/safari-609-branch/Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm	2020-03-23 17:00:08 UTC (rev 258854)
@@ -77,7 +77,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