Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b0c1cff41d184eb774acaf71fe074cf853196226
https://github.com/WebKit/WebKit/commit/b0c1cff41d184eb774acaf71fe074cf853196226
Author: Tyler Wilcock <[email protected]>
Date: 2025-05-06 (Tue, 06 May 2025)
Changed paths:
M LayoutTests/accessibility/aria-sort-expected.txt
M LayoutTests/accessibility/aria-sort.html
M
LayoutTests/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt
M
LayoutTests/accessibility/changing-aria-hidden-with-display-none-parent.html
M LayoutTests/accessibility/dialog-showModal.html
M LayoutTests/accessibility/display-contents/role-row-headers-expected.txt
M
LayoutTests/accessibility/list-with-dynamically-changing-content-expected.txt
M LayoutTests/accessibility/list-with-dynamically-changing-content.html
M LayoutTests/accessibility/mac/aria-columnrowheaders-expected.txt
M LayoutTests/accessibility/mac/nested-modal.html
M
LayoutTests/accessibility/mac/press-action-not-exposed-for-event-delegation-expected.txt
M
LayoutTests/accessibility/mac/press-action-not-exposed-for-event-delegation.html
M LayoutTests/accessibility/title-ui-element-correctness.html
M LayoutTests/platform/glib/TestExpectations
M
LayoutTests/platform/ios/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt
M
LayoutTests/platform/ios/accessibility/list-with-dynamically-changing-content-expected.txt
M Source/WebCore/accessibility/AXCoreObject.cpp
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp
M Source/WebCore/accessibility/AccessibilityListBox.cpp
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/accessibility/AccessibilityTableCell.cpp
M Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
Log Message:
-----------
AX: Fully migrate AXIsolatedTree updates to batched `queueNodeUpdate` system
rather than immediate, ad-hoc updates
https://bugs.webkit.org/show_bug.cgi?id=292612
rdar://150766907
Reviewed by Joshua Hoffman.
With this commit, we fully transition all isolated tree updates to
`queueNodeUpdate`, rather than immediate and ad-hoc
calls to `updateNode`, `updateChildren`, and `updateNodeProperties`. This has
performance benefits, as it will allow
us to batch more updates, and thus avoid duplicative updates for the same
objects within a short time span. It also
yields correctness benefits. All tree updates are now fully atomic. Before this
commit, it was possible that some updates
could be submitted to the secondary thread immediately, while others that are
related to the immediate ones would only
be submitted on a timer that fired later. This could cause an inconsistent tree
state, e.g. an object would have children IDs
for objects that haven't yet been created in the tree.
Because this change delays some updates a bit, some layout tests failed. All of
these, excluding
accessibility/table-headers-changing.html, simply needed to be more async,
waiting for the tree to update.
For accessibility/table-headers-changing.html, a real bug was exposed where we
were caching invalid cell slots in the
isolated tree, causing cellForColumnAndRow calls to fail incorrectly. This bug
was only exposed by this commit due to
a subtle change in timing — there's no reason it couldn't reproduce before this
commit too.
The sequence of the bug was like this:
1. A new cell is created and added to the table. This caused the containing
row to gain dirty children
2. Anything causes the row to need to un-dirty its children, so we iterate
the DOM.
3. We get to the new cell, and find we need to create it via getOrCreate.
4. In AccessibilityTableCell::determineAccessibilityRole, we call
isColumnHeader(), which in turn calls rowIndexRange(),
in turn forcing the table (which also now has dirty children) to call
::addChildren and ::computeCellSlots.
5. AccessibilityTable::computeCellSlots comes to call unignoredChildren() on
the row, but keep in mind that above in
the stack is AccessibilityTableRow::addChildren — meaning that critically,
the cell slots are built with an incomplete
view of the row's children.
This commit resolves the issue by no longer calling isColumnHeader() or
isRowHeader() in AccessibilityTableCell::determineAccessibilityRole,
and instead allowing the cell to compute a role of AccessibilityRole::Cell, and
calling isColumnHeader() and isRowHeader()
in all disparate places as needed.
Not only does this avoid the above issue, but it also fixes several bugs where
things should've been considered column and
row headers, but weren't, because we only did the check once at object creation
time and never re-evaluated that role after
dynamic page changes. Several tests have different expectations as a result,
and that's a good thing, representing fixed bugs.
* LayoutTests/accessibility/aria-sort-expected.txt:
* LayoutTests/accessibility/aria-sort.html:
*
LayoutTests/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt:
* LayoutTests/accessibility/changing-aria-hidden-with-display-none-parent.html:
* LayoutTests/accessibility/dialog-showModal.html:
* LayoutTests/accessibility/display-contents/role-row-headers-expected.txt:
* LayoutTests/accessibility/list-with-dynamically-changing-content-expected.txt:
* LayoutTests/accessibility/list-with-dynamically-changing-content.html:
* LayoutTests/accessibility/mac/aria-columnrowheaders-expected.txt:
* LayoutTests/accessibility/mac/nested-modal.html:
*
LayoutTests/accessibility/mac/press-action-not-exposed-for-event-delegation-expected.txt:
*
LayoutTests/accessibility/mac/press-action-not-exposed-for-event-delegation.html:
* LayoutTests/accessibility/title-ui-element-correctness.html:
*
LayoutTests/platform/ios/accessibility/changing-aria-hidden-with-display-none-parent-expected.txt:
*
LayoutTests/platform/ios/accessibility/list-with-dynamically-changing-content-expected.txt:
* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::AXCoreObject::supportsRequiredAttribute const):
(WebCore::AXCoreObject::columnHeader):
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::onEventListenerAdded):
(WebCore::AXObjectCache::onEventListenerRemoved):
* Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::rowHeader):
* Source/WebCore/accessibility/AccessibilityListBox.cpp:
(WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject const):
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetSelectedAttribute const):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsReadOnly const):
(WebCore::AccessibilityObject::computedRoleString const):
(WebCore::AccessibilityObject::sortDirection const):
(WebCore::AccessibilityObject::supportsExpanded const):
* Source/WebCore/accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
(WebCore::AccessibilityTableCell::isColumnHeader const):
(WebCore::AccessibilityTableCell::isRowHeader const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateChildren):
(WebCore::AXIsolatedTree::updateChildrenForObjects):
(WebCore::AXIsolatedTree::updateRootScreenRelativePosition):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
(WebCore::AXIsolatedTree::updateNodeProperty): Deleted.
(WebCore::AXIsolatedTree::updateNodeProperties): Deleted.
Canonical link: https://commits.webkit.org/294597@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes