AX: [ATK] Implement support for new AtkRole types for MathML
authorjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Jan 2015 17:02:32 +0000 (17:02 +0000)
committerjdiggs@igalia.com <jdiggs@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Jan 2015 17:02:32 +0000 (17:02 +0000)
commit6939f730448d91ef927f30fe7351691605202ad5
tree38192cdebc9cfc999ec4c1158c3642def8f1e578
parent1e4b1e0af033e29fe3ad8dce00b3b21d6ef70873
AX: [ATK] Implement support for new AtkRole types for MathML
https://bugs.webkit.org/show_bug.cgi?id=140916

Reviewed by Chris Fleizach.

Source/WebCore:

Expose mfrac as ATK_ROLE_MATH_FRACTION, and both mroot and msqrt as
ATK_ROLE_MATH_ROOT. In the case of script elements, expose the container
(msub, msup, msubsup, and mmultiscripts) using the generic text block role
ATK_ROLE_SECTION. Then expose the actual script child elements using role
ATK_ROLE_SUBSCRIPT/ATK_ROLE_SUPERSCRIPT. In the case of mmultiscripts,
expose whether it is a prescript or postscript via AtkObject attribute.

Test: accessibility/math-multiscript-attributes.html
Also added additional test cases to accessibility/roles-exposed.html

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isMathScriptObject): Added.
(WebCore::AccessibilityObject::isMathMultiscriptObject): Added.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isMathScriptObject): Added.
(WebCore::AccessibilityRenderObject::isMathMultiscriptObject): Added.
* accessibility/AccessibilityRenderObject.h:
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Expose whether a multiscript object is a prescript or postscript.
(atkRole): Map WebCore Accessibility objects to the new ATK roles.

Tools:

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: Add mapping for new ATK roles
* gtk/jhbuild.modules: Bump minimum version of ATK used by jhbuild to 2.15.4

LayoutTests:

* accessibility/math-multiscript-attributes.html: Added.
* accessibility/roles-exposed.html: New test cases added.
* platform/efl/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/gtk/accessibility/math-multiscript-attributes-expected.txt: Added.
* platform/gtk/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/mac-mavericks/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/mac-mountainlion/accessibility/roles-exposed-expected.txt: Updated for new test cases.
* platform/mac/accessibility/math-multiscript-attributes-expected.txt: Added.
* platform/mac/accessibility/roles-exposed-expected.txt: Updated for new test cases.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/accessibility/math-multiscript-attributes.html [new file with mode: 0644]
LayoutTests/accessibility/roles-exposed.html
LayoutTests/platform/efl/accessibility/roles-exposed-expected.txt
LayoutTests/platform/gtk/accessibility/math-multiscript-attributes-expected.txt [new file with mode: 0644]
LayoutTests/platform/gtk/accessibility/roles-exposed-expected.txt
LayoutTests/platform/mac-mavericks/accessibility/roles-exposed-expected.txt
LayoutTests/platform/mac-mountainlion/accessibility/roles-exposed-expected.txt
LayoutTests/platform/mac/accessibility/math-multiscript-attributes-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/roles-exposed-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityObject.h
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Source/WebCore/accessibility/AccessibilityRenderObject.h
Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
Tools/gtk/jhbuild.modules