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: http://svn.webkit.org/repository/webkit/trunk@103552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
11 files changed