AX: Update isolated tree in response to AXReadOnlyStatusChanged, AXRequiredStatusChan...
commitfcf4cbbd6157ac6269d6cd4ead22f6cefecf87a4
authortyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Apr 2022 06:10:33 +0000 (12 06:10 +0000)
committertyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Apr 2022 06:10:33 +0000 (12 06:10 +0000)
tree56d5c4e3892f8534d400559f846b65fe059173ec
parent82b4d64c8cb272f22a72f3d0ff4a497aaa94fcbf
AX: Update isolated tree in response to AXReadOnlyStatusChanged, AXRequiredStatusChanged, and AXPressedStateChanged notifications
https://bugs.webkit.org/show_bug.cgi?id=239047

Reviewed by Chris Fleizach.

Source/WebCore:

When these notifications come in for a live object, we need to update the
cached properties of the corresponding isolated object.

Tests: accessibility/aria-readonly-updates-after-dynamic-change.html,
       accessibility/aria-required-updates-after-dynamic-change.html,
       accessibility/mac/aria-pressed-button-attributes.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::updateIsolatedTree):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
(-[WebAccessibilityObjectWrapper accessibilityIsRequired]):
Added both of these methods so the tests added in this patch can run on iOS.
* accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperty):
Handle updates to AXPropertyName::IsRequired, AXPropertyName::CanSetValueAttribute,
and AXPropertyName::ReadOnlyValue.

Tools:

* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::isAttributeSettable):
(AccessibilityUIElement::isRequired const):
Added both of these methods so that the tests added with this patch can run on iOS.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::isAttributeSettable):
(WTR::AccessibilityUIElement::isRequired const):
Added both of these methods so that the tests added with this patch can run on iOS.

LayoutTests:

* accessibility/aria-readonly-updates-after-dynamic-change-expected.txt: Added.
* accessibility/aria-readonly-updates-after-dynamic-change.html: Added.
* accessibility/aria-required-updates-after-dynamic-change-expected.txt: Added.
* accessibility/aria-required-updates-after-dynamic-change.html: Added.
* accessibility/mac/aria-pressed-button-attributes-expected.txt:
* accessibility/mac/aria-pressed-button-attributes.html:
Add testcases that dynamically change aria-pressed and expect the
right attributes.
* platform/ios/TestExpectations: Enable new tests.
* platform/win/TestExpectations: Skip new tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@292763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/aria-readonly-updates-after-dynamic-change-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/aria-readonly-updates-after-dynamic-change.html [new file with mode: 0644]
LayoutTests/accessibility/aria-required-updates-after-dynamic-change-expected.txt [new file with mode: 0644]
LayoutTests/accessibility/aria-required-updates-after-dynamic-change.html [new file with mode: 0644]
LayoutTests/accessibility/mac/aria-pressed-button-attributes-expected.txt
LayoutTests/accessibility/mac/aria-pressed-button-attributes.html
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/win/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AXObjectCache.cpp
Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
Tools/ChangeLog
Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm