Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ATK] Implement allAttributes() for AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118966

Reviewed by Gustavo Noronha Silva.

Tools:

Implemented AccessibilityUIElement::allAttributes() both in
DumpRenderTree and the WebKitTestRunner.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(getAtkAttributeSetAsString): Moved up in the file, and refactored
to use StringBuilder and return a String instead of a gchar*.
(roleToString): Changed not to return the "AXRole: " prefix, so
we can use it as well from attributesOfElement().
(attributesOfElement): New function to dump attributes for an object.
(AccessibilityUIElement::allAttributes): Call attributesOfElement().
(AccessibilityUIElement::role): Updated to prefix "AXRole: ".

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(getAtkAttributeSetAsString): Refactored to use StringBuilder and return
a String instead of a gchar*.

(WTF::roleToString): Changed not to return the "AXRole: " prefix,
so we can use it as well from attributesOfElement().
(WTF::attributesOfElement): New function to dump attributes for an object.
(WTR::AccessibilityUIElement::allAttributes): Call attributesOfElement().
(WTR::AccessibilityUIElement::role): Updated to prefix "AXRole: ".

LayoutTests:

Removed fixed tests from TestExpectations and added/updated expected
results for tests that are now dumping more useful information.

* platform/gtk/TestExpectations: Removed four fixed tests.
* platform/gtk/accessibility/image-link-expected.txt: Updated.
* platform/gtk/accessibility/table-cell-spans-expected.txt: Updated
* platform/gtk/accessibility/table-cells-expected.txt: Updated
* platform/gtk/accessibility/table-detection-expected.txt: Added.
* platform/gtk/accessibility/table-one-cell-expected.txt: Added.
* platform/gtk/accessibility/table-with-rules-expected.txt: Added.
* platform/gtk/accessibility/transformed-element-expected.txt: Added.

Canonical link: https://commits.webkit.org/137203@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mariospr committed Jul 29, 2013
1 parent c48e70d commit 22f8297
Show file tree
Hide file tree
Showing 12 changed files with 1,096 additions and 147 deletions.
19 changes: 19 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,22 @@
2013-07-29 Mario Sanchez Prada <mario.prada@samsung.com>

[ATK] Implement allAttributes() for AccessibilityUIElement
https://bugs.webkit.org/show_bug.cgi?id=118966

Reviewed by Gustavo Noronha Silva.

Removed fixed tests from TestExpectations and added/updated expected
results for tests that are now dumping more useful information.

* platform/gtk/TestExpectations: Removed four fixed tests.
* platform/gtk/accessibility/image-link-expected.txt: Updated.
* platform/gtk/accessibility/table-cell-spans-expected.txt: Updated
* platform/gtk/accessibility/table-cells-expected.txt: Updated
* platform/gtk/accessibility/table-detection-expected.txt: Added.
* platform/gtk/accessibility/table-one-cell-expected.txt: Added.
* platform/gtk/accessibility/table-with-rules-expected.txt: Added.
* platform/gtk/accessibility/transformed-element-expected.txt: Added.

2013-07-29 Antoine Quint <graouts@apple.com>

fast/spatial-navigation test fail on mac-wk2
Expand Down
4 changes: 0 additions & 4 deletions LayoutTests/platform/gtk/TestExpectations
Expand Up @@ -78,11 +78,8 @@ fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html [ WontFix Timeout
webkit.org/b/98348 accessibility/internal-link-anchors2.html [ WontFix Missing ]
webkit.org/b/98348 accessibility/radio-button-group-members.html [ WontFix Missing ]
webkit.org/b/98348 accessibility/table-attributes.html [ WontFix Missing ]
webkit.org/b/98348 accessibility/table-detection.html [ WontFix Missing ]
webkit.org/b/98348 accessibility/table-one-cell.html [ WontFix Missing ]
webkit.org/b/98348 accessibility/table-sections.html [ WontFix Missing ]
webkit.org/b/98348 accessibility/table-with-aria-role.html [ WontFix Missing ]
webkit.org/b/98348 accessibility/table-with-rules.html [ WontFix Missing ]
webkit.org/b/98348 accessibility/plugin.html [ WontFix Missing ]

# Feature disabled, see: https://bugs.webkit.org/show_bug.cgi?id=85425
Expand Down Expand Up @@ -865,7 +862,6 @@ webkit.org/b/98377 accessibility/textarea-insertion-point-line-number.html [ Fai
webkit.org/b/98378 accessibility/textarea-line-for-index.html [ Failure ]
webkit.org/b/98379 accessibility/textarea-selected-text-range.html [ Failure ]
webkit.org/b/98380 accessibility/th-as-title-ui.html [ Failure ]
webkit.org/b/98381 accessibility/transformed-element.html [ Failure ]
webkit.org/b/98382 accessibility/visible-elements.html [ Failure ]

# No platform-specific expectations available until we implement attributesOfChildren().
Expand Down
37 changes: 35 additions & 2 deletions LayoutTests/platform/gtk/accessibility/image-link-expected.txt
Expand Up @@ -3,9 +3,42 @@ Image link in the presence of inline continuations
This test checks that the right accessibility tree is generated for a link inside an image


html-id:test, toolkit:WebKitGtk
AXRole: AXLink
AXParent: AXGroup
AXChildren: 1
AXPosition: { 8.000000, 98.000000 }
AXSize: { 280.000000, 213.000000 }
AXTitle: Delicious cake
AXDescription:
AXValue: <obj>
AXFocusable: 1
AXFocused: 1
AXSelectable: 0
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: html-id:test, toolkit:WebKitGtk

Child 0:
toolkit:WebKitGtk
AXRole: AXImage
AXParent: AXLink: Delicious cake
AXChildren: 0
AXPosition: { 8.000000, 99.000000 }
AXSize: { 280.000000, 210.000000 }
AXTitle: Delicious cake
AXDescription: Delicious cake
AXFocusable: 0
AXFocused: 0
AXSelectable: 0
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk


Expand Up @@ -8,27 +8,112 @@ ROWSPAN="2" 3,2 3,3 3,4
4,2 4,3 4,4
----------------------
{ 0, 0 }
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 154.000000, 9.000000 }
AXSize: { 246.000000, 75.000000 }
AXTitle:
AXDescription:
AXValue: Cell A<\n>COLSPAN="2"<\n>ROWSPAN="2"
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
{0, 2}, {0, 2}

----------------------
{ 1, 1 }
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 154.000000, 9.000000 }
AXSize: { 246.000000, 75.000000 }
AXTitle:
AXDescription:
AXValue: Cell A<\n>COLSPAN="2"<\n>ROWSPAN="2"
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
{0, 2}, {0, 2}

----------------------
{ 3, 0 }
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 147.000000, 84.000000 }
AXSize: { 124.000000, 58.000000 }
AXTitle:
AXDescription:
AXValue: Cell C<\n>ROWSPAN="2"
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
{2, 2}, {0, 1}

----------------------
{ 2, 0 }
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 147.000000, 84.000000 }
AXSize: { 124.000000, 58.000000 }
AXTitle:
AXDescription:
AXValue: Cell C<\n>ROWSPAN="2"
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
{2, 2}, {0, 1}

----------------------
{ 2, 3 }
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 516.000000, 84.000000 }
AXSize: { 124.000000, 29.000000 }
AXTitle:
AXDescription:
AXValue: 3,4
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
{2, 1}, {3, 1}

----------------------
Expand Down
95 changes: 90 additions & 5 deletions LayoutTests/platform/gtk/accessibility/table-cells-expected.txt
Expand Up @@ -10,19 +10,104 @@ South 3333 1111 2222
South 3333 1111 2222
------------------------
[0,0]
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 235.000000, 26.000000 }
AXSize: { 144.000000, 63.000000 }
AXTitle:
AXDescription:
AXValue: Ruritanian<\n>Population <\n>Survey
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
------------------------
[3,1]
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 447.000000, 55.000000 }
AXSize: { 53.000000, 34.000000 }
AXTitle:
AXDescription:
AXValue: Males
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
------------------------
[1,1]
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 227.000000, 26.000000 }
AXSize: { 143.000000, 63.000000 }
AXTitle:
AXDescription:
AXValue: Ruritanian<\n>Population <\n>Survey
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
------------------------
[2,2]
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 370.000000, 89.000000 }
AXSize: { 69.000000, 29.000000 }
AXTitle:
AXDescription:
AXValue: 3333
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
------------------------
[3,5]
toolkit:WebKitGtk
AXRole: AXCell
AXParent: AXTable
AXChildren: 0
AXPosition: { 439.000000, 176.000000 }
AXSize: { 52.000000, 29.000000 }
AXTitle:
AXDescription:
AXValue: 1111
AXFocusable: 0
AXFocused: 0
AXSelectable: 1
AXSelected: 0
AXMultiSelectable: 0
AXEnabled: 1
AXExpanded: 0
AXRequired: 0
AXChecked: 0
AXPlatformAttributes: toolkit:WebKitGtk
------------------------
[100,0]

Expand Down

0 comments on commit 22f8297

Please sign in to comment.