Modified: trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value-expected.txt (295726 => 295727)
--- trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value-expected.txt 2022-06-22 12:20:21 UTC (rev 295726)
+++ trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value-expected.txt 2022-06-22 12:41:33 UTC (rev 295727)
@@ -4,7 +4,7 @@
PASS label.role is 'AXRole: AXStaticText'
-PASS initialStringValue is 'AXValue: first choice'
+PASS label.stringValue is 'AXValue: first choice'
PASS label.stringValue === 'AXValue: first foo choice'
PASS successfullyParsed is true
Modified: trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value.html (295726 => 295727)
--- trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value.html 2022-06-22 12:20:21 UTC (rev 295726)
+++ trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value.html 2022-06-22 12:41:33 UTC (rev 295727)
@@ -15,12 +15,13 @@
<script>
description("This tests that if a label element's children change, the string value updates");
- var label, initialStringValue;
if (window.accessibilityController) {
window.jsTestIsAsync = true;
- label = accessibilityController.accessibleElementById("label");
- initialStringValue = label.stringValue;
+ var label = accessibilityController.accessibleElementById("label");
+ shouldBe("label.role", "'AXRole: AXStaticText'");
+ shouldBe("label.stringValue", "'AXValue: first choice'");
+
let first = document.getElementById("first")
let span = document.createElement("span");
let textNode = document.createTextNode("foo");
@@ -27,9 +28,6 @@
span.appendChild(textNode);
first.appendChild(textNode);
- shouldBe("label.role", "'AXRole: AXStaticText'");
- shouldBe("initialStringValue", "'AXValue: first choice'");
-
setTimeout(async function() {
await expectAsyncExpression("label.stringValue", "'AXValue: first foo choice'");
finishJSTest();
@@ -38,6 +36,3 @@
</script>
</body>
</html>
-
-
-
Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (295726 => 295727)
--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp 2022-06-22 12:20:21 UTC (rev 295726)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp 2022-06-22 12:41:33 UTC (rev 295727)
@@ -448,57 +448,12 @@
m_pendingPropertyChanges.append({ axObject.objectID(), propertyMap });
}
-void AXIsolatedTree::updateTableProperties(AXCoreObject& axObject)
+void AXIsolatedTree::updateNodeAndDependentProperties(AXCoreObject& axObject)
{
ASSERT(isMainThread());
- ASSERT(axObject.isTable());
- AXPropertyMap propertyMap {
- { AXPropertyName::IsTable, true },
- { AXPropertyName::IsExposable, axObject.isExposable() },
- { AXPropertyName::IsDataTable, axObject.isDataTable() },
- { AXPropertyName::TableLevel, axObject.tableLevel() },
- { AXPropertyName::SupportsSelectedRows, axObject.supportsSelectedRows() },
- { AXPropertyName::Columns, axIDs(axObject.columns()) },
- { AXPropertyName::Rows, axIDs(axObject.rows()) },
- { AXPropertyName::ColumnCount, axObject.columnCount() },
- { AXPropertyName::RowCount, axObject.rowCount() },
- { AXPropertyName::Cells, axIDs(axObject.cells()) },
- { AXPropertyName::ColumnHeaders, axIDs(axObject.columnHeaders()) },
- { AXPropertyName::RowHeaders, axIDs(axObject.rowHeaders()) },
- { AXPropertyName::VisibleRows, axIDs(axObject.visibleRows()) },
- { AXPropertyName::HeaderContainer, axObject.headerContainer() ? axObject.headerContainer()->objectID() : AXID() },
- { AXPropertyName::AXColumnCount, axObject.axColumnCount() },
- { AXPropertyName::AXRowCount, axObject.axRowCount() },
- };
+ updateNode(axObject);
- Locker locker { m_changeLogLock };
- m_pendingPropertyChanges.append({ axObject.objectID(), propertyMap });
-}
-
-void AXIsolatedTree::updateTreeItemProperties(AXCoreObject& axObject)
-{
- ASSERT(isMainThread());
- ASSERT(axObject.isTreeItem());
-
- AXPropertyMap propertyMap {
- { AXPropertyName::ARIATreeItemContent, axIDs(axObject.ariaTreeItemContent()) },
- { AXPropertyName::DisclosedRows, axIDs(axObject.disclosedRows()) },
- };
-
- Locker locker { m_changeLogLock };
- m_pendingPropertyChanges.append({ axObject.objectID(), propertyMap });
-}
-
-void AXIsolatedTree::updateRelatedProperties(AXCoreObject& axObject)
-{
- ASSERT(isMainThread());
-
- if (axObject.isTable())
- updateTableProperties(axObject);
- else if (axObject.isTreeItem())
- updateTreeItemProperties(axObject);
-
if (auto* treeAncestor = Accessibility::findAncestor(axObject, true, [] (const auto& object) { return object.isTree(); }))
updateNodeProperty(*treeAncestor, AXPropertyName::ARIATreeRows);
}
@@ -575,8 +530,8 @@
}
queueRemovalsAndUnresolvedChanges(oldChildrenIDs);
- // Also queue updates for properties that derive from children().
- updateRelatedProperties(*axAncestor);
+ // Also queue updates to the target node itself and any properties that depend on children().
+ updateNodeAndDependentProperties(*axAncestor);
}
RefPtr<AXIsolatedObject> AXIsolatedTree::focusedNode()
Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h (295726 => 295727)
--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h 2022-06-22 12:20:21 UTC (rev 295726)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h 2022-06-22 12:41:33 UTC (rev 295727)
@@ -348,9 +348,7 @@
void updateNode(AXCoreObject&);
void updateChildren(AXCoreObject&);
void updateNodeProperty(AXCoreObject&, AXPropertyName);
- void updateRelatedProperties(AXCoreObject&);
- void updateTableProperties(AXCoreObject&);
- void updateTreeItemProperties(AXCoreObject&);
+ void updateNodeAndDependentProperties(AXCoreObject&);
double loadingProgress() { return m_loadingProgress; }
void updateLoadingProgress(double);