AX: Remove firstChild, lastChild, previousSibling, nextSibling, nextSiblingUnignored...
commit6b16c9e68f549c904f239af8c52dd70cfcc27d53
authortyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Mar 2022 15:53:44 +0000 (24 15:53 +0000)
committertyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Mar 2022 15:53:44 +0000 (24 15:53 +0000)
treebf373c564aeddcfb7cf3a996a031a34ccff65ced
parent5f76696fb7e4cf00979f9b70ab069e051776a6e6
AX: Remove firstChild, lastChild, previousSibling, nextSibling, nextSiblingUnignored, and previousSiblingUnignored from the AXCoreObject interface
https://bugs.webkit.org/show_bug.cgi?id=238267

Reviewed by Andres Gonzalez.

All of these except nextSibling and previousSibling are ASSERT_NOT_REACHED no-ops
in AXIsolatedObject. We do compute next and previous sibling for isolated objects,
but they're only used in one place (appendChildrenToArray). Usage of these functions
in appendChildrenToArray doesn't make sense for isolated objects, as it would require
the isolated object to be ignored for them to be called, and we should never have created an
isolated object from an ignored live object.

Dovetailing from that, this patch also removes AXPropertyName::IsAccessibilityIgnored,
since this should always be false for isolated objects. ASSERTs have been added in a
few places to assure this is the case.

* accessibility/AccessibilityObject.cpp:
(WebCore::Accessibility::appendChildrenToArray):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::firstChild const):
(WebCore::AccessibilityObject::lastChild const):
(WebCore::AccessibilityObject::previousSibling const):
(WebCore::AccessibilityObject::nextSibling const):
* accessibility/AccessibilityObjectInterface.h:
* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):
(WebCore::AXIsolatedObject::firstChild const): Deleted.
(WebCore::AXIsolatedObject::lastChild const): Deleted.
(WebCore::AXIsolatedObject::nextSiblingUnignored const): Deleted.
(WebCore::AXIsolatedObject::previousSiblingUnignored const): Deleted.
* accessibility/isolatedtree/AXIsolatedObject.h:
* accessibility/isolatedtree/AXIsolatedTree.h:
Remove AXPropertyName::NextSibling, AXPropertyName::PreviousSibling,
AXPropertyName::IsAccessibilityIgnored.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@291798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityObjectInterface.h
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h