Skip to content

Commit 22f8297

Browse files
committed
[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
1 parent c48e70d commit 22f8297

12 files changed

+1096
-147
lines changed

LayoutTests/ChangeLog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
2013-07-29 Mario Sanchez Prada <mario.prada@samsung.com>
2+
3+
[ATK] Implement allAttributes() for AccessibilityUIElement
4+
https://bugs.webkit.org/show_bug.cgi?id=118966
5+
6+
Reviewed by Gustavo Noronha Silva.
7+
8+
Removed fixed tests from TestExpectations and added/updated expected
9+
results for tests that are now dumping more useful information.
10+
11+
* platform/gtk/TestExpectations: Removed four fixed tests.
12+
* platform/gtk/accessibility/image-link-expected.txt: Updated.
13+
* platform/gtk/accessibility/table-cell-spans-expected.txt: Updated
14+
* platform/gtk/accessibility/table-cells-expected.txt: Updated
15+
* platform/gtk/accessibility/table-detection-expected.txt: Added.
16+
* platform/gtk/accessibility/table-one-cell-expected.txt: Added.
17+
* platform/gtk/accessibility/table-with-rules-expected.txt: Added.
18+
* platform/gtk/accessibility/transformed-element-expected.txt: Added.
19+
120
2013-07-29 Antoine Quint <graouts@apple.com>
221

322
fast/spatial-navigation test fail on mac-wk2

LayoutTests/platform/gtk/TestExpectations

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,8 @@ fast/dom/Window/slow-unload-handler-only-frame-is-stopped.html [ WontFix Timeout
7878
webkit.org/b/98348 accessibility/internal-link-anchors2.html [ WontFix Missing ]
7979
webkit.org/b/98348 accessibility/radio-button-group-members.html [ WontFix Missing ]
8080
webkit.org/b/98348 accessibility/table-attributes.html [ WontFix Missing ]
81-
webkit.org/b/98348 accessibility/table-detection.html [ WontFix Missing ]
82-
webkit.org/b/98348 accessibility/table-one-cell.html [ WontFix Missing ]
8381
webkit.org/b/98348 accessibility/table-sections.html [ WontFix Missing ]
8482
webkit.org/b/98348 accessibility/table-with-aria-role.html [ WontFix Missing ]
85-
webkit.org/b/98348 accessibility/table-with-rules.html [ WontFix Missing ]
8683
webkit.org/b/98348 accessibility/plugin.html [ WontFix Missing ]
8784

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

871867
# No platform-specific expectations available until we implement attributesOfChildren().

LayoutTests/platform/gtk/accessibility/image-link-expected.txt

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,42 @@ Image link in the presence of inline continuations
33
This test checks that the right accessibility tree is generated for a link inside an image
44

55

6-
html-id:test, toolkit:WebKitGtk
6+
AXRole: AXLink
7+
AXParent: AXGroup
8+
AXChildren: 1
9+
AXPosition: { 8.000000, 98.000000 }
10+
AXSize: { 280.000000, 213.000000 }
11+
AXTitle: Delicious cake
12+
AXDescription:
13+
AXValue: <obj>
14+
AXFocusable: 1
15+
AXFocused: 1
16+
AXSelectable: 0
17+
AXSelected: 0
18+
AXMultiSelectable: 0
19+
AXEnabled: 1
20+
AXExpanded: 0
21+
AXRequired: 0
22+
AXChecked: 0
23+
AXPlatformAttributes: html-id:test, toolkit:WebKitGtk
724

825
Child 0:
9-
toolkit:WebKitGtk
26+
AXRole: AXImage
27+
AXParent: AXLink: Delicious cake
28+
AXChildren: 0
29+
AXPosition: { 8.000000, 99.000000 }
30+
AXSize: { 280.000000, 210.000000 }
31+
AXTitle: Delicious cake
32+
AXDescription: Delicious cake
33+
AXFocusable: 0
34+
AXFocused: 0
35+
AXSelectable: 0
36+
AXSelected: 0
37+
AXMultiSelectable: 0
38+
AXEnabled: 1
39+
AXExpanded: 0
40+
AXRequired: 0
41+
AXChecked: 0
42+
AXPlatformAttributes: toolkit:WebKitGtk
1043

1144

LayoutTests/platform/gtk/accessibility/table-cell-spans-expected.txt

Lines changed: 90 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,112 @@ ROWSPAN="2" 3,2 3,3 3,4
88
4,2 4,3 4,4
99
----------------------
1010
{ 0, 0 }
11-
toolkit:WebKitGtk
11+
AXRole: AXCell
12+
AXParent: AXTable
13+
AXChildren: 0
14+
AXPosition: { 154.000000, 9.000000 }
15+
AXSize: { 246.000000, 75.000000 }
16+
AXTitle:
17+
AXDescription:
18+
AXValue: Cell A<\n>COLSPAN="2"<\n>ROWSPAN="2"
19+
AXFocusable: 0
20+
AXFocused: 0
21+
AXSelectable: 1
22+
AXSelected: 0
23+
AXMultiSelectable: 0
24+
AXEnabled: 1
25+
AXExpanded: 0
26+
AXRequired: 0
27+
AXChecked: 0
28+
AXPlatformAttributes: toolkit:WebKitGtk
1229
{0, 2}, {0, 2}
1330

1431
----------------------
1532
{ 1, 1 }
16-
toolkit:WebKitGtk
33+
AXRole: AXCell
34+
AXParent: AXTable
35+
AXChildren: 0
36+
AXPosition: { 154.000000, 9.000000 }
37+
AXSize: { 246.000000, 75.000000 }
38+
AXTitle:
39+
AXDescription:
40+
AXValue: Cell A<\n>COLSPAN="2"<\n>ROWSPAN="2"
41+
AXFocusable: 0
42+
AXFocused: 0
43+
AXSelectable: 1
44+
AXSelected: 0
45+
AXMultiSelectable: 0
46+
AXEnabled: 1
47+
AXExpanded: 0
48+
AXRequired: 0
49+
AXChecked: 0
50+
AXPlatformAttributes: toolkit:WebKitGtk
1751
{0, 2}, {0, 2}
1852

1953
----------------------
2054
{ 3, 0 }
21-
toolkit:WebKitGtk
55+
AXRole: AXCell
56+
AXParent: AXTable
57+
AXChildren: 0
58+
AXPosition: { 147.000000, 84.000000 }
59+
AXSize: { 124.000000, 58.000000 }
60+
AXTitle:
61+
AXDescription:
62+
AXValue: Cell C<\n>ROWSPAN="2"
63+
AXFocusable: 0
64+
AXFocused: 0
65+
AXSelectable: 1
66+
AXSelected: 0
67+
AXMultiSelectable: 0
68+
AXEnabled: 1
69+
AXExpanded: 0
70+
AXRequired: 0
71+
AXChecked: 0
72+
AXPlatformAttributes: toolkit:WebKitGtk
2273
{2, 2}, {0, 1}
2374

2475
----------------------
2576
{ 2, 0 }
26-
toolkit:WebKitGtk
77+
AXRole: AXCell
78+
AXParent: AXTable
79+
AXChildren: 0
80+
AXPosition: { 147.000000, 84.000000 }
81+
AXSize: { 124.000000, 58.000000 }
82+
AXTitle:
83+
AXDescription:
84+
AXValue: Cell C<\n>ROWSPAN="2"
85+
AXFocusable: 0
86+
AXFocused: 0
87+
AXSelectable: 1
88+
AXSelected: 0
89+
AXMultiSelectable: 0
90+
AXEnabled: 1
91+
AXExpanded: 0
92+
AXRequired: 0
93+
AXChecked: 0
94+
AXPlatformAttributes: toolkit:WebKitGtk
2795
{2, 2}, {0, 1}
2896

2997
----------------------
3098
{ 2, 3 }
31-
toolkit:WebKitGtk
99+
AXRole: AXCell
100+
AXParent: AXTable
101+
AXChildren: 0
102+
AXPosition: { 516.000000, 84.000000 }
103+
AXSize: { 124.000000, 29.000000 }
104+
AXTitle:
105+
AXDescription:
106+
AXValue: 3,4
107+
AXFocusable: 0
108+
AXFocused: 0
109+
AXSelectable: 1
110+
AXSelected: 0
111+
AXMultiSelectable: 0
112+
AXEnabled: 1
113+
AXExpanded: 0
114+
AXRequired: 0
115+
AXChecked: 0
116+
AXPlatformAttributes: toolkit:WebKitGtk
32117
{2, 1}, {3, 1}
33118

34119
----------------------

LayoutTests/platform/gtk/accessibility/table-cells-expected.txt

Lines changed: 90 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,104 @@ South 3333 1111 2222
1010
South 3333 1111 2222
1111
------------------------
1212
[0,0]
13-
toolkit:WebKitGtk
13+
AXRole: AXCell
14+
AXParent: AXTable
15+
AXChildren: 0
16+
AXPosition: { 235.000000, 26.000000 }
17+
AXSize: { 144.000000, 63.000000 }
18+
AXTitle:
19+
AXDescription:
20+
AXValue: Ruritanian<\n>Population <\n>Survey
21+
AXFocusable: 0
22+
AXFocused: 0
23+
AXSelectable: 1
24+
AXSelected: 0
25+
AXMultiSelectable: 0
26+
AXEnabled: 1
27+
AXExpanded: 0
28+
AXRequired: 0
29+
AXChecked: 0
30+
AXPlatformAttributes: toolkit:WebKitGtk
1431
------------------------
1532
[3,1]
16-
toolkit:WebKitGtk
33+
AXRole: AXCell
34+
AXParent: AXTable
35+
AXChildren: 0
36+
AXPosition: { 447.000000, 55.000000 }
37+
AXSize: { 53.000000, 34.000000 }
38+
AXTitle:
39+
AXDescription:
40+
AXValue: Males
41+
AXFocusable: 0
42+
AXFocused: 0
43+
AXSelectable: 1
44+
AXSelected: 0
45+
AXMultiSelectable: 0
46+
AXEnabled: 1
47+
AXExpanded: 0
48+
AXRequired: 0
49+
AXChecked: 0
50+
AXPlatformAttributes: toolkit:WebKitGtk
1751
------------------------
1852
[1,1]
19-
toolkit:WebKitGtk
53+
AXRole: AXCell
54+
AXParent: AXTable
55+
AXChildren: 0
56+
AXPosition: { 227.000000, 26.000000 }
57+
AXSize: { 143.000000, 63.000000 }
58+
AXTitle:
59+
AXDescription:
60+
AXValue: Ruritanian<\n>Population <\n>Survey
61+
AXFocusable: 0
62+
AXFocused: 0
63+
AXSelectable: 1
64+
AXSelected: 0
65+
AXMultiSelectable: 0
66+
AXEnabled: 1
67+
AXExpanded: 0
68+
AXRequired: 0
69+
AXChecked: 0
70+
AXPlatformAttributes: toolkit:WebKitGtk
2071
------------------------
2172
[2,2]
22-
toolkit:WebKitGtk
73+
AXRole: AXCell
74+
AXParent: AXTable
75+
AXChildren: 0
76+
AXPosition: { 370.000000, 89.000000 }
77+
AXSize: { 69.000000, 29.000000 }
78+
AXTitle:
79+
AXDescription:
80+
AXValue: 3333
81+
AXFocusable: 0
82+
AXFocused: 0
83+
AXSelectable: 1
84+
AXSelected: 0
85+
AXMultiSelectable: 0
86+
AXEnabled: 1
87+
AXExpanded: 0
88+
AXRequired: 0
89+
AXChecked: 0
90+
AXPlatformAttributes: toolkit:WebKitGtk
2391
------------------------
2492
[3,5]
25-
toolkit:WebKitGtk
93+
AXRole: AXCell
94+
AXParent: AXTable
95+
AXChildren: 0
96+
AXPosition: { 439.000000, 176.000000 }
97+
AXSize: { 52.000000, 29.000000 }
98+
AXTitle:
99+
AXDescription:
100+
AXValue: 1111
101+
AXFocusable: 0
102+
AXFocused: 0
103+
AXSelectable: 1
104+
AXSelected: 0
105+
AXMultiSelectable: 0
106+
AXEnabled: 1
107+
AXExpanded: 0
108+
AXRequired: 0
109+
AXChecked: 0
110+
AXPlatformAttributes: toolkit:WebKitGtk
26111
------------------------
27112
[100,0]
28113

0 commit comments

Comments
 (0)