AX: Support solution to handle invalid ax text marker
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Mar 2012 04:03:03 +0000 (04:03 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Mar 2012 04:03:03 +0000 (04:03 +0000)
commitde51d4b6b8abda133260415a5c89dd2232a4d1e6
tree489f9cb99705f3a3798ff2db63835964c1a9ef13
parente62d83e1528c399468b8985c34848c427ef77079
AX: Support solution to handle invalid ax text marker
https://bugs.webkit.org/show_bug.cgi?id=82023

Reviewed by Oliver Hunt.

Source/WebCore:

This provides methods to better use text markers so that assistive technologies
can know when they are valid, and can convert them to and from absolute positions.

Test: platform/mac/accessibility/textmarker-routines.html

* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
(-[WebAccessibilityObjectWrapper _convertToNSRange:]):
(-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
(-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):

Tools:

* DumpRenderTree/AccessibilityUIElement.cpp:
(indexForTextMarkerCallback):
(isTextMarkerValidCallback):
(textMarkerForIndexCallback):
(AccessibilityUIElement::indexForTextMarker):
(AccessibilityUIElement::isTextMarkerValid):
(AccessibilityUIElement::textMarkerForIndex):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
(AccessibilityUIElement):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::indexForTextMarker):
(AccessibilityUIElement::textMarkerForIndex):
(AccessibilityUIElement::isTextMarkerValid):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::indexForTextMarker):
(WTR::AccessibilityUIElement::isTextMarkerValid):
(WTR::AccessibilityUIElement::textMarkerForIndex):
(WTR):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(AccessibilityUIElement):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR):
(WTR::AccessibilityUIElement::indexForTextMarker):
(WTR::AccessibilityUIElement::isTextMarkerValid):
(WTR::AccessibilityUIElement::textMarkerForIndex):

LayoutTests:

* platform/mac/accessibility/textmarker-routines-expected.txt: Added.
* platform/mac/accessibility/textmarker-routines.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/textmarker-routines-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/textmarker-routines.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm
Tools/ChangeLog
Tools/DumpRenderTree/AccessibilityUIElement.cpp
Tools/DumpRenderTree/AccessibilityUIElement.h
Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm