AXIsolatedObject::findMatchingObjects implementation.
authorandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Dec 2019 18:51:37 +0000 (18:51 +0000)
committerandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Dec 2019 18:51:37 +0000 (18:51 +0000)
commit41196092e1eb4d5581ee4b1b1f9edc3661795542
treebb3f23da921a1ac48a82b757dbdf43343445ad7d
parente6402b3874b1df388e2d062dc776306edbc0f7c6
AXIsolatedObject::findMatchingObjects implementation.
https://bugs.webkit.org/show_bug.cgi?id=205428

Reviewed by Chris Fleizach.

This method is exercised by several layout tests such as
accessibility/mac/search-predicate.html.

- Moved the search algorithm in the implementation of
AccessibilityObject::findMatchingObjects to the Accessibility namespace,
so that it can be used in AXIsolatedObject as well.
- Static helper functions are also moved into the Accessibility
namespace.
- Changed the signature of containsText to be more appropriate and in
line with other methods.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::containsText const):
(WebCore::AccessibilityObject::findMatchingObjects):
(WebCore::Accessibility::isAccessibilityObjectSearchMatchAtIndex): Moved from AccessibilityObject.
(WebCore::Accessibility::isAccessibilityObjectSearchMatch): Moved from AccessibilityObject.
(WebCore::Accessibility::isAccessibilityTextSearchMatch): Moved from AccessibilityObject.
(WebCore::Accessibility::objectMatchesSearchCriteriaWithResultLimit): Moved from AccessibilityObject.
(WebCore::Accessibility::findMatchingObjects): Search algorithm to be reused by AccessibilityObject and AXIsolatedObject.
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex): Moved.
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch): Moved.
(WebCore::AccessibilityObject::isAccessibilityTextSearchMatch): Moved.
(WebCore::AccessibilityObject::objectMatchesSearchCriteriaWithResultLimit): Moved.
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityObjectInterface.h:
* accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
(WebCore::AXIsolatedObject::findMatchingObjects):
(WebCore::AXIsolatedObject::containsText const):
* accessibility/isolatedtree/AXIsolatedTreeNode.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253769 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/AXIsolatedTreeNode.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedTreeNode.h