Title: [290310] trunk/Source/WebCore
- Revision
- 290310
- Author
- [email protected]
- Date
- 2022-02-22 09:07:50 -0800 (Tue, 22 Feb 2022)
Log Message
AX: Only compute ariaTreeRows for isTree() objects
https://bugs.webkit.org/show_bug.cgi?id=236994
Reviewed by Andres Gonzalez.
We only expose AXPropertyName::ARIATreeRows for isTree() objects, but compute it for every object, which is wasteful.
This patch also includes a drive-by fixing of setting AXPropertyName::IsTreeItem. Prior to this patch,
we never set this property. Also, we now only store AXPropertyName::ARIATreeItemContent for isTreeItem() objects.
The AXPropertyName::IsTreeItem fix makes test accessibility/roles-exposed.html closer to passing with ITM enabled.
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::ariaTreeRows):
Remove unncessary tab character.
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (290309 => 290310)
--- trunk/Source/WebCore/ChangeLog 2022-02-22 17:05:59 UTC (rev 290309)
+++ trunk/Source/WebCore/ChangeLog 2022-02-22 17:07:50 UTC (rev 290310)
@@ -1,5 +1,25 @@
2022-02-22 Tyler Wilcock <[email protected]>
+ AX: Only compute ariaTreeRows for isTree() objects
+ https://bugs.webkit.org/show_bug.cgi?id=236994
+
+ Reviewed by Andres Gonzalez.
+
+ We only expose AXPropertyName::ARIATreeRows for isTree() objects, but compute it for every object, which is wasteful.
+
+ This patch also includes a drive-by fixing of setting AXPropertyName::IsTreeItem. Prior to this patch,
+ we never set this property. Also, we now only store AXPropertyName::ARIATreeItemContent for isTreeItem() objects.
+
+ The AXPropertyName::IsTreeItem fix makes test accessibility/roles-exposed.html closer to passing with ITM enabled.
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::ariaTreeRows):
+ Remove unncessary tab character.
+ * accessibility/isolatedtree/AXIsolatedObject.cpp:
+ (WebCore::AXIsolatedObject::initializeAttributeData):
+
+2022-02-22 Tyler Wilcock <[email protected]>
+
AX: Fix accessibility/aria-current-state-changed-notification.html in isolated tree mode
https://bugs.webkit.org/show_bug.cgi?id=237014
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (290309 => 290310)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2022-02-22 17:05:59 UTC (rev 290309)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2022-02-22 17:07:50 UTC (rev 290310)
@@ -1898,7 +1898,7 @@
{
AccessibilityChildrenVector ariaOwns;
ariaOwnsElements(ariaOwns);
-
+
ancestors.append(this);
// The ordering of rows is first DOM children *not* in aria-owns, followed by all specified
@@ -1951,7 +1951,7 @@
ancestors.removeLast();
}
-void AccessibilityObject::ariaTreeRows(AccessibilityChildrenVector& rows )
+void AccessibilityObject::ariaTreeRows(AccessibilityChildrenVector& rows)
{
AccessibilityChildrenVector ancestors;
ariaTreeRows(rows, ancestors);
Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp (290309 => 290310)
--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp 2022-02-22 17:05:59 UTC (rev 290309)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp 2022-02-22 17:07:50 UTC (rev 290310)
@@ -131,7 +131,6 @@
setProperty(AXPropertyName::IsSlider, object.isSlider());
setProperty(AXPropertyName::IsStyleFormatGroup, object.isStyleFormatGroup());
setProperty(AXPropertyName::IsTextControl, object.isTextControl());
- setProperty(AXPropertyName::IsTree, object.isTree());
setProperty(AXPropertyName::IsUnorderedList, object.isUnorderedList());
setProperty(AXPropertyName::IsUnvisited, object.isUnvisited());
setProperty(AXPropertyName::IsValueAutofillAvailable, object.isValueAutofillAvailable());
@@ -282,9 +281,24 @@
setObjectProperty(AXPropertyName::DisclosedByRow, object.disclosedByRow());
}
- if (object.isTreeItem())
+ if (object.isTreeItem()) {
+ setProperty(AXPropertyName::IsTreeItem, true);
+
+ AccessibilityChildrenVector ariaTreeItemContent;
+ object.ariaTreeItemContent(ariaTreeItemContent);
+ setObjectVectorProperty(AXPropertyName::ARIATreeItemContent, ariaTreeItemContent);
+
setObjectVectorProperty(AXPropertyName::DisclosedRows, object.disclosedRows());
+ }
+ if (object.isTree()) {
+ setProperty(AXPropertyName::IsTree, true);
+
+ AccessibilityChildrenVector ariaTreeRows;
+ object.ariaTreeRows(ariaTreeRows);
+ setObjectVectorProperty(AXPropertyName::ARIATreeRows, ariaTreeRows);
+ }
+
if (object.isTextControl())
setProperty(AXPropertyName::TextLength, object.textLength());
@@ -312,14 +326,6 @@
object.tabChildren(tabChildren);
setObjectVectorProperty(AXPropertyName::TabChildren, tabChildren);
- AccessibilityChildrenVector ariaTreeRows;
- object.ariaTreeRows(ariaTreeRows);
- setObjectVectorProperty(AXPropertyName::ARIATreeRows, ariaTreeRows);
-
- AccessibilityChildrenVector ariaTreeItemContent;
- object.ariaTreeItemContent(ariaTreeItemContent);
- setObjectVectorProperty(AXPropertyName::ARIATreeItemContent, ariaTreeItemContent);
-
AccessibilityChildrenVector linkedUIElements;
object.linkedUIElements(linkedUIElements);
setObjectVectorProperty(AXPropertyName::LinkedUIElements, linkedUIElements);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes