Diff
Modified: trunk/LayoutTests/ChangeLog (271586 => 271587)
--- trunk/LayoutTests/ChangeLog 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/LayoutTests/ChangeLog 2021-01-18 23:54:57 UTC (rev 271587)
@@ -1,3 +1,27 @@
+2021-01-18 Andres Gonzalez <[email protected]>
+
+ Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode.
+ https://bugs.webkit.org/show_bug.cgi?id=220644
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/canvas-fallback-content-2-expected.txt:
+ Removed the checks for the document.activeElement since the goal here is
+ not to test this method.
+
+ * accessibility/canvas-fallback-content-2.html:
+ Retrieved the accessibility Objects by ID directly from the accessibilityController.
+ This simplifies the code since it is not necessary to set focus to the
+ object via the document, to then retrieve the focused accessibility element.
+ This works for isolated tree mode on and off.
+
+ * accessibility/canvas-fallback-content.html:
+ Kept the focus manipulations but used Promises to make it work in both
+ isolated mode on and off.
+
+ * platform/win/accessibility/canvas-fallback-content-expected.txt: Deleted.
+ * platform/win/TestExpectations: Skip since this test was already failing in win.
+
2021-01-18 Fujii Hironori <[email protected]>
createImageBitmap() causes null pointer dereference using Cairo lib
Modified: trunk/LayoutTests/accessibility/canvas-fallback-content-2-expected.txt (271586 => 271587)
--- trunk/LayoutTests/accessibility/canvas-fallback-content-2-expected.txt 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/LayoutTests/accessibility/canvas-fallback-content-2-expected.txt 2021-01-18 23:54:57 UTC (rev 271587)
@@ -14,9 +14,7 @@
link1
-PASS document.activeElement == element1 is true
link2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -31,9 +29,7 @@
PASS axElement2.maxValue is axElement1.maxValue
button1
-PASS document.activeElement == element1 is true
button2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -48,9 +44,7 @@
PASS axElement2.maxValue is axElement1.maxValue
labeled-button1
-PASS document.activeElement == element1 is true
labeled-button2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -65,9 +59,7 @@
PASS axElement2.maxValue is axElement1.maxValue
button-with-title1
-PASS document.activeElement == element1 is true
button-with-title2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -82,9 +74,7 @@
PASS axElement2.maxValue is axElement1.maxValue
text1
-PASS document.activeElement == element1 is true
text2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -99,9 +89,7 @@
PASS axElement2.maxValue is axElement1.maxValue
checkbox1
-PASS document.activeElement == element1 is true
checkbox2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -116,9 +104,7 @@
PASS axElement2.maxValue is axElement1.maxValue
number1
-PASS document.activeElement == element1 is true
number2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -133,9 +119,7 @@
PASS axElement2.maxValue is axElement1.maxValue
radio1
-PASS document.activeElement == element1 is true
radio2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -150,9 +134,7 @@
PASS axElement2.maxValue is axElement1.maxValue
slider1
-PASS document.activeElement == element1 is true
slider2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -167,9 +149,7 @@
PASS axElement2.maxValue is axElement1.maxValue
submit1
-PASS document.activeElement == element1 is true
submit2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -184,9 +164,7 @@
PASS axElement2.maxValue is axElement1.maxValue
combobox1
-PASS document.activeElement == element1 is true
combobox2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -201,9 +179,7 @@
PASS axElement2.maxValue is axElement1.maxValue
listbox1
-PASS document.activeElement == element1 is true
listbox2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -218,9 +194,7 @@
PASS axElement2.maxValue is axElement1.maxValue
textarea1
-PASS document.activeElement == element1 is true
textarea2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -235,9 +209,7 @@
PASS axElement2.maxValue is axElement1.maxValue
focusable1
-PASS document.activeElement == element1 is true
focusable2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -252,9 +224,7 @@
PASS axElement2.maxValue is axElement1.maxValue
heading1
-PASS document.activeElement == element1 is true
heading2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -269,9 +239,7 @@
PASS axElement2.maxValue is axElement1.maxValue
aria-button1
-PASS document.activeElement == element1 is true
aria-button2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -286,9 +254,7 @@
PASS axElement2.maxValue is axElement1.maxValue
aria-disabledbutton1
-PASS document.activeElement == element1 is true
aria-disabledbutton2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -303,9 +269,7 @@
PASS axElement2.maxValue is axElement1.maxValue
aria-enabledbutton1
-PASS document.activeElement == element1 is true
aria-enabledbutton2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -320,9 +284,7 @@
PASS axElement2.maxValue is axElement1.maxValue
aria-requiredbutton1
-PASS document.activeElement == element1 is true
aria-requiredbutton2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -337,9 +299,7 @@
PASS axElement2.maxValue is axElement1.maxValue
aria-togglebutton1
-PASS document.activeElement == element1 is true
aria-togglebutton2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
@@ -354,9 +314,7 @@
PASS axElement2.maxValue is axElement1.maxValue
aria-link1
-PASS document.activeElement == element1 is true
aria-link2
-PASS document.activeElement == element2 is true
PASS axElement2.role is axElement1.role
PASS axElement2.roleDescription is axElement1.roleDescription
PASS axElement2.title is axElement1.title
Modified: trunk/LayoutTests/accessibility/canvas-fallback-content-2.html (271586 => 271587)
--- trunk/LayoutTests/accessibility/canvas-fallback-content-2.html 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/LayoutTests/accessibility/canvas-fallback-content-2.html 2021-01-18 23:54:57 UTC (rev 271587)
@@ -1,7 +1,9 @@
<!DOCTYPE HTML>
<html>
+<head>
+<script src=""
+</head>
<body>
-<script src=""
<div>
<a id="link1" href=""
@@ -52,65 +54,57 @@
</canvas>
<div id="console"></div>
+
<script>
-description("This tests a number of different elements in canvas fallback content to make sure their accessible attributes are essentially identical to the corresponding elements outside of canvas fallback content.");
+ description("This tests a number of different elements in canvas fallback content to make sure their accessible attributes are essentially identical to the corresponding elements outside of canvas fallback content.");
-if (window.testRunner && window.accessibilityController) {
- window.testRunner.dumpAsText();
+ if (window.testRunner && window.accessibilityController) {
+ window.testRunner.dumpAsText();
- function check(id1, id2) {
- debug(id1);
- window.element1 = document.getElementById(id1);
- element1.focus();
- shouldBe("document.activeElement == element1", "true");
- window.axElement1 = accessibilityController.focusedElement;
+ function check(id1, id2) {
+ window.axElement1 = accessibilityController.accessibleElementById(id1);
+ window.axElement2 = accessibilityController.accessibleElementById(id2);
- debug(id2);
- window.element2 = document.getElementById(id2);
- element2.focus();
- shouldBe("document.activeElement == element2", "true");
- window.axElement2 = accessibilityController.focusedElement;
+ debug(id1);
+ debug(id2);
+ shouldBe("axElement2.role", "axElement1.role");
+ shouldBe("axElement2.roleDescription", "axElement1.roleDescription");
+ shouldBe("axElement2.title", "axElement1.title");
+ shouldBe("axElement2.description", "axElement1.description");
+ shouldBe("axElement2.helpText", "axElement1.helpText");
+ shouldBe("axElement2.stringValue", "axElement1.stringValue");
+ shouldBe("axElement2.isEnabled", "axElement1.isEnabled");
+ shouldBe("axElement2.isRequired", "axElement1.isRequired");
+ shouldBe("axElement2.isChecked", "axElement1.isChecked");
+ shouldBe("axElement2.intValue", "axElement1.intValue");
+ shouldBe("axElement2.minValue", "axElement1.minValue");
+ shouldBe("axElement2.maxValue", "axElement1.maxValue");
+ debug("");
+ }
- shouldBe("axElement2.role", "axElement1.role");
- shouldBe("axElement2.roleDescription", "axElement1.roleDescription");
- shouldBe("axElement2.title", "axElement1.title");
- shouldBe("axElement2.description", "axElement1.description");
- shouldBe("axElement2.helpText", "axElement1.helpText");
- shouldBe("axElement2.stringValue", "axElement1.stringValue");
- shouldBe("axElement2.isEnabled", "axElement1.isEnabled");
- shouldBe("axElement2.isRequired", "axElement1.isRequired");
- shouldBe("axElement2.isChecked", "axElement1.isChecked");
- shouldBe("axElement2.intValue", "axElement1.intValue");
- shouldBe("axElement2.minValue", "axElement1.minValue");
- shouldBe("axElement2.maxValue", "axElement1.maxValue");
- debug("");
+ check("link1", "link2");
+ check("button1", "button2");
+ check("labeled-button1", "labeled-button2");
+ check("button-with-title1", "button-with-title2");
+ check("text1", "text2");
+ check("checkbox1", "checkbox2");
+ check("number1", "number2");
+ check("radio1", "radio2");
+ check("slider1", "slider2");
+ check("submit1", "submit2");
+ check("combobox1", "combobox2");
+ check("listbox1", "listbox2");
+ check("textarea1", "textarea2");
+ check("focusable1", "focusable2");
+ check("heading1", "heading2");
+ check("aria-button1", "aria-button2");
+ check("aria-disabledbutton1", "aria-disabledbutton2");
+ check("aria-enabledbutton1", "aria-enabledbutton2");
+ check("aria-requiredbutton1", "aria-requiredbutton2");
+ check("aria-togglebutton1", "aria-togglebutton2");
+ check("aria-link1", "aria-link2");
}
-
- check("link1", "link2");
- check("button1", "button2");
- check("labeled-button1", "labeled-button2");
- check("button-with-title1", "button-with-title2");
- check("text1", "text2");
- check("checkbox1", "checkbox2");
- check("number1", "number2");
- check("radio1", "radio2");
- check("slider1", "slider2");
- check("submit1", "submit2");
- check("combobox1", "combobox2");
- check("listbox1", "listbox2");
- check("textarea1", "textarea2");
- check("focusable1", "focusable2");
- check("heading1", "heading2");
- check("aria-button1", "aria-button2");
- check("aria-disabledbutton1", "aria-disabledbutton2");
- check("aria-enabledbutton1", "aria-enabledbutton2");
- check("aria-requiredbutton1", "aria-requiredbutton2");
- check("aria-togglebutton1", "aria-togglebutton2");
- check("aria-link1", "aria-link2");
-}
-
</script>
-
<script src=""
</body>
</html>
Modified: trunk/LayoutTests/accessibility/canvas-fallback-content.html (271586 => 271587)
--- trunk/LayoutTests/accessibility/canvas-fallback-content.html 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/LayoutTests/accessibility/canvas-fallback-content.html 2021-01-18 23:54:57 UTC (rev 271587)
@@ -1,13 +1,16 @@
<!DOCTYPE HTML>
<html>
-<body>
+<head>
<script src=""
<script src=""
+
<style>
myelement {
display: block;
}
</style>
+</head>
+<body>
<div>
<a id="link1" href=""
@@ -36,64 +39,131 @@
</canvas>
<div id="console"></div>
+
<script>
-description("This test makes sure that focusable elements in canvas fallback content are accessible.");
+ description("This test makes sure that focusable elements in canvas fallback content are accessible.");
-if (window.testRunner && window.accessibilityController) {
- window.jsTestIsAsync = true;
- window.testRunner.dumpAsText();
+ if (window.testRunner && window.accessibilityController) {
+ window.jsTestIsAsync = true;
+ window.testRunner.dumpAsText();
- function check(id, expectedRole) {
- debug(id);
- window.element = document.getElementById(id);
- element.focus();
- shouldBe("document.activeElement == element", "true");
- window.axElement = accessibilityController.focusedElement;
- shouldBe("axElement.role", "\"" + expectedRole + "\"");
- debug("");
- }
+ var comboBoxRole = platformRoleForComboBox(accessibilityController.platformName);
- var comboBoxRole = platformRoleForComboBox(accessibilityController.platformName);
+ function check(id, expectedRole) {
+ window.element = document.getElementById(id);
+ element.focus();
- // Check rendered controls.
- check("link1", "AXRole: AXLink");
- check("button1", "AXRole: AXButton");
- check("text1", "AXRole: AXTextField");
- check("checkbox1", "AXRole: AXCheckBox");
- check("radio1", "AXRole: AXRadioButton");
- check("submit1", "AXRole: AXButton");
- check("combobox1", comboBoxRole);
- check("focusable1", "AXRole: AXGroup");
- check("aria-button1", "AXRole: AXButton");
- check("aria-link1", "AXRole: AXLink");
+ window.axElement = accessibilityController.focusedElement;
+ if (axElement.role == expectedRole) {
+ // Do all the logging here and return true.
+ debug(id);
+ shouldBe("document.activeElement == element", "true");
+ shouldBe("axElement.role", "\"" + expectedRole + "\"");
+ debug("");
+ return true;
+ }
- // Check unrendered controls inside a canvas.
- check("link2", "AXRole: AXLink");
- check("button2", "AXRole: AXButton");
- check("text2", "AXRole: AXTextField");
- check("checkbox2", "AXRole: AXCheckBox");
- check("radio2", "AXRole: AXRadioButton");
- check("submit2", "AXRole: AXButton");
- check("combobox2", comboBoxRole);
- check("focusable2", "AXRole: AXGroup");
- check("aria-button2", "AXRole: AXButton");
- check("aria-link2", "AXRole: AXLink");
+ return false;
+ }
- // Check that the role is updated when the element changes.
- document.getElementById('focusable1').setAttribute('role', 'button');
- setTimeout(function() {
- check("focusable1", "AXRole: AXButton");
- }, 1);
+ setTimeout(async function() {
+ // Check rendered controls.
+ await waitFor(() => {
+ return check("link1", "AXRole: AXLink");
+ });
- document.getElementById('focusable2').setAttribute('role', 'button');
- setTimeout(function() {
- check("focusable2", "AXRole: AXButton");
- finishJSTest();
- }, 1);
-}
+ await waitFor(() => {
+ return check("button1", "AXRole: AXButton");
+ });
+ await waitFor(() => {
+ return check("text1", "AXRole: AXTextField");
+ });
+
+ await waitFor(() => {
+ return check("checkbox1", "AXRole: AXCheckBox");
+ });
+
+ await waitFor(() => {
+ return check("radio1", "AXRole: AXRadioButton");
+ });
+
+ await waitFor(() => {
+ return check("submit1", "AXRole: AXButton");
+ });
+
+ await waitFor(() => {
+ return check("combobox1", comboBoxRole);
+ });
+
+ await waitFor(() => {
+ return check("focusable1", "AXRole: AXGroup");
+ });
+
+ await waitFor(() => {
+ return check("aria-button1", "AXRole: AXButton");
+ });
+
+ await waitFor(() => {
+ return check("aria-link1", "AXRole: AXLink");
+ });
+
+ // Check unrendered controls inside a canvas.
+ await waitFor(() => {
+ return check("link2", "AXRole: AXLink");
+ });
+
+ await waitFor(() => {
+ return check("button2", "AXRole: AXButton");
+ });
+
+ await waitFor(() => {
+ return check("text2", "AXRole: AXTextField");
+ });
+
+ await waitFor(() => {
+ return check("checkbox2", "AXRole: AXCheckBox");
+ });
+
+ await waitFor(() => {
+ return check("radio2", "AXRole: AXRadioButton");
+ });
+
+ await waitFor(() => {
+ return check("submit2", "AXRole: AXButton");
+ });
+
+ await waitFor(() => {
+ return check("combobox2", comboBoxRole);
+ });
+
+ await waitFor(() => {
+ return check("focusable2", "AXRole: AXGroup");
+ });
+
+ await waitFor(() => {
+ return check("aria-button2", "AXRole: AXButton");
+ });
+
+ await waitFor(() => {
+ return check("aria-link2", "AXRole: AXLink");
+ });
+
+ // Check that the role is updated when the element changes.
+ document.getElementById('focusable1').setAttribute('role', 'button');
+ await waitFor(() => {
+ return check("focusable1", "AXRole: AXButton");
+ });
+
+ document.getElementById('focusable2').setAttribute('role', 'button');
+ await waitFor(() => {
+ return check("focusable2", "AXRole: AXButton");
+ });
+
+ finishJSTest();
+ }, 0);
+ }
</script>
-
<script src=""
</body>
</html>
Modified: trunk/LayoutTests/platform/win/TestExpectations (271586 => 271587)
--- trunk/LayoutTests/platform/win/TestExpectations 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/LayoutTests/platform/win/TestExpectations 2021-01-18 23:54:57 UTC (rev 271587)
@@ -1638,7 +1638,7 @@
accessibility/aria-roledescription.html [ Failure ]
# Attempt to add a text element that claims NOT to be an accessibility element:
-webkit.org/b/140870 [ Debug ] accessibility/canvas-fallback-content.html [ Skip ]
+webkit.org/b/140870 accessibility/canvas-fallback-content.html [ Skip ]
webkit.org/b/140870 [ Debug ] accessibility/canvas-accessibilitynodeobject.html [ Skip ]
# Asserts because it does not have a popup menu:
Deleted: trunk/LayoutTests/platform/win/accessibility/canvas-fallback-content-expected.txt (271586 => 271587)
--- trunk/LayoutTests/platform/win/accessibility/canvas-fallback-content-expected.txt 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/LayoutTests/platform/win/accessibility/canvas-fallback-content-expected.txt 2021-01-18 23:54:57 UTC (rev 271587)
@@ -1,101 +0,0 @@
-Link Button
-Focusable
-ARIA button
-ARIA link
-This test makes sure that focusable elements in canvas fallback content are accessible.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-link1
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXLink"
-
-button1
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXButton"
-
-text1
-PASS document.activeElement == element is true
-FAIL axElement.role should be AXRole: AXTextField. Was AXRole: AXStaticText.
-
-checkbox1
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXCheckBox"
-
-radio1
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXRadioButton"
-
-submit1
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXButton"
-
-combobox1
-PASS document.activeElement == element is true
-FAIL axElement.role should be AXRole: AXPopUpButton. Was AXRole: AXComboBox.
-
-focusable1
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXGroup"
-
-aria-button1
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXButton"
-
-aria-link1
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXLink"
-
-link2
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXLink"
-
-button2
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXButton"
-
-text2
-PASS document.activeElement == element is true
-FAIL axElement.role should be AXRole: AXTextField. Was AXRole: AXStaticText.
-
-checkbox2
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXCheckBox"
-
-radio2
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXRadioButton"
-
-submit2
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXButton"
-
-combobox2
-PASS document.activeElement == element is true
-FAIL axElement.role should be AXRole: AXPopUpButton. Was AXRole: AXComboBox.
-
-focusable2
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXGroup"
-
-aria-button2
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXButton"
-
-aria-link2
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXLink"
-
-focusable1
-PASS document.activeElement == element is true
-FAIL axElement.role should be AXRole: AXButton. Was AXRole: AXGroup.
-
-focusable2
-PASS document.activeElement == element is true
-PASS axElement.role is "AXRole: AXButton"
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Modified: trunk/Source/WebCore/ChangeLog (271586 => 271587)
--- trunk/Source/WebCore/ChangeLog 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/Source/WebCore/ChangeLog 2021-01-18 23:54:57 UTC (rev 271587)
@@ -1,3 +1,28 @@
+2021-01-18 Andres Gonzalez <[email protected]>
+
+ Fix for LayoutTests/accessibility/canvas-fallback-content.html in isolated tree mode.
+ https://bugs.webkit.org/show_bug.cgi?id=220644
+
+ Reviewed by Chris Fleizach.
+
+ Tests:
+ accessibility/canvas-fallback-content.html
+ accessibility/canvas-fallback-content-2.html
+
+ - Updates the accessibility isolated tree when the ARIA role attribute
+ changes for a DOM element.
+ - Modified tests to use Promises and retrieve accessible elements by IDs
+ so that they work in both isolated tree mode on and off.
+
+ * accessibility/AXLogger.cpp:
+ (WebCore::operator<<): Added new value to the AXNotification enum.
+ * accessibility/AXObjectCache.cpp:
+ (WebCore::AXObjectCache::handleAriaRoleChanged):
+ Updates the isolated tree when an ARIA role attribute changes.
+ (WebCore::AXObjectCache::updateIsolatedTree):
+ Handles the AXAriaRoleChanged notification.
+ * accessibility/AXObjectCache.h:
+
2021-01-18 Nikolas Zimmermann <[email protected]>
Remove recently added glue code: RenderLayer::(setAdjustForIOSCaretWhenScrolling / setScrollShouldClearLatchedState / setConstrainsScrollingToContentEdge)
Modified: trunk/Source/WebCore/accessibility/AXLogger.cpp (271586 => 271587)
--- trunk/Source/WebCore/accessibility/AXLogger.cpp 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/Source/WebCore/accessibility/AXLogger.cpp 2021-01-18 23:54:57 UTC (rev 271587)
@@ -342,6 +342,12 @@
case AXObjectCache::AXNotification::AXActiveDescendantChanged:
stream << "AXActiveDescendantChanged";
break;
+ case AXObjectCache::AXNotification::AXAriaAttributeChanged:
+ stream << "AXAriaAttributeChanged";
+ break;
+ case AXObjectCache::AXNotification::AXAriaRoleChanged:
+ stream << "AXAriaRoleChanged";
+ break;
case AXObjectCache::AXNotification::AXAutocorrectionOccured:
stream << "AXAutocorrectionOccured";
break;
@@ -441,9 +447,6 @@
case AXObjectCache::AXNotification::AXTextChanged:
stream << "AXTextChanged";
break;
- case AXObjectCache::AXNotification::AXAriaAttributeChanged:
- stream << "AXAriaAttributeChanged";
- break;
case AXObjectCache::AXNotification::AXElementBusyChanged:
stream << "AXElementBusyChanged";
break;
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (271586 => 271587)
--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp 2021-01-18 23:54:57 UTC (rev 271587)
@@ -1684,8 +1684,13 @@
stopCachingComputedObjectAttributes();
// Don't make an AX object unless it's needed
- if (AccessibilityObject* obj = get(node)) {
+ if (auto* obj = get(node)) {
obj->updateAccessibilityRole();
+
+#if ENABLE(ACCESSIBILITY_ISOLATED_TREE)
+ updateIsolatedTree(obj, AXObjectCache::AXAriaRoleChanged);
+#endif
+
obj->notifyIfIgnoredValueChanged();
}
}
@@ -3176,6 +3181,9 @@
}
switch (notification) {
+ case AXAriaRoleChanged:
+ tree->updateNode(object);
+ break;
case AXCheckedStateChanged:
tree->updateNodeProperty(object, AXPropertyName::IsChecked);
break;
@@ -3242,6 +3250,9 @@
continue;
switch (notification.second) {
+ case AXAriaRoleChanged:
+ tree->updateNode(*notification.first);
+ break;
case AXCheckedStateChanged:
tree->updateNodeProperty(*notification.first, AXPropertyName::IsChecked);
break;
Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (271586 => 271587)
--- trunk/Source/WebCore/accessibility/AXObjectCache.h 2021-01-18 21:49:43 UTC (rev 271586)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h 2021-01-18 23:54:57 UTC (rev 271587)
@@ -272,6 +272,8 @@
enum AXNotification {
AXActiveDescendantChanged,
+ AXAriaAttributeChanged,
+ AXAriaRoleChanged,
AXAutocorrectionOccured,
AXCheckedStateChanged,
AXChildrenChanged,
@@ -305,7 +307,6 @@
AXReadOnlyStatusChanged,
AXRequiredStatusChanged,
AXTextChanged,
- AXAriaAttributeChanged,
AXElementBusyChanged,
AXDraggingStarted,
AXDraggingEnded,