Add "VisibleOnly" key to search predicate
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Jun 2013 19:21:59 +0000 (19:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 4 Jun 2013 19:21:59 +0000 (19:21 +0000)
commitd1f7fbd0a0c84fdde62e9a9b9b3c695e0b94bb24
tree97038bc9638c8019640f16c4b6c6eec48b730851
parent4014b039e1341108952fd1124ec4ff7a2a24c86c
Add "VisibleOnly" key to search predicate
https://bugs.webkit.org/show_bug.cgi?id=115491

Patch by Greg Hughes <ghughes@apple.com> on 2013-06-04
Reviewed by Chris Fleizach.

Source/WebCore:

Added support for accessibility clients to use the search predicate to find only visible elements

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
(WebCore::AccessibilityObject::isOnscreen):
(WebCore):
* accessibility/AccessibilityObject.h:
(AccessibilitySearchCriteria):
(WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
(AccessibilityObject):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

Tools:

Added support for accessibility clients to use the search predicate to find only visible elements

* DumpRenderTree/AccessibilityUIElement.cpp:
(uiElementForSearchPredicateCallback):
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement):
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::uiElementForSearchPredicate):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(AccessibilityUIElement):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):

LayoutTests:

Added tests support for visibleOnly search predicate.

* platform/mac/accessibility/search-predicate-expected.txt:
* platform/mac/accessibility/search-predicate.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/attributed-string-includes-highlighting.html
LayoutTests/platform/mac/accessibility/search-predicate-expected.txt
LayoutTests/platform/mac/accessibility/search-predicate.html
LayoutTests/platform/mac/accessibility/search-when-element-starts-in-table.html
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
Tools/ChangeLog
Tools/DumpRenderTree/AccessibilityUIElement.cpp
Tools/DumpRenderTree/AccessibilityUIElement.h
Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm