[webkit-changes] [295727] trunk

2022-06-22 Thread andresg_22
Title: [295727] trunk








Revision 295727
Author andresg...@apple.com
Date 2022-06-22 05:41:33 -0700 (Wed, 22 Jun 2022)


Log Message
AX ITM: Update the target node of a ChildrenChanged notification in addition of updating its children.
https://bugs.webkit.org/show_bug.cgi?id=241834

Reviewed by Chris Fleizach.

Fixes several tests in isolated tree mode, including:
accessibility/mac/figure-element.html [ Failure ]
accessibility/mac/progress-with-label-element.html [ Failure ]
accessibility/mac/label-element-changing-children-string-value.html [ Timeout ]
accessibility/mac/label-element-changing-textcontent-string-value.html [ Timeout ]
accessibility/visible-elements.html [ Timeout ]

In updateChildren, replaced AXIsolatedTree::updateRelatedProperties with updateNodeAndDependetnProperties to replace the whole object instead of individual properties. This will update several properties that depend on the children of any given object such as those properties that compute textUnderElement. The added cost should be marginal given that updating the children is a lot more costly.

* LayoutTests/accessibility/mac/label-element-changing-children-string-value-expected.txt:
* LayoutTests/accessibility/mac/label-element-changing-children-string-value.html:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeAndDependentProperties):
(WebCore::AXIsolatedTree::updateChildren):
(WebCore::AXIsolatedTree::updateTableProperties): Deleted.
(WebCore::AXIsolatedTree::updateTreeItemProperties): Deleted.
(WebCore::AXIsolatedTree::updateRelatedProperties): Deleted.
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:

Canonical link: https://commits.webkit.org/251732@main

Modified Paths

trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value-expected.txt
trunk/LayoutTests/accessibility/mac/label-element-changing-children-string-value.html
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h




Diff

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 @@
 
 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 @@
 
 
 
-
-
-


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)
+++ 

[webkit-changes] [295720] trunk/LayoutTests/accessibility/mac

2022-06-21 Thread andresg_22
Title: [295720] trunk/LayoutTests/accessibility/mac








Revision 295720
Author andresg...@apple.com
Date 2022-06-21 20:50:19 -0700 (Tue, 21 Jun 2022)


Log Message
AX ITM: Fix for accessibility/mac/details-summary.html in isolated tree mode.
https://bugs.webkit.org/show_bug.cgi?id=241804

Reviewed by Darin Adler.

Need to check for null the accessible object in the waitFor function before calling isExpanded. Also buffering the output in a variable makes the test run faster.

* LayoutTests/accessibility/mac/details-summary-expected.txt:
* LayoutTests/accessibility/mac/details-summary.html:

Canonical link: https://commits.webkit.org/251725@main

Modified Paths

trunk/LayoutTests/accessibility/mac/details-summary-expected.txt
trunk/LayoutTests/accessibility/mac/details-summary.html




Diff

Modified: trunk/LayoutTests/accessibility/mac/details-summary-expected.txt (295719 => 295720)

--- trunk/LayoutTests/accessibility/mac/details-summary-expected.txt	2022-06-22 03:22:54 UTC (rev 295719)
+++ trunk/LayoutTests/accessibility/mac/details-summary-expected.txt	2022-06-22 03:50:19 UTC (rev 295720)
@@ -1,37 +1,28 @@
-Some open info
-Details about the open topic.
-
-Some open info
-Some open info
-Details about the open topic.
-
 This tests some basic attributes about the details element.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS details1.role is 'AXRole: AXGroup'
-PASS details1.subrole is 'AXSubrole: AXDetails'
-PASS details1.isExpanded is true
-PASS summary1.role is 'AXRole: AXButton'
-PASS summary1.subrole is 'AXSubrole: AXSummary'
-PASS summary1.title is 'AXTitle: Some open info'
-PASS details1.isAttributeSettable('AXExpanded') is true
+PASS: details1.role === 'AXRole: AXGroup'
+PASS: details1.subrole === 'AXSubrole: AXDetails'
+PASS: details1.isExpanded === true
+PASS: summary1.role === 'AXRole: AXButton'
+PASS: summary1.subrole === 'AXSubrole: AXSummary'
+PASS: summary1.title === 'AXTitle: Some open info'
+PASS: details1.isAttributeSettable('AXExpanded') === true
 Received AXExpandedChanged notification
-PASS details1.isExpanded is false
-PASS summary1.isExpanded is false
-PASS details1.isExpanded is false
-PASS summary1.isExpanded is false
+PASS: details1.isExpanded === false
+PASS: summary1.isExpanded === false
+PASS: details1.isExpanded === false
+PASS: summary1.isExpanded === false
 Received AXExpandedChanged notification
-PASS details1.isExpanded is true
-PASS summary1.isExpanded is true
-PASS details1.isExpanded is true
-PASS summary1.isExpanded is true
-PASS details2.subrole is 'AXSubrole: AXDetails'
-PASS details2.isExpanded is false
-PASS details3.subrole is 'AXSubrole: AXApplicationGroup'
-PASS details3.isExpanded is true
+PASS: details1.isExpanded === true
+PASS: summary1.isExpanded === true
+PASS: details1.isExpanded === true
+PASS: summary1.isExpanded === true
+PASS: details2.subrole === 'AXSubrole: AXDetails'
+PASS: details2.isExpanded === false
+PASS: details3.subrole === 'AXSubrole: AXApplicationGroup'
+PASS: details3.isExpanded === true
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
 
+


Modified: trunk/LayoutTests/accessibility/mac/details-summary.html (295719 => 295720)

--- trunk/LayoutTests/accessibility/mac/details-summary.html	2022-06-22 03:22:54 UTC (rev 295719)
+++ trunk/LayoutTests/accessibility/mac/details-summary.html	2022-06-22 03:50:19 UTC (rev 295720)
@@ -1,11 +1,12 @@
 
 
 
-+