AX: attributed strings do not include AXHeading information when a link is contained...
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2011 18:03:10 +0000 (18:03 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2011 18:03:10 +0000 (18:03 +0000)
commit74e2b5a9449294a395565b0de1b41d873fbfb710
tree05b54742d2700f072fcc66a4b07fe8929f530fa3
parent09c9f47cec5855ba52074df2c9e7b2925270c47d
AX: attributed strings do not include AXHeading information when a link is contained within the heading
https://bugs.webkit.org/show_bug.cgi?id=75059

Reviewed by Darin Adler.

Source/WebCore:

An attributed string should contain the heading level of an ancestor node if it exists.
This change allows the ancestor to be higher up in the hierarchy than just the direct parent.

Test: platform/mac/accessibility/heading-and-link-attributed-string.html

* accessibility/mac/WebAccessibilityObjectWrapper.mm:
  (AXAttributeStringSetHeadingLevel):

Tools:

Support the ability to check if an arbitrary attribute is present within an
attributed string that can be retrieved through an AccessibilityTextMarkerRange.

* DumpRenderTree/AccessibilityUIElement.cpp:
(attributedStringForTextMarkerRangeContainsAttributeCallback):
(AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute):

LayoutTests:

* platform/mac/accessibility/heading-and-link-attributed-string-expected.txt: Added.
* platform/mac/accessibility/heading-and-link-attributed-string.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
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