Title: [293006] trunk
Revision
293006
Author
[email protected]
Date
2022-04-18 20:25:12 -0700 (Mon, 18 Apr 2022)

Log Message

AX: Update the isolated tree in response to AXElementBusyChanged and AXTextChanged notifications
https://bugs.webkit.org/show_bug.cgi?id=239434

Reviewed by Chris Fleizach.

Source/WebCore:

We need to update the isolated tree in response to these notifications.

This patch also makes AccessibilityNodeObjects (e.g. for display:contents elements)
properly report AXCoreObject::isBusy by moving AccessibilityRenderObject's implementation
to AccessibilityNodeObject. This also required AccessibilityRenderObject::elementAttributeValue
to move as well.

Tests: accessibility/text-updates-after-dynamic-change.html
       accessibility/aria-busy-updates-after-dynamic-change.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::updateIsolatedTree):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isBusy const):
Moved from AccessibilityRenderObject.
(WebCore::AccessibilityNodeObject::elementAttributeValue const):
Moved from AccessibilityRenderObject.
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setElementAttributeValue):
Delete this method as it was unused.
(WebCore::AccessibilityRenderObject::elementAttributeValue const):
Moved to AccessibilityNodeObject.
(WebCore::AccessibilityRenderObject::isBusy const):
Moved to AccessibilityNodeObject.
* accessibility/AccessibilityRenderObject.h:

Tools:

Added necessary tooling to enable querying AX object busy state for
the test added with this patch.

* DumpRenderTree/AccessibilityUIElement.cpp:
(getIsBusyCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::isBusy const):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::isBusy const):
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::isBusy const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
(WTR::AccessibilityUIElement::isBusy const):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::isBusy const):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::isBusy const):
* WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
(WTR::AccessibilityUIElement::isBusy const):

LayoutTests:

* accessibility/text-updates-after-dynamic-change-expected.txt: Added.
* accessibility/text-updates-after-dynamic-change.html: Added.
* accessibility/aria-busy-updates-after-dynamic-change-expected.txt: Added.
* accessibility/aria-busy-updates-after-dynamic-change.html: Added.
* platform/glib/TestExpectations:
Skip new test.
* platform/ios/TestExpectations:
Enable new tests.
* platform/ios/accessibility/text-updates-after-dynamic-change-expected.txt: Added.
* platform/win/TestExpectations:
Skip aria-busy-updates-after-dynamic-change.html.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (293005 => 293006)


--- trunk/LayoutTests/ChangeLog	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/LayoutTests/ChangeLog	2022-04-19 03:25:12 UTC (rev 293006)
@@ -1,3 +1,22 @@
+2022-04-18  Tyler Wilcock  <[email protected]>
+
+        AX: Update the isolated tree in response to AXElementBusyChanged and AXTextChanged notifications
+        https://bugs.webkit.org/show_bug.cgi?id=239434
+
+        Reviewed by Chris Fleizach.
+
+        * accessibility/text-updates-after-dynamic-change-expected.txt: Added.
+        * accessibility/text-updates-after-dynamic-change.html: Added.
+        * accessibility/aria-busy-updates-after-dynamic-change-expected.txt: Added.
+        * accessibility/aria-busy-updates-after-dynamic-change.html: Added.
+        * platform/glib/TestExpectations:
+        Skip new test.
+        * platform/ios/TestExpectations:
+        Enable new tests.
+        * platform/ios/accessibility/text-updates-after-dynamic-change-expected.txt: Added.
+        * platform/win/TestExpectations:
+        Skip aria-busy-updates-after-dynamic-change.html.
+
 2022-04-18  Wenson Hsieh  <[email protected]>
 
         [iOS] fast/events/touch/force-press-event.html fails on iPhones with top safe area insets

Added: trunk/LayoutTests/accessibility/aria-busy-updates-after-dynamic-change-expected.txt (0 => 293006)


