Changeset 295727 in webkit
- Timestamp:
- Jun 22, 2022 5:41:33 AM (2 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value-expected.txt
r286794 r295727 5 5 6 6 PASS label.role is 'AXRole: AXStaticText' 7 PASS initialStringValue is 'AXValue: first choice'7 PASS label.stringValue is 'AXValue: first choice' 8 8 PASS label.stringValue === 'AXValue: first foo choice' 9 9 PASS successfullyParsed is true -
trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value.html
r286794 r295727 16 16 description("This tests that if a label element's children change, the string value updates"); 17 17 18 var label, initialStringValue;19 18 if (window.accessibilityController) { 20 19 window.jsTestIsAsync = true; 21 20 22 label = accessibilityController.accessibleElementById("label"); 23 initialStringValue = label.stringValue; 21 var label = accessibilityController.accessibleElementById("label"); 22 shouldBe("label.role", "'AXRole: AXStaticText'"); 23 shouldBe("label.stringValue", "'AXValue: first choice'"); 24 24 25 let first = document.getElementById("first") 25 26 let span = document.createElement("span"); … … 27 28 span.appendChild(textNode); 28 29 first.appendChild(textNode); 29 30 shouldBe("label.role", "'AXRole: AXStaticText'");31 shouldBe("initialStringValue", "'AXValue: first choice'");32 30 33 31 setTimeout(async function() { … … 39 37 </body> 40 38 </html> 41 42 43 -
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
r295721 r295727 449 449 } 450 450 451 void AXIsolatedTree::updateTableProperties(AXCoreObject& axObject) 452 { 453 ASSERT(isMainThread()); 454 ASSERT(axObject.isTable()); 455 456 AXPropertyMap propertyMap { 457 { AXPropertyName::IsTable, true }, 458 { AXPropertyName::IsExposable, axObject.isExposable() }, 459 { AXPropertyName::IsDataTable, axObject.isDataTable() }, 460 { AXPropertyName::TableLevel, axObject.tableLevel() }, 461 { AXPropertyName::SupportsSelectedRows, axObject.supportsSelectedRows() }, 462 { AXPropertyName::Columns, axIDs(axObject.columns()) }, 463 { AXPropertyName::Rows, axIDs(axObject.rows()) }, 464 { AXPropertyName::ColumnCount, axObject.columnCount() }, 465 { AXPropertyName::RowCount, axObject.rowCount() }, 466 { AXPropertyName::Cells, axIDs(axObject.cells()) }, 467 { AXPropertyName::ColumnHeaders, axIDs(axObject.columnHeaders()) }, 468 { AXPropertyName::RowHeaders, axIDs(axObject.rowHeaders()) }, 469 { AXPropertyName::VisibleRows, axIDs(axObject.visibleRows()) }, 470 { AXPropertyName::HeaderContainer, axObject.headerContainer() ? axObject.headerContainer()->objectID() : AXID() }, 471 { AXPropertyName::AXColumnCount, axObject.axColumnCount() }, 472 { AXPropertyName::AXRowCount, axObject.axRowCount() }, 473 }; 474 475 Locker locker { m_changeLogLock }; 476 m_pendingPropertyChanges.append({ axObject.objectID(), propertyMap }); 477 } 478 479 void AXIsolatedTree::updateTreeItemProperties(AXCoreObject& axObject) 480 { 481 ASSERT(isMainThread()); 482 ASSERT(axObject.isTreeItem()); 483 484 AXPropertyMap propertyMap { 485 { AXPropertyName::ARIATreeItemContent, axIDs(axObject.ariaTreeItemContent()) }, 486 { AXPropertyName::DisclosedRows, axIDs(axObject.disclosedRows()) }, 487 }; 488 489 Locker locker { m_changeLogLock }; 490 m_pendingPropertyChanges.append({ axObject.objectID(), propertyMap }); 491 } 492 493 void AXIsolatedTree::updateRelatedProperties(AXCoreObject& axObject) 494 { 495 ASSERT(isMainThread()); 496 497 if (axObject.isTable()) 498 updateTableProperties(axObject); 499 else if (axObject.isTreeItem()) 500 updateTreeItemProperties(axObject); 451 void AXIsolatedTree::updateNodeAndDependentProperties(AXCoreObject& axObject) 452 { 453 ASSERT(isMainThread()); 454 455 updateNode(axObject); 501 456 502 457 if (auto* treeAncestor = Accessibility::findAncestor(axObject, true, [] (const auto& object) { return object.isTree(); })) … … 576 531 queueRemovalsAndUnresolvedChanges(oldChildrenIDs); 577 532 578 // Also queue updates for properties that derive fromchildren().579 update RelatedProperties(*axAncestor);533 // Also queue updates to the target node itself and any properties that depend on children(). 534 updateNodeAndDependentProperties(*axAncestor); 580 535 } 581 536 -
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
r295721 r295727 349 349 void updateChildren(AXCoreObject&); 350 350 void updateNodeProperty(AXCoreObject&, AXPropertyName); 351 void updateRelatedProperties(AXCoreObject&); 352 void updateTableProperties(AXCoreObject&); 353 void updateTreeItemProperties(AXCoreObject&); 351 void updateNodeAndDependentProperties(AXCoreObject&); 354 352 355 353 double loadingProgress() { return m_loadingProgress; }
Note: See TracChangeset
for help on using the changeset viewer.