<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[175408] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/175408">175408</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-10-31 05:45:55 -0700 (Fri, 31 Oct 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[ATK] Improve AccessibilityTableCell's determineAccessibilityRole function.
https://bugs.webkit.org/show_bug.cgi?id=137737
Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-10-31
Reviewed by Chris Fleizach.
Source/WebCore:
Use of new functions isRowHeaderCell and isColumnHeaderCell (bug 136818)
to more accurately determine accessibility role of the table cell.
Test: accessibility/table-cells-roles.html
* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::rowIndexRange):
Change to const.
* accessibility/AccessibilityARIAGridCell.h:
Change rowIndexRange function to const.
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::determineAccessibilityRole):
Use of isRowHeaderCell and isColumnHeaderCell to more accurately determine accessibility role (ATK).
(WebCore::AccessibilityTableCell::isColumnHeaderCell):
Add a case of direct placement a row in the table.
(WebCore::AccessibilityTableCell::isRowHeaderCell):
Add a case of direct placement a row in the table.
(WebCore::AccessibilityTableCell::rowIndexRange):
Change to const.
* accessibility/AccessibilityTableCell.h:
Change rowIndexRange function to const.
LayoutTests:
The new test illustrates the different cases deciding whether a table cell
is a row header or column header or just a table cell.
Files of expected type and one html type are adapted to changes in the code of several member functions
of AccessibilityTableCell, i.e determineAccessibilityRole, isColumnHeaderCell, isRowHeaderCell.
* accessibility/table-cells-roles-expected.txt: Added.
* accessibility/table-cells-roles.html: Added.
* platform/efl/accessibility/table-attributes-expected.txt:
* platform/efl/accessibility/table-cells-expected.txt:
* platform/gtk/accessibility/table-attributes-expected.txt:
* platform/gtk/accessibility/table-cells-expected.txt:
* platform/gtk/accessibility/table-hierarchy-expected.txt:
* platform/gtk/accessibility/table-hierarchy.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformeflaccessibilitytableattributesexpectedtxt">trunk/LayoutTests/platform/efl/accessibility/table-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformeflaccessibilitytablecellsexpectedtxt">trunk/LayoutTests/platform/efl/accessibility/table-cells-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilitytableattributesexpectedtxt">trunk/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilitytablecellsexpectedtxt">trunk/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilitytablehierarchyexpectedtxt">trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilitytablehierarchyhtml">trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityARIAGridCellcpp">trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityARIAGridCellh">trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTableCellcpp">trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTableCellh">trunk/Source/WebCore/accessibility/AccessibilityTableCell.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilitytablecellsrolesexpectedtxt">trunk/LayoutTests/accessibility/table-cells-roles-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitytablecellsroleshtml">trunk/LayoutTests/accessibility/table-cells-roles.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/LayoutTests/ChangeLog        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-10-31 Andrzej Badowski <a.badowski@samsung.com>
+
+ [ATK] Improve AccessibilityTableCell's determineAccessibilityRole function.
+ https://bugs.webkit.org/show_bug.cgi?id=137737
+
+ Reviewed by Chris Fleizach.
+
+ The new test illustrates the different cases deciding whether a table cell
+ is a row header or column header or just a table cell.
+ Files of expected type and one html type are adapted to changes in the code of several member functions
+ of AccessibilityTableCell, i.e determineAccessibilityRole, isColumnHeaderCell, isRowHeaderCell.
+
+ * accessibility/table-cells-roles-expected.txt: Added.
+ * accessibility/table-cells-roles.html: Added.
+ * platform/efl/accessibility/table-attributes-expected.txt:
+ * platform/efl/accessibility/table-cells-expected.txt:
+ * platform/gtk/accessibility/table-attributes-expected.txt:
+ * platform/gtk/accessibility/table-cells-expected.txt:
+ * platform/gtk/accessibility/table-hierarchy-expected.txt:
+ * platform/gtk/accessibility/table-hierarchy.html:
+
</ins><span class="cx"> 2014-10-31 Roger Fong <roger_fong@apple.com>
</span><span class="cx">
</span><span class="cx"> [Windows] Additional rebaselining after r175259.
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitytablecellsrolesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/table-cells-roles-expected.txt (0 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/table-cells-roles-expected.txt         (rev 0)
+++ trunk/LayoutTests/accessibility/table-cells-roles-expected.txt        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+table
+No        Country        Capital
+1.        Poland        Warsaw
+2.        Russia        Moscow
+3.        Ukraine        Kiev
+All        3 countries        3 capitals
+
+table2
+No        Country        Capital
+1.        Germany        Berlin
+2.        Sweden        Stockholm
+3.        Norway        Oslo
+
+
+This test checks the correctness of roles for different cases of table cells.
+
+The table cell at (2,0) should have a role AXRole: AXColumnHeader , currently it has AXRole: AXColumnHeader .
+The table cell at (1,2) should have a role AXRole: AXCell , currently it has AXRole: AXCell .
+The table cell at (2,3) should have a role AXRole: AXCell , currently it has AXRole: AXCell .
+The table cell at (1,4) should have a role AXRole: AXCell , currently it has AXRole: AXCell .
+The table cell at (0,2) should have a role AXRole: AXRowHeader , currently it has AXRole: AXRowHeader .
+The table cell at (0,4) should have a role AXRole: AXRowHeader , currently it has AXRole: AXRowHeader .
+
+The table2 cell at (2,0) should have a role AXRole: AXColumnHeader , currently it has AXRole: AXCell .
+The table2 cell at (1,2) should have a role AXRole: AXCell , currently it has AXRole: AXCell .
+The table2 cell at (2,3) should have a role AXRole: AXCell , currently it has AXRole: AXCell .
+The table2 cell at (0,2) should have a role AXRole: AXRowHeader , currently it has AXRole: AXRowHeader .
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilitytablecellsroleshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/table-cells-roles.html (0 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/table-cells-roles.html         (rev 0)
+++ trunk/LayoutTests/accessibility/table-cells-roles.html        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -0,0 +1,118 @@
</span><ins>+<html>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+</script>
+<body>
+
+<table id="table1">
+<caption>table</caption>
+ <thead>
+ <tr>
+ <th>No</th>
+ <th>Country</th>
+ <th id="cell1">Capital</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th>1.</th>
+ <th>Poland</th>
+ <th >Warsaw</th>
+ </tr>
+ <tr>
+ <th id="cell5">2.</th>
+ <th id="cell2">Russia</th>
+ <th>Moscow</th>
+ </tr>
+ <tr>
+ <th>3.</th>
+ <td>Ukraine</td>
+ <th id="cell3">Kiev</th>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th id="cell6">All</th>
+ <th id="cell4">3 countries</th>
+ <th>3 capitals</th>
+ </tr>
+ </tfoot>
+</table>
+<br>
+<br>
+
+<table id="table2">
+<caption>table2</caption>
+ <tr>
+ <th>No</th>
+ <th>Country</th>
+ <th id="cell21">Capital</th>
+ </tr>
+ <tr>
+ <th>1.</th>
+ <th>Germany</th>
+ <th>Berlin</th>
+ </tr>
+ <tr>
+ <th id="cell25">2.</th>
+ <th id="cell22">Sweden</th>
+ <th>Stockholm</th>
+ </tr>
+ <tr>
+ <th>3.</th>
+ <td>Norway</td>
+ <th id="cell23">Oslo</th>
+ </tr>
+</table>
+
+
+<br>
+<br>
+<p>This test checks the correctness of roles for different cases of table cells.</p>
+<div id="result"></div>
+
+<script>
+ if (window.accessibilityController) {
+ var table = accessibilityController.accessibleElementById("table1");
+ var cell1 = table.cellForColumnAndRow(2, 0);
+ var role1 = cell1.role;
+ var cell2 = table.cellForColumnAndRow(1, 2);
+ var role2 = cell2.role;
+ var cell3 = table.cellForColumnAndRow(2, 3);
+ var role3 = cell3.role;
+ var cell4 = table.cellForColumnAndRow(1, 4);
+ var role4 = cell4.role;
+ var cell5 = table.cellForColumnAndRow(0, 2);
+ var role5 = cell5.role;
+ var cell6 = table.cellForColumnAndRow(0, 4);
+ var role6 = cell6.role;
+
+ result.innerText += "The table cell at (2,0) should have a role AXRole: AXColumnHeader , currently it has " + role1 + " .\n";
+ result.innerText += "The table cell at (1,2) should have a role AXRole: AXCell , currently it has " + role2 + " .\n";
+ result.innerText += "The table cell at (2,3) should have a role AXRole: AXCell , currently it has " + role3 + " .\n";
+ result.innerText += "The table cell at (1,4) should have a role AXRole: AXCell , currently it has " + role4 + " .\n";
+ result.innerText += "The table cell at (0,2) should have a role AXRole: AXRowHeader , currently it has " + role5 + " .\n";
+ result.innerText += "The table cell at (0,4) should have a role AXRole: AXRowHeader , currently it has " + role6 + " .\n";
+
+ result.innerText += "\n";
+
+ var table2 = accessibilityController.accessibleElementById("table2");
+ var cell21 = table2.cellForColumnAndRow(2, 0);
+ var role21 = cell21.role;
+ var cell22 = table2.cellForColumnAndRow(1, 2);
+ var role22 = cell22.role;
+ var cell23 = table2.cellForColumnAndRow(2, 3);
+ var role23 = cell23.role;
+ var cell25 = table2.cellForColumnAndRow(0, 2);
+ var role25 = cell25.role;
+
+ result.innerText += "The table2 cell at (2,0) should have a role AXRole: AXColumnHeader , currently it has " + role21 + " .\n";
+ result.innerText += "The table2 cell at (1,2) should have a role AXRole: AXCell , currently it has " + role22 + " .\n";
+ result.innerText += "The table2 cell at (2,3) should have a role AXRole: AXCell , currently it has " + role23 + " .\n";
+ result.innerText += "The table2 cell at (0,2) should have a role AXRole: AXRowHeader , currently it has " + role25 + " .\n";
+ }
+</script>
+
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformeflaccessibilitytableattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/accessibility/table-attributes-expected.txt (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/accessibility/table-attributes-expected.txt        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/LayoutTests/platform/efl/accessibility/table-attributes-expected.txt        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -271,7 +271,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -347,7 +347,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -404,7 +404,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span><span class="lines">@@ -499,7 +499,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span></span></pre></div>
<a id="trunkLayoutTestsplatformeflaccessibilitytablecellsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/accessibility/table-cells-expected.txt (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/accessibility/table-cells-expected.txt        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/LayoutTests/platform/efl/accessibility/table-cells-expected.txt        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitEfl
</span><span class="cx"> ------------------------
</span><span class="cx"> [3,1]
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 0.000000, 0.000000 }
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilitytableattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/LayoutTests/platform/gtk/accessibility/table-attributes-expected.txt        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 378.000000, 26.000000 }
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 447.000000, 26.000000 }
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 447.000000, 26.000000 }
</span><span class="lines">@@ -233,7 +233,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 370.000000, 26.000000 }
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 439.000000, 26.000000 }
</span><span class="lines">@@ -271,7 +271,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 439.000000, 26.000000 }
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 370.000000, 26.000000 }
</span><span class="lines">@@ -347,7 +347,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 439.000000, 55.000000 }
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 491.000000, 55.000000 }
</span><span class="lines">@@ -404,7 +404,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 317.000000, 89.000000 }
</span><span class="lines">@@ -499,7 +499,7 @@
</span><span class="cx"> AXChecked: 0
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 317.000000, 118.000000 }
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilitytablecellsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/LayoutTests/platform/gtk/accessibility/table-cells-expected.txt        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> AXPlatformAttributes: toolkit:WebKitGtk
</span><span class="cx"> ------------------------
</span><span class="cx"> [3,1]
</span><del>-AXRole: AXRowHeader
</del><ins>+AXRole: AXCell
</ins><span class="cx"> AXParent: AXTable: Example #1: Nested Stubs
</span><span class="cx"> AXChildren: 0
</span><span class="cx"> AXPosition: { 447.000000, 55.000000 }
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilitytablehierarchyexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy-expected.txt (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy-expected.txt        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy-expected.txt        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> PASS table1.childAtIndex(i).role is 'AXRole: AXCell'
</span><span class="cx"> PASS children is 6
</span><span class="cx"> PASS table2.childAtIndex(0).role is 'AXRole: AXRowHeader'
</span><del>-PASS table2.childAtIndex(1).role is 'AXRole: AXRowHeader'
</del><ins>+PASS table2.childAtIndex(1).role is 'AXRole: AXCell'
</ins><span class="cx"> PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
</span><span class="cx"> PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
</span><span class="cx"> PASS table2.childAtIndex(i).role is 'AXRole: AXCell'
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> PASS table3.childAtIndex(i).role is 'AXRole: AXCell'
</span><span class="cx"> PASS children is 6
</span><span class="cx"> PASS table4.childAtIndex(0).role is 'AXRole: AXRowHeader'
</span><del>-PASS table4.childAtIndex(1).role is 'AXRole: AXRowHeader'
</del><ins>+PASS table4.childAtIndex(1).role is 'AXRole: AXCell'
</ins><span class="cx"> PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
</span><span class="cx"> PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
</span><span class="cx"> PASS table4.childAtIndex(i).role is 'AXRole: AXCell'
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilitytablehierarchyhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy.html (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy.html        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/LayoutTests/platform/gtk/accessibility/table-hierarchy.html        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> children = table2.childrenCount;
</span><span class="cx"> shouldBe("children", "6");
</span><span class="cx"> shouldBe("table2.childAtIndex(0).role", "'AXRole: AXRowHeader'");
</span><del>- shouldBe("table2.childAtIndex(1).role", "'AXRole: AXRowHeader'");
</del><ins>+ shouldBe("table2.childAtIndex(1).role", "'AXRole: AXCell'");
</ins><span class="cx"> for (i = 2; i < children; ++i) {
</span><span class="cx"> shouldBe("table2.childAtIndex(i).role", "'AXRole: AXCell'");
</span><span class="cx"> }
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> children = table4.childrenCount;
</span><span class="cx"> shouldBe("children", "6");
</span><span class="cx"> shouldBe("table4.childAtIndex(0).role", "'AXRole: AXRowHeader'");
</span><del>- shouldBe("table4.childAtIndex(1).role", "'AXRole: AXRowHeader'");
</del><ins>+ shouldBe("table4.childAtIndex(1).role", "'AXRole: AXCell'");
</ins><span class="cx"> for (i = 2; i < children; ++i) {
</span><span class="cx"> shouldBe("table4.childAtIndex(i).role", "'AXRole: AXCell'");
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -1073,6 +1073,8 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/136718 fast/dynamic/layer-no-longer-paginated.html [ Skip ]
</span><span class="cx">
</span><ins>+webkit.org/b/137737 accessibility/table-cells-roles.html [ Skip ]
+
</ins><span class="cx"> # --- Start media tests ---
</span><span class="cx"> ## --- Start media wontfix tests ---
</span><span class="cx"> # This test requires ogg codecs
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/Source/WebCore/ChangeLog        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-10-31 Andrzej Badowski <a.badowski@samsung.com>
+
+ [ATK] Improve AccessibilityTableCell's determineAccessibilityRole function.
+ https://bugs.webkit.org/show_bug.cgi?id=137737
+
+ Reviewed by Chris Fleizach.
+
+ Use of new functions isRowHeaderCell and isColumnHeaderCell (bug 136818)
+ to more accurately determine accessibility role of the table cell.
+
+ Test: accessibility/table-cells-roles.html
+
+ * accessibility/AccessibilityARIAGridCell.cpp:
+ (WebCore::AccessibilityARIAGridCell::rowIndexRange):
+ Change to const.
+ * accessibility/AccessibilityARIAGridCell.h:
+ Change rowIndexRange function to const.
+ * accessibility/AccessibilityTableCell.cpp:
+ (WebCore::AccessibilityTableCell::determineAccessibilityRole):
+ Use of isRowHeaderCell and isColumnHeaderCell to more accurately determine accessibility role (ATK).
+ (WebCore::AccessibilityTableCell::isColumnHeaderCell):
+ Add a case of direct placement a row in the table.
+ (WebCore::AccessibilityTableCell::isRowHeaderCell):
+ Add a case of direct placement a row in the table.
+ (WebCore::AccessibilityTableCell::rowIndexRange):
+ Change to const.
+ * accessibility/AccessibilityTableCell.h:
+ Change rowIndexRange function to const.
+
</ins><span class="cx"> 2014-10-30 Darin Adler <darin@apple.com>
</span><span class="cx">
</span><span class="cx"> Eliminate ResourceBuffer and use SharedBuffer directly instead
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityARIAGridCellcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> return downcast<AccessibilityTable>(parent);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void AccessibilityARIAGridCell::rowIndexRange(std::pair<unsigned, unsigned>& rowRange)
</del><ins>+void AccessibilityARIAGridCell::rowIndexRange(std::pair<unsigned, unsigned>& rowRange) const
</ins><span class="cx"> {
</span><span class="cx"> AccessibilityObject* parent = parentObjectUnignored();
</span><span class="cx"> if (!parent)
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityARIAGridCellh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.h (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.h        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.h        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> virtual ~AccessibilityARIAGridCell();
</span><span class="cx">
</span><span class="cx"> // fills in the start location and row span of cell
</span><del>- virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange) override;
</del><ins>+ virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange) const override;
</ins><span class="cx"> // fills in the start location and column span of cell
</span><span class="cx"> virtual void columnIndexRange(std::pair<unsigned, unsigned>& columnRange) const override;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableCellcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -112,9 +112,26 @@
</span><span class="cx"> #if !PLATFORM(EFL) && !PLATFORM(GTK)
</span><span class="cx"> if (!isTableCell())
</span><span class="cx"> return defaultRole;
</span><del>-
</del><span class="cx"> return CellRole;
</span><span class="cx"> #endif
</span><ins>+
+ // If AccessibilityRenderObject::determineAccessibilityRole returns the type of CellRole,
+ // which is derived from the role attribute, it does not change anything.
+ if (defaultRole != UnknownRole) {
+ AccessibilityRole ariaRole = ariaRoleAttribute();
+ if (ariaRole == CellRole || ariaRole == RowHeaderRole || ariaRole == ColumnHeaderRole)
+ return ariaRole;
+ }
+
+ // Here there is a more precide definition of the type of CellRole than was possible
+ // at the level of AccessibilityRenderObject.
+ if (defaultRole == ColumnHeaderRole || defaultRole == CellRole || defaultRole == RowHeaderRole) {
+ if (isColumnHeaderCell())
+ return ColumnHeaderRole;
+ if (isRowHeaderCell())
+ return RowHeaderRole;
+ return CellRole;
+ }
</ins><span class="cx"> return defaultRole;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -135,12 +152,19 @@
</span><span class="cx">
</span><span class="cx"> // We are in a situation after checking the scope attribute.
</span><span class="cx"> // It is an attempt to resolve the type of th element without support in the specification.
</span><del>- // Checking tableTag lets stop the loop at the table level.
</del><ins>+ // Checking tableTag allows to check the case of direct row placement in the table and lets stop the loop at the table level.
</ins><span class="cx"> for (Node* parentNode = node(); parentNode; parentNode = parentNode->parentNode()) {
</span><span class="cx"> if (parentNode->hasTagName(theadTag))
</span><span class="cx"> return true;
</span><del>- if (parentNode->hasTagName(tbodyTag) || parentNode->hasTagName(tfootTag) || parentNode->hasTagName(tableTag))
</del><ins>+ if (parentNode->hasTagName(tbodyTag) || parentNode->hasTagName(tfootTag))
</ins><span class="cx"> return false;
</span><ins>+ if (parentNode->hasTagName(tableTag)) {
+ std::pair<unsigned, unsigned> rowRange;
+ rowIndexRange(rowRange);
+ if (!rowRange.first)
+ return true;
+ return false;
+ }
</ins><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="lines">@@ -157,16 +181,16 @@
</span><span class="cx">
</span><span class="cx"> // We are in a situation after checking the scope attribute.
</span><span class="cx"> // It is an attempt to resolve the type of th element without support in the specification.
</span><del>- // Checking tableTag lets stop the loop at the table level.
</del><ins>+ // Checking tableTag allows to check the case of direct row placement in the table and lets stop the loop at the table level.
</ins><span class="cx"> for (Node* parentNode = node(); parentNode; parentNode = parentNode->parentNode()) {
</span><del>- if (parentNode->hasTagName(tfootTag) || parentNode->hasTagName(tbodyTag)) {
</del><ins>+ if (parentNode->hasTagName(tfootTag) || parentNode->hasTagName(tbodyTag) || parentNode->hasTagName(tableTag)) {
</ins><span class="cx"> std::pair<unsigned, unsigned> colRange;
</span><span class="cx"> columnIndexRange(colRange);
</span><span class="cx"> if (!colRange.first)
</span><span class="cx"> return true;
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><del>- if (parentNode->hasTagName(theadTag) || parentNode->hasTagName(tableTag))
</del><ins>+ if (parentNode->hasTagName(theadTag))
</ins><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span><span class="lines">@@ -272,7 +296,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void AccessibilityTableCell::rowIndexRange(std::pair<unsigned, unsigned>& rowRange)
</del><ins>+void AccessibilityTableCell::rowIndexRange(std::pair<unsigned, unsigned>& rowRange) const
</ins><span class="cx"> {
</span><span class="cx"> if (!is<RenderTableCell>(m_renderer))
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableCellh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTableCell.h (175407 => 175408)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTableCell.h        2014-10-31 07:18:25 UTC (rev 175407)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableCell.h        2014-10-31 12:45:55 UTC (rev 175408)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> bool isRowHeaderCell() const;
</span><span class="cx">
</span><span class="cx"> // fills in the start location and row span of cell
</span><del>- virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange);
</del><ins>+ virtual void rowIndexRange(std::pair<unsigned, unsigned>& rowRange) const;
</ins><span class="cx"> // fills in the start location and column span of cell
</span><span class="cx"> virtual void columnIndexRange(std::pair<unsigned, unsigned>& columnRange) const;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>