Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a8701da2405e214fce03617867c66e35485dd6af
https://github.com/WebKit/WebKit/commit/a8701da2405e214fce03617867c66e35485dd6af
Author: Tyler Wilcock <[email protected]>
Date: 2025-03-29 (Sat, 29 Mar 2025)
Changed paths:
M Source/WebCore/accessibility/AXCoreObject.cpp
M Source/WebCore/accessibility/AXCoreObject.h
M Source/WebCore/accessibility/AXLogger.cpp
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/accessibility/AccessibilityObject.h
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/atspi/AccessibilityObjectAtspi.cpp
M Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Log Message:
-----------
AX: Some properties are unnecessarily cached for every single table cell
https://bugs.webkit.org/show_bug.cgi?id=290639
rdar://148115441
Reviewed by Chris Fleizach.
AXProperty::RowGroupAncestorID used to be cached for every single table cell.
We can compute this on-demand off the
main-thread if we cache whether objects have a thead, tbody, or tfoot tag,
which this commit does. This saves memory
and avoids one ancestry walk per table cell created.
AXProperty::{AXColumnIndex, AXRowIndex} were int properties, and returned -1 in
the most common case where there is
no aria-rowindex or aria-colindex. With this commit, the return type of these
functions is changed to std::optional<unsigned>
better encoding the intent of the function instead of using a magic -1 value.
This also has the side effect of only
caching AXProperty::{AXColumnIndex, AXRowIndex} when there is a non-default
value to cache, saving memory.
* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::AXCoreObject::rowGroupAncestorID const):
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::AXCoreObject::rowGroupAncestorID const): Deleted.
* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::operator<<):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasRowGroupTag const):
* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::axColumnIndex const):
(WebCore::AccessibilityTableCell::axRowIndex const):
(WebCore::AccessibilityTableCell::rowGroupAncestorID const): Deleted.
* Source/WebCore/accessibility/AccessibilityTableCell.h:
* Source/WebCore/accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::addChildren):
(WebCore::AccessibilityTableRow::axColumnIndex const):
(WebCore::AccessibilityTableRow::axRowIndex const):
* Source/WebCore/accessibility/AccessibilityTableRow.h:
* Source/WebCore/accessibility/atspi/AccessibilityObjectAtspi.cpp:
(WebCore::AccessibilityObjectAtspi::attributes const):
* Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityARIAColumnIndex]):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeProperties):
(WebCore::AXIsolatedObject::hasRowGroupTag const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
Canonical link: https://commits.webkit.org/292898@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