Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ad80707652bd43810f5b3b67c314d0818d195a53 https://github.com/WebKit/WebKit/commit/ad80707652bd43810f5b3b67c314d0818d195a53 Author: Joshua Hoffman <jhoffma...@apple.com> Date: 2023-09-22 (Fri, 22 Sep 2023)
Changed paths: A LayoutTests/accessibility/column-header-scope-expected.txt A LayoutTests/accessibility/column-header-scope.html A LayoutTests/accessibility/table-headers-changing-expected.txt A LayoutTests/accessibility/table-headers-changing.html M Source/WebCore/accessibility/AXCoreObject.cpp M Source/WebCore/accessibility/AXCoreObject.h M Source/WebCore/accessibility/AXLogger.cpp M Source/WebCore/accessibility/AXObjectCache.cpp M Source/WebCore/accessibility/AXObjectCache.h M Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp M Source/WebCore/accessibility/AccessibilityARIAGridRow.h M Source/WebCore/accessibility/AccessibilityObject.h M Source/WebCore/accessibility/AccessibilityTable.cpp M Source/WebCore/accessibility/AccessibilityTableCell.cpp M Source/WebCore/accessibility/AccessibilityTableCell.h M Source/WebCore/accessibility/AccessibilityTableRow.cpp M Source/WebCore/accessibility/AccessibilityTableRow.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: columnHeaders() and rowHeaders() are performed on the main thread in ITM https://bugs.webkit.org/show_bug.cgi?id=261680 rdar://115661951 Reviewed by Andres Gonzalez. This patch uses a combination of caching attributes and sharing code to allow the calculation for rowHeaders() and columnHeaders() to be performed on the secondary AX thread. Previously, we had to jump to the main thread each time these attributes were requested, which can show up significantly on samples of pages that have very dynamic tables. Calculating these values is now accomplished through five newly cached attributes in AXIsolatedObjects: Scope, IsColumnHeaderCell, IsRowHeaderCell, HeaderObject, and RowGroupAncestorID. By caching these attributes, we are able to calculate the row and column headers for a table or cell within the isolated object. Thus, we are able to remove the row- and column-header properties from AXIsolatedObject::getOrRetrievePropertyValue. The methods isTableCellInSameRowGroup and isTableCellInSameColGroup, which were originally part of the AccessibilityTableCell class, were moved to AXCoreObject so that this code could be shared between the live and isolated objects. Two new tests have been added to make sure that these cached values work as expected, and to check that we update the scope properly when it changes. * LayoutTests/accessibility/column-header-scope-expected.txt: Added. * LayoutTests/accessibility/column-header-scope.html: Added. * LayoutTests/accessibility/table-headers-changing-expected.txt: Added. * LayoutTests/accessibility/table-headers-changing.html: Added. * Source/WebCore/accessibility/AXCoreObject.cpp: (WebCore::AXCoreObject::isTableCellInSameRowGroup): (WebCore::AXCoreObject::isTableCellInSameColGroup): * Source/WebCore/accessibility/AXCoreObject.h: (WebCore::AXCoreObject::isColumnHeader const): (WebCore::AXCoreObject::isRowHeader const): (WebCore::AXCoreObject::rowGroupAncestorID const): (WebCore::AXCoreObject::cellScope const): (WebCore::AXCoreObject::rowHeader): * Source/WebCore/accessibility/AXLogger.cpp: (WebCore::operator<<): * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::handleAttributeChange): (WebCore::AXObjectCache::updateIsolatedTree): * Source/WebCore/accessibility/AXObjectCache.h: * Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp: (WebCore::AccessibilityARIAGridRow::rowHeader): (WebCore::AccessibilityARIAGridRow::headerObject): Deleted. * Source/WebCore/accessibility/AccessibilityARIAGridRow.h: * Source/WebCore/accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::isColumnHeaderCell const): Deleted. (WebCore::AccessibilityObject::isRowHeaderCell const): Deleted. * Source/WebCore/accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::rowHeaders): * Source/WebCore/accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::determineAccessibilityRole): (WebCore::AccessibilityTableCell::isColumnHeader const): (WebCore::AccessibilityTableCell::isRowHeader const): (WebCore::AccessibilityTableCell::rowGroupAncestorID const): (WebCore::AccessibilityTableCell::columnHeaders): (WebCore::AccessibilityTableCell::rowHeaders): (WebCore::AccessibilityTableCell::isColumnHeaderCell const): Deleted. (WebCore::AccessibilityTableCell::isRowHeaderCell const): Deleted. (WebCore::AccessibilityTableCell::isTableCellInSameRowGroup): Deleted. (WebCore::AccessibilityTableCell::isTableCellInSameColGroup): Deleted. * Source/WebCore/accessibility/AccessibilityTableCell.h: * Source/WebCore/accessibility/AccessibilityTableRow.cpp: (WebCore::AccessibilityTableRow::rowHeader): (WebCore::AccessibilityTableRow::headerObject): Deleted. * Source/WebCore/accessibility/AccessibilityTableRow.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp: (WebCore::AXIsolatedObject::initializeProperties): (WebCore::AXIsolatedObject::getOrRetrievePropertyValue): (WebCore::AXIsolatedObject::columnHeaders): (WebCore::AXIsolatedObject::rowHeaders): * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp: (WebCore::AXIsolatedTree::updateNodeProperties): * Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h: Canonical link: https://commits.webkit.org/268330@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes