[webkit-changes] [WebKit/WebKit] 80e097: AX: AXPropertyName::CurrentState is not updated af...
Tyler Wilcock
noreply at github.com
Wed Oct 19 10:14:43 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 80e097afe06f69ebb0453697d8d9276b676e6ef4
https://github.com/WebKit/WebKit/commit/80e097afe06f69ebb0453697d8d9276b676e6ef4
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2022-10-19 (Wed, 19 Oct 2022)
Changed paths:
M LayoutTests/accessibility/aria-current-state-changed-notification-expected.txt
M LayoutTests/accessibility/aria-current-state-changed-notification.html
A LayoutTests/platform/ios/accessibility/aria-current-state-changed-notification-expected.txt
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/accessibility/AccessibilityObject.h
M Source/WebCore/accessibility/AccessibilityObjectInterface.h
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
Log Message:
-----------
AX: AXPropertyName::CurrentState is not updated after dynamic aria-current changes
https://bugs.webkit.org/show_bug.cgi?id=246662
rdar://problem/101269589
Reviewed by Chris Fleizach.
Prior to this patch, AXPropertyName::CurrentState was never updated
after dynamic aria-current changes (but AXPropertyName::CurrentValue was).
We rely on AXCoreObject::currentState() to inform clients whether we do
or do not support the AXARIACurrent attribute, so by not updating this
we would behave incorrectly.
This patch fixes this by removing AXPropertyName::CurrentValue entirely.
AccessibilityObject::currentValue() simply takes AXCoreObject::currentState()
and turns it into a string, so there's no need to cache both of these values.
This improves performance and memory usage.
Then, the AccessibilityObject::currentValue implementation is moved to
a new AXCoreObject::currentValue, allowing live and isolated objects to
share this implementation.
New test cases are added to aria-current-state-changed-notification.html
to ensure we don't regress this behavior ever again.
* LayoutTests/platform/ios/accessibility/aria-current-state-changed-notification-expected.txt: Added.
* LayoutTests/accessibility/aria-current-state-changed-notification-expected.txt:
* LayoutTests/accessibility/aria-current-state-changed-notification.html:
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::updateIsolatedTree):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::currentValue const): Deleted.
* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/AccessibilityObjectInterface.h:
(WebCore::AXCoreObject::currentValue const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeProperties):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperty):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
Canonical link: https://commits.webkit.org/255742@main
More information about the webkit-changes
mailing list