--- trunk/LayoutTests/accessibility/aria-busy-updates-after-dynamic-change-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/aria-busy-updates-after-dynamic-change-expected.txt	2022-04-19 03:25:12 UTC (rev 293006)
@@ -0,0 +1,24 @@
+This test ensures that an element's busy state updates aria-busy changes.
+
+Verifying initial busy state:
+
+#clock is busy: false
+#clock-display-contents is busy: false
+
+Setting aria-busy to true.
+
+#clock is busy: true
+#clock-display-contents is busy: true
+
+Setting aria-busy to false.
+
+#clock is busy: false
+#clock-display-contents is busy: false
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+2:30pm
+4:30pm
+

Added: trunk/LayoutTests/accessibility/aria-busy-updates-after-dynamic-change.html (0 => 293006)


--- trunk/LayoutTests/accessibility/aria-busy-updates-after-dynamic-change.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/aria-busy-updates-after-dynamic-change.html	2022-04-19 03:25:12 UTC (rev 293006)
@@ -0,0 +1,52 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+
+<div id="clock" role="timer" aria-live="polite" aria-atomic="true">2:30pm</div>
+<div id="clock-display-contents" style="display: contents" role="timer" aria-live="polite" aria-atomic="true">4:30pm</div>
+
+<script>
+    var testOutput = "This test ensures that an element's busy state updates aria-busy changes.\n\n";
+
+    var axClock, axClockWithDisplayContents;
+    function verifyElements() {
+        testOutput += `#clock is busy: ${axClock.isBusy}\n`;
+        testOutput += `#clock-display-contents is busy: ${axClockWithDisplayContents.isBusy}\n\n`;
+    }
+
+    if (window.accessibilityController) {
+        window.jsTestIsAsync = true;
+        axClock = accessibilityController.accessibleElementById("clock");
+        axClockWithDisplayContents = accessibilityController.accessibleElementById("clock-display-contents");
+
+        testOutput += "Verifying initial busy state:\n\n";
+        verifyElements();
+
+        const clock = document.getElementById("clock");
+        const clockWithDisplayContents = document.getElementById("clock-display-contents");
+
+        testOutput += "Setting aria-busy to true.\n\n";
+        clock.ariaBusy = "true";
+        clockWithDisplayContents.ariaBusy = "true";
+        setTimeout(async function() {
+            await waitFor(() => { return axClock.isBusy && axClockWithDisplayContents.isBusy });
+            verifyElements();
+
+            testOutput += "Setting aria-busy to false.\n\n";
+            clock.ariaBusy = "false";
+            clockWithDisplayContents.ariaBusy = "false";
+            await waitFor(() => { return !axClock.isBusy && !axClockWithDisplayContents.isBusy });
+            verifyElements();
+
+            debug(testOutput);
+            finishJSTest();
+        }, 0);
+    }
+</script>
+</body>
+</html>
+

Added: trunk/LayoutTests/accessibility/text-updates-after-dynamic-change-expected.txt (0 => 293006)


--- trunk/LayoutTests/accessibility/text-updates-after-dynamic-change-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/accessibility/text-updates-after-dynamic-change-expected.txt	2022-04-19 03:25:12 UTC (rev 293006)
@@ -0,0 +1,19 @@
+This test ensures object accessibility text updates after a dynamic change (e.g. via _javascript_).
+
+Initial button descriptions:
+
+#aria-label-button AXDescription:
+#aria-labelledby-button AXDescription:
+#title-button AXDescription:
+
+Final button descriptions:
+
+#aria-label-button AXDescription: aria-label provided description
+#aria-labelledby-button AXDescription: aria-labelledby provided description
+#title-button AXDescription: title provided description
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+  aria-labelledby provided description

Added: trunk/LayoutTests/accessibility/text-updates-after-dynamic-change.html (0 => 293006)


--- trunk/LayoutTests/accessibility/text-updates-after-dynamic-change.html	                        (rev 0)
+++ trunk/LayoutTests/accessibility/text-updates-after-dynamic-change.html	2022-04-19 03:25:12 UTC (rev 293006)
@@ -0,0 +1,53 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+<script src=""
+</head>
+<body>
+
+<button id="aria-label-button"></button>
+<button id="aria-labelledby-button"></button>
+<span id="label">aria-labelledby provided description</span>
+<button id="title-button"></button>
+
+<script>
+    var testOutput = "This test ensures object accessibility text updates after a dynamic change (e.g. via _javascript_).\n\n";
+    var ariaLabelButton, ariaLabelledByButton, titleButton;
+
+    function verifyButtons() {
+        testOutput += `#aria-label-button ${ariaLabelButton.description}\n`;
+        testOutput += `#aria-labelledby-button ${ariaLabelledByButton.description}\n`;
+        testOutput += `#title-button ${titleButton.description}\n\n`;
+    }
+
+    if (window.accessibilityController) {
+        window.jsTestIsAsync = true;
+
+        ariaLabelButton = accessibilityController.accessibleElementById("aria-label-button");
+        ariaLabelledByButton = accessibilityController.accessibleElementById("aria-labelledby-button");
+        titleButton = accessibilityController.accessibleElementById("title-button");
+        testOutput += "Initial button descriptions:\n\n";
+        verifyButtons();
+
+        document.getElementById("aria-label-button").ariaLabel = "aria-label provided description";
+        document.getElementById("aria-labelledby-button").setAttribute("aria-labelledby", "label");
+        document.getElementById("title-button").title = "title provided description";
+        setTimeout(async function() {
+            await waitFor(() => {
+                return ariaLabelButton.description.includes("aria-label")
+                    && ariaLabelledByButton.description.includes("aria-labelledby")
+                    && titleButton.description.includes("title");
+            });
+            testOutput += "Final button descriptions:\n\n";
+            verifyButtons();
+
+            debug(testOutput);
+            finishJSTest();
+        }, 0);
+    }
+</script>
+</body>
+</html>
+
+

Modified: trunk/LayoutTests/platform/glib/TestExpectations (293005 => 293006)


--- trunk/LayoutTests/platform/glib/TestExpectations	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/LayoutTests/platform/glib/TestExpectations	2022-04-19 03:25:12 UTC (rev 293006)
@@ -341,6 +341,12 @@
 # Need to implement AccessibilityUIElement::domIdentifier() for this test to pass after webkit.org/b/234198.
 accessibility/focusable-div.html [ Skip ]
 
+# Missing AccessibilityUIElement::isBusy implementation.
+accessibility/aria-busy-updates-after-dynamic-change.html [ Skip ]
+
+# Timing out since it was added in https://bugs.webkit.org/show_bug.cgi?id=239434.
+accessibility/text-updates-after-dynamic-change.html [ Skip ]
+
 # Missing AccessibilityUIElement::uiElementForSearchPredicate implementation.
 accessibility/display-contents-search-traversal.html [ Skip ]
 accessibility/search-traversal-after-role-change.html [ Skip ]

Modified: trunk/LayoutTests/platform/ios/TestExpectations (293005 => 293006)


--- trunk/LayoutTests/platform/ios/TestExpectations	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-04-19 03:25:12 UTC (rev 293006)
@@ -2107,6 +2107,7 @@
 # Enable "phone number linkifying" test for iOS
 fast/dom/linkify-phone-numbers.html [ Pass ]
 
+accessibility/aria-busy-updates-after-dynamic-change.html [ Pass ]
 accessibility/aria-hidden-display-contents-element.html [ Pass ]
 accessibility/aria-readonly-updates-after-dynamic-change.html [ Pass ]
 accessibility/aria-required-updates-after-dynamic-change.html [ Pass ]
@@ -2113,6 +2114,7 @@
 accessibility/display-contents-element-roles.html [ Pass ]
 accessibility/list-with-dynamically-changing-content.html [ Pass ]
 accessibility/node-only-object-element-rect.html [ Pass ]
+accessibility/text-updates-after-dynamic-change.html [ Pass ]
 accessibility/video-element-url-attribute.html [ Pass ]
 accessibility/visible-character-range-basic.html [ Pass ]
 accessibility/visible-character-range-height-changes.html [ Pass ]

Added: trunk/LayoutTests/platform/ios/accessibility/text-updates-after-dynamic-change-expected.txt (0 => 293006)


--- trunk/LayoutTests/platform/ios/accessibility/text-updates-after-dynamic-change-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/ios/accessibility/text-updates-after-dynamic-change-expected.txt	2022-04-19 03:25:12 UTC (rev 293006)
@@ -0,0 +1,19 @@
+This test ensures object accessibility text updates after a dynamic change (e.g. via _javascript_).
+
+Initial button descriptions:
+
+#aria-label-button AXLabel:
+#aria-labelledby-button AXLabel:
+#title-button AXLabel:
+
+Final button descriptions:
+
+#aria-label-button AXLabel: aria-label provided description
+#aria-labelledby-button AXLabel: aria-labelledby provided description
+#title-button AXLabel: title provided description
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+  aria-labelledby provided description

Modified: trunk/LayoutTests/platform/win/TestExpectations (293005 => 293006)


--- trunk/LayoutTests/platform/win/TestExpectations	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/LayoutTests/platform/win/TestExpectations	2022-04-19 03:25:12 UTC (rev 293006)
@@ -492,6 +492,8 @@
 accessibility/aria-readonly-updates-after-dynamic-change.html [ Skip ]
 # Missing AccessibilityUIElement::isRequired implementation.
 accessibility/aria-required-updates-after-dynamic-change.html [ Skip ]
+# Missing AccessibilityUIElement::isBusy implementation.
+accessibility/aria-busy-updates-after-dynamic-change.html [ Skip ]
 
 # TODO Conic gradients
 http/wpt/css/css-images-4/conic-gradient-parsing.html [ Skip ]

Modified: trunk/Source/WebCore/ChangeLog (293005 => 293006)


--- trunk/Source/WebCore/ChangeLog	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Source/WebCore/ChangeLog	2022-04-19 03:25:12 UTC (rev 293006)
@@ -1,3 +1,37 @@
+2022-04-18  Tyler Wilcock  <[email protected]>
+
+        AX: Update the isolated tree in response to AXElementBusyChanged and AXTextChanged notifications
+        https://bugs.webkit.org/show_bug.cgi?id=239434
+
+        Reviewed by Chris Fleizach.
+
+        We need to update the isolated tree in response to these notifications.
+
+        This patch also makes AccessibilityNodeObjects (e.g. for display:contents elements)
+        properly report AXCoreObject::isBusy by moving AccessibilityRenderObject's implementation
+        to AccessibilityNodeObject. This also required AccessibilityRenderObject::elementAttributeValue
+        to move as well.
+
+        Tests: accessibility/text-updates-after-dynamic-change.html
+               accessibility/aria-busy-updates-after-dynamic-change.html
+
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::AXObjectCache::updateIsolatedTree):
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::isBusy const):
+        Moved from AccessibilityRenderObject.
+        (WebCore::AccessibilityNodeObject::elementAttributeValue const):
+        Moved from AccessibilityRenderObject.
+        * accessibility/AccessibilityNodeObject.h:
+        * accessibility/AccessibilityRenderObject.cpp:
+        (WebCore::AccessibilityRenderObject::setElementAttributeValue):
+        Delete this method as it was unused.
+        (WebCore::AccessibilityRenderObject::elementAttributeValue const):
+        Moved to AccessibilityNodeObject.
+        (WebCore::AccessibilityRenderObject::isBusy const):
+        Moved to AccessibilityNodeObject.
+        * accessibility/AccessibilityRenderObject.h:
+
 2022-04-18  Alex Christensen  <[email protected]>
 
         Implement CSSTransformValue.is2D

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (293005 => 293006)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-04-19 03:25:12 UTC (rev 293006)
@@ -3421,10 +3421,12 @@
             break;
         case AXActiveDescendantChanged:
         case AXAriaRoleChanged:
+        case AXElementBusyChanged:
         case AXInvalidStatusChanged:
         case AXMenuListValueChanged:
         case AXPressedStateChanged:
         case AXSelectedChildrenChanged:
+        case AXTextChanged:
         case AXValueChanged: {
             bool needsUpdate = appendIfNotContainsMatching(filteredNotifications, notification, [&notification] (const std::pair<RefPtr<AXCoreObject>, AXNotification>& note) {
                 return note.second == notification.second && note.first.get() == notification.first.get();

Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (293005 => 293006)


--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2022-04-19 03:25:12 UTC (rev 293006)
@@ -990,6 +990,11 @@
     return roleValue() == AccessibilityRole::WebCoreLink;
 }
 
+bool AccessibilityNodeObject::isBusy() const
+{
+    return elementAttributeValue(aria_busyAttr);
+}
+
 bool AccessibilityNodeObject::isControl() const
 {
     Node* node = this->node();
@@ -1294,6 +1299,11 @@
     setNodeValue(percentChange > 0, value);
 }
 
+bool AccessibilityNodeObject::elementAttributeValue(const QualifiedName& attributeName) const
+{
+    return equalLettersIgnoringASCIICase(getAttribute(attributeName), "true");
+}
+
 bool AccessibilityNodeObject::isGenericFocusableElement() const
 {
     if (!canSetFocusAttribute())

Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h (293005 => 293006)


--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.h	2022-04-19 03:25:12 UTC (rev 293006)
@@ -53,6 +53,7 @@
 
     bool canvasHasFallbackContent() const override;
 
+    bool isBusy() const override;
     bool isControl() const override;
     bool isFieldset() const override;
     bool isGroup() const override;
@@ -170,6 +171,8 @@
     // This returns true if it's focusable but it's not content editable and it's not a control or ARIA control.
     bool isGenericFocusableElement() const;
 
+    bool elementAttributeValue(const QualifiedName&) const;
+
     bool isLabelable() const;
     AccessibilityObject* correspondingControlForLabelElement() const override;
     AccessibilityObject* correspondingLabelForControlElement() const override;

Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (293005 => 293006)


--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp	2022-04-19 03:25:12 UTC (rev 293006)
@@ -1777,26 +1777,6 @@
     return m_renderer->style().isLink() && m_renderer->style().insideLink() == InsideLink::InsideVisited;
 }
 
-void AccessibilityRenderObject::setElementAttributeValue(const QualifiedName& attributeName, bool value)
-{
-    if (!m_renderer)
-        return;
-    
-    Node* node = m_renderer->node();
-    if (!is<Element>(node))
-        return;
-    
-    downcast<Element>(*node).setAttribute(attributeName, (value) ? "true"_s : "false"_s);
-}
-    
-bool AccessibilityRenderObject::elementAttributeValue(const QualifiedName& attributeName) const
-{
-    if (!m_renderer)
-        return false;
-    
-    return equalLettersIgnoringASCIICase(getAttribute(attributeName), "true");
-}
-    
 bool AccessibilityRenderObject::isSelected() const
 {
     if (!m_renderer)
@@ -3387,11 +3367,6 @@
     }
 }
 
-bool AccessibilityRenderObject::isBusy() const
-{
-    return elementAttributeValue(aria_busyAttr);
-}
-
 bool AccessibilityRenderObject::canHaveSelectedChildren() const
 {
     switch (roleValue()) {

Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h (293005 => 293006)


--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.h	2022-04-19 03:25:12 UTC (rev 293006)
@@ -266,15 +266,11 @@
     
     void ariaSelectedRows(AccessibilityChildrenVector&);
     
-    bool elementAttributeValue(const QualifiedName&) const;
-    void setElementAttributeValue(const QualifiedName&, bool);
-    
     OptionSet<SpeakAs> speakAsProperty() const override;
     
     const String liveRegionStatus() const override;
     const String liveRegionRelevant() const override;
     bool liveRegionAtomic() const override;
-    bool isBusy() const override;
 
     bool inheritsPresentationalRole() const override;
 

Modified: trunk/Tools/ChangeLog (293005 => 293006)


--- trunk/Tools/ChangeLog	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/ChangeLog	2022-04-19 03:25:12 UTC (rev 293006)
@@ -1,3 +1,34 @@
+2022-04-18  Tyler Wilcock  <[email protected]>
+
+        AX: Update the isolated tree in response to AXElementBusyChanged and AXTextChanged notifications
+        https://bugs.webkit.org/show_bug.cgi?id=239434
+
+        Reviewed by Chris Fleizach.
+
+        Added necessary tooling to enable querying AX object busy state for
+        the test added with this patch.
+
+        * DumpRenderTree/AccessibilityUIElement.cpp:
+        (getIsBusyCallback):
+        (AccessibilityUIElement::getJSClass):
+        * DumpRenderTree/AccessibilityUIElement.h:
+        * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+        (AccessibilityUIElement::isBusy const):
+        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+        (AccessibilityUIElement::isBusy const):
+        * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+        (AccessibilityUIElement::isBusy const):
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+        * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+        * WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:
+        (WTR::AccessibilityUIElement::isBusy const):
+        * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+        (WTR::AccessibilityUIElement::isBusy const):
+        * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+        (WTR::AccessibilityUIElement::isBusy const):
+        * WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp:
+        (WTR::AccessibilityUIElement::isBusy const):
+
 2022-04-18  Simon Fraser  <[email protected]>
 
         Allow C API clients to get the WKProcessTerminationReason in processDidCrash functions, and use in WebKitTestRunner

Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (293005 => 293006)


--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp	2022-04-19 03:25:12 UTC (rev 293006)
@@ -1327,6 +1327,11 @@
     return JSValueMakeString(context, selectedTextRange.get());
 }
 
+static JSValueRef getIsBusyCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+    return JSValueMakeBoolean(context, toAXElement(thisObject)->isBusy());
+}
+
 static JSValueRef getIsEnabledCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
 {
     return JSValueMakeBoolean(context, toAXElement(thisObject)->isEnabled());
@@ -1924,6 +1929,7 @@
         { "columnCount", columnCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "insertionPointLineNumber", getInsertionPointLineNumberCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "selectedTextRange", getSelectedTextRangeCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "isBusy", getIsBusyCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "isEnabled", getIsEnabledCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "isRequired", getIsRequiredCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "isFocused", getIsFocusedCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },

Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (293005 => 293006)


--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h	2022-04-19 03:25:12 UTC (rev 293006)
@@ -145,6 +145,7 @@
     JSRetainPtr<JSStringRef> valueDescription();
     int insertionPointLineNumber();
     JSRetainPtr<JSStringRef> selectedTextRange();
+    bool isBusy() const;
     bool isEnabled();
     bool isRequired() const;
     

Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (293005 => 293006)


--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm	2022-04-19 03:25:12 UTC (rev 293006)
@@ -74,6 +74,7 @@
 - (NSUInteger)accessibilityARIAColumnCount;
 - (NSUInteger)accessibilityARIARowIndex;
 - (NSUInteger)accessibilityARIAColumnIndex;
+- (BOOL)accessibilityARIAIsBusy;
 - (UIAccessibilityTraits)_axContainedByFieldsetTrait;
 - (id)_accessibilityFieldsetAncestor;
 - (BOOL)_accessibilityHasTouchEventListener;
@@ -861,6 +862,11 @@
     return -1;
 }
 
+bool AccessibilityUIElement::isBusy() const
+{
+    return [m_element accessibilityARIAIsBusy];
+}
+
 bool AccessibilityUIElement::isEnabled()
 {
     return false;

Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (293005 => 293006)


--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm	2022-04-19 03:25:12 UTC (rev 293006)
@@ -852,6 +852,11 @@
     return false;
 }
 
+bool AccessibilityUIElement::isBusy() const
+{
+    return boolAttributeValue(@"AXElementBusy");
+}
+
 bool AccessibilityUIElement::isEnabled()
 {
     return boolAttributeValue(NSAccessibilityEnabledAttribute);

Modified: trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp (293005 => 293006)


--- trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp	2022-04-19 03:25:12 UTC (rev 293006)
@@ -571,6 +571,12 @@
     return false;
 }
 
+bool AccessibilityUIElement::isBusy() const
+{
+    // FIXME: Implement.
+    return false;
+}
+
 bool AccessibilityUIElement::isEnabled()
 {
     DWORD state = accessibilityState(m_element);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (293005 => 293006)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h	2022-04-19 03:25:12 UTC (rev 293006)
@@ -166,6 +166,7 @@
     JSRetainPtr<JSStringRef> valueDescription();
     int insertionPointLineNumber();
     JSRetainPtr<JSStringRef> selectedTextRange();
+    bool isBusy() const;
     bool isEnabled();
     bool isRequired() const;
 

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (293005 => 293006)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl	2022-04-19 03:25:12 UTC (rev 293006)
@@ -82,6 +82,7 @@
     readonly attribute long minValue;
     readonly attribute long maxValue;
     
+    readonly attribute boolean isBusy;
     readonly attribute boolean isEnabled;
     readonly attribute boolean isRequired;
     readonly attribute boolean isFocused;

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp (293005 => 293006)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp	2022-04-19 03:25:12 UTC (rev 293006)
@@ -1025,6 +1025,12 @@
     return false;
 }
 
+bool AccessibilityUIElement::isBusy() const
+{
+    // FIXME: Implement.
+    return false;
+}
+
 bool AccessibilityUIElement::isEnabled()
 {
     m_element->updateBackingStore();

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (293005 => 293006)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2022-04-19 03:25:12 UTC (rev 293006)
@@ -82,6 +82,7 @@
 - (NSUInteger)accessibilityARIAColumnCount;
 - (NSUInteger)accessibilityARIARowIndex;
 - (NSUInteger)accessibilityARIAColumnIndex;
+- (BOOL)accessibilityARIAIsBusy;
 - (NSString *)accessibilityInvalidStatus;
 - (UIAccessibilityTraits)_axContainedByFieldsetTrait;
 - (id)_accessibilityFieldsetAncestor;
@@ -631,6 +632,11 @@
     return false;
 }
 
+bool AccessibilityUIElement::isBusy() const
+{
+    return [m_element accessibilityARIAIsBusy];
+}
+
 bool AccessibilityUIElement::isEnabled()
 {
     return false;

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (293005 => 293006)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm	2022-04-19 03:25:12 UTC (rev 293006)
@@ -982,6 +982,11 @@
     return false;
 }
 
+bool AccessibilityUIElement::isBusy() const
+{
+    return boolAttributeValue(@"AXElementBusy");
+}
+
 bool AccessibilityUIElement::isEnabled()
 {
     return boolAttributeValue(NSAccessibilityEnabledAttribute);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp (293005 => 293006)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp	2022-04-19 02:45:51 UTC (rev 293005)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/win/AccessibilityUIElementWin.cpp	2022-04-19 03:25:12 UTC (rev 293006)
@@ -400,6 +400,12 @@
     return false;
 }
 
+bool AccessibilityUIElement::isBusy() const
+{
+    notImplemented();
+    return false;
+}
+
 bool AccessibilityUIElement::isEnabled()
 {
     notImplemented();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to