<!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>[191391] 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/191391">191391</a></dd>
<dt>Author</dt> <dd>n_wang@apple.com</dd>
<dt>Date</dt> <dd>2015-10-21 10:46:40 -0700 (Wed, 21 Oct 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>AX: Expose table size and cell indexes on iOS
https://bugs.webkit.org/show_bug.cgi?id=150366
Source/WebCore:
Add support to expose table row/column count and cell indexes on iOS.
Reviewed by Chris Fleizach.
Test: accessibility/aria-table-attributes.html
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper tableParent]):
(-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]):
(-[WebAccessibilityObjectWrapper accessibilityRowCount]):
(-[WebAccessibilityObjectWrapper accessibilityColumnCount]):
(-[WebAccessibilityObjectWrapper accessibilityARIARowCount]):
(-[WebAccessibilityObjectWrapper accessibilityARIAColumnCount]):
(-[WebAccessibilityObjectWrapper accessibilityARIARowIndex]):
(-[WebAccessibilityObjectWrapper accessibilityARIAColumnIndex]):
(-[WebAccessibilityObjectWrapper accessibilityRowRange]):
Tools:
Reviewed by Chris Fleizach.
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::rowCount):
(AccessibilityUIElement::columnCount):
(AccessibilityUIElement::indexInTable):
(AccessibilityUIElement::numberAttributeValue):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::numberAttributeValue):
(WTR::AccessibilityUIElement::rowCount):
(WTR::AccessibilityUIElement::columnCount):
(WTR::AccessibilityUIElement::indexInTable):
LayoutTests:
Reviewed by Chris Fleizach.
* accessibility/aria-table-attributes-expected.txt: Added.
* accessibility/aria-table-attributes.html: Added.
* accessibility/mac/aria-table-attributes-expected.txt: Removed.
* accessibility/mac/aria-table-attributes.html: Removed.
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/win/TestExpectations:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorTestExpectations">trunk/LayoutTests/platform/ios-simulator/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm">trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosAccessibilityUIElementIOSmm">trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm">trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilityariatableattributesexpectedtxt">trunk/LayoutTests/accessibility/aria-table-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilityariatableattributeshtml">trunk/LayoutTests/accessibility/aria-table-attributes.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilitymacariatableattributesexpectedtxt">trunk/LayoutTests/accessibility/mac/aria-table-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymacariatableattributeshtml">trunk/LayoutTests/accessibility/mac/aria-table-attributes.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/LayoutTests/ChangeLog        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-10-21 Nan Wang <n_wang@apple.com>
+
+ AX: Expose table size and cell indexes on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=150366
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/aria-table-attributes-expected.txt: Added.
+ * accessibility/aria-table-attributes.html: Added.
+ * accessibility/mac/aria-table-attributes-expected.txt: Removed.
+ * accessibility/mac/aria-table-attributes.html: Removed.
+ * platform/gtk/TestExpectations:
+ * platform/ios-simulator/TestExpectations:
+ * platform/win/TestExpectations:
+
</ins><span class="cx"> 2015-10-21 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> HTMLIFrameElement.sandbox should be a DOMSettableTokenList
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityariatableattributesexpectedtxtfromrev191390trunkLayoutTestsaccessibilitymacariatableattributesexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/accessibility/aria-table-attributes-expected.txt (from rev 191390, trunk/LayoutTests/accessibility/mac/aria-table-attributes-expected.txt) (0 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/aria-table-attributes-expected.txt         (rev 0)
+++ trunk/LayoutTests/accessibility/aria-table-attributes-expected.txt        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+This tests that attributes related to aria table/grid are working correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS grid.numberAttributeValue('AXARIAColumnCount') is 16
+PASS grid.numberAttributeValue('AXARIARowCount') is 30
+PASS grid.rowCount is 4
+PASS grid.columnCount is 4
+PASS cell1.numberAttributeValue('AXARIAColumnIndex') is 2
+PASS cell1.numberAttributeValue('AXARIARowIndex') is 7
+PASS cell2.numberAttributeValue('AXARIAColumnIndex') is 4
+PASS cell2.numberAttributeValue('AXARIARowIndex') is 8
+PASS cell4.numberAttributeValue('AXARIAColumnIndex') is 3
+PASS cell2.rowIndexRange() is '{1, 2}'
+PASS cell5.columnIndexRange() is '{2, 3}'
+PASS cell3.rowIndexRange() is '{1, 2}'
+PASS cell6.rowIndexRange() is '{0, 2}'
+PASS cell7.rowIndexRange() is '{0, 2}'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+First Name Last Name Company Address
+Fred Jackson Acme, Inc. 123 Broad St.
+Sara James
+Footer 1 Footer 2 Footer 3
+Name Company Address
+Cell Span Cell
+Cell
+January        $100
+February
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilityariatableattributeshtmlfromrev191390trunkLayoutTestsaccessibilitymacariatableattributeshtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/accessibility/aria-table-attributes.html (from rev 191390, trunk/LayoutTests/accessibility/mac/aria-table-attributes.html) (0 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/aria-table-attributes.html         (rev 0)
+++ trunk/LayoutTests/accessibility/aria-table-attributes.html        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -0,0 +1,109 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test-pre.js"></script>
+</head>
+<body id="body">
+
+<div id="grid" role="grid" aria-colcount="16" aria-rowcount="30">
+ <div role="rowgroup">
+ <div role="row" aria-rowindex="7">
+ <span id="cell1" role="columnheader" aria-colindex="2">First Name</span>
+ <span role="columnheader" aria-colindex="3">Last Name</span>
+ <span role="columnheader" aria-colindex="4">Company</span>
+ <span role="columnheader" aria-colindex="5">Address</span>
+ </div>
+ </div>
+ <div role="rowgroup">
+ <div role="row" aria-rowindex="8">
+ <span role="gridcell" aria-colindex="2" aria-rowindex="8">Fred</span>
+ <span role="gridcell" aria-colindex="3" aria-rowindex="8">Jackson</span>
+ <span id="cell2" role="gridcell" aria-colindex="4" aria-rowindex="8" aria-rowspan="2">Acme, Inc.</span>
+ <span id="cell3" role="gridcell" aria-colindex="5" aria-rowindex="8" aria-rowspan="0">123 Broad St.</span>
+ </div>
+ <div role="row" aria-rowindex="9">
+ <span role="gridcell" aria-colindex="2">Sara</span>
+ <span role="gridcell" aria-colindex="3">James</span>
+ </div>
+ </div>
+ <div role="rowgroup">
+ <div role="row" aria-rowindex="15">
+ <span role="gridcell" aria-colindex="2">Footer 1</span>
+ <span role="gridcell" aria-colindex="3">Footer 2</span>
+ <span role="gridcell" aria-colindex="4" aria-colspan="2">Footer 3</span>
+ </div>
+ </div>
+</div>
+
+<div id="grid2" role="grid" aria-colcount="16">
+ <div role="rowgroup">
+ <div role="row" aria-colindex="2">
+ <span role="columnheader">Name</span>
+ <span id="cell4" role="columnheader">Company</span>
+ <span id="cell5" role="columnheader" aria-colspan="3">Address</span>
+ </div>
+ </div>
+</div>
+
+<div id="grid3" role="grid">
+ <div role="row">
+ <span role="gridcell">Cell</span>
+ <span id="cell6" role="gridcell" aria-rowspan="0">Span Cell</span>
+ </div>
+ <div role="row">
+ <span role="gridcell">Cell</span>
+ </div>
+</div>
+
+<table role="grid">
+ <tr>
+ <td>January</td>
+ <td id="cell7" rowspan="2" aria-rowspan="3">$100</td>
+ </tr>
+ <tr><td>February</td></tr>
+</table>
+
+<script>
+
+ description("This tests that attributes related to aria table/grid are working correctly.");
+
+ if (window.accessibilityController) {
+
+ var grid = accessibilityController.accessibleElementById("grid");
+ var cell1 = accessibilityController.accessibleElementById("cell1");
+ var cell2 = accessibilityController.accessibleElementById("cell2");
+ var cell3 = accessibilityController.accessibleElementById("cell3");
+ var cell4 = accessibilityController.accessibleElementById("cell4");
+ var cell5 = accessibilityController.accessibleElementById("cell5");
+ var cell6 = accessibilityController.accessibleElementById("cell6");
+ var cell7 = accessibilityController.accessibleElementById("cell7");
+
+ // aria-colcount and aria-rowcount
+ shouldBe("grid.numberAttributeValue('AXARIAColumnCount')", "16");
+ shouldBe("grid.numberAttributeValue('AXARIARowCount')", "30");
+ shouldBe("grid.rowCount", "4");
+ shouldBe("grid.columnCount", "4");
+
+ // aria-colindex and aria-rowindex
+ shouldBe("cell1.numberAttributeValue('AXARIAColumnIndex')", "2");
+ shouldBe("cell1.numberAttributeValue('AXARIARowIndex')", "7");
+ shouldBe("cell2.numberAttributeValue('AXARIAColumnIndex')", "4");
+ shouldBe("cell2.numberAttributeValue('AXARIARowIndex')", "8");
+ // aria-colindex from parent row
+ shouldBe("cell4.numberAttributeValue('AXARIAColumnIndex')", "3");
+
+ // aria-colspan and aria-rowspan
+ shouldBe("cell2.rowIndexRange()", "'{1, 2}'");
+ shouldBe("cell5.columnIndexRange()", "'{2, 3}'");
+ // aria-rowspan="0"
+ shouldBe("cell3.rowIndexRange()", "'{1, 2}'");
+ shouldBe("cell6.rowIndexRange()", "'{0, 2}'");
+ // use rowspan for native table
+ shouldBe("cell7.rowIndexRange()", "'{0, 2}'");
+ }
+
+</script>
+
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacariatableattributesexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/accessibility/mac/aria-table-attributes-expected.txt (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/aria-table-attributes-expected.txt        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/LayoutTests/accessibility/mac/aria-table-attributes-expected.txt        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -1,29 +0,0 @@
</span><del>-This tests that attributes related to aria table/grid are working correctly.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS grid.numberAttributeValue('AXARIAColumnCount') is 16
-PASS grid.numberAttributeValue('AXARIARowCount') is 30
-PASS cell1.numberAttributeValue('AXARIAColumnIndex') is 2
-PASS cell1.numberAttributeValue('AXARIARowIndex') is 7
-PASS cell2.numberAttributeValue('AXARIAColumnIndex') is 4
-PASS cell2.numberAttributeValue('AXARIARowIndex') is 8
-PASS cell4.numberAttributeValue('AXARIAColumnIndex') is 3
-PASS cell2.rowIndexRange() is '{1, 2}'
-PASS cell5.columnIndexRange() is '{2, 3}'
-PASS cell3.rowIndexRange() is '{1, 2}'
-PASS cell6.rowIndexRange() is '{0, 2}'
-PASS cell7.rowIndexRange() is '{0, 2}'
-PASS successfullyParsed is true
-
-TEST COMPLETE
-First Name Last Name Company Address
-Fred Jackson Acme, Inc. 123 Broad St.
-Sara James
-Footer 1 Footer 2 Footer 3
-Name Company Address
-Cell Span Cell
-Cell
-January        $100
-February
</del></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymacariatableattributeshtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/accessibility/mac/aria-table-attributes.html (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/mac/aria-table-attributes.html        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/LayoutTests/accessibility/mac/aria-table-attributes.html        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -1,107 +0,0 @@
</span><del>-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../resources/js-test-pre.js"></script>
-</head>
-<body id="body">
-
-<div id="grid" role="grid" aria-colcount="16" aria-rowcount="30">
- <div role="rowgroup">
- <div role="row" aria-rowindex="7">
- <span id="cell1" role="columnheader" aria-colindex="2">First Name</span>
- <span role="columnheader" aria-colindex="3">Last Name</span>
- <span role="columnheader" aria-colindex="4">Company</span>
- <span role="columnheader" aria-colindex="5">Address</span>
- </div>
- </div>
- <div role="rowgroup">
- <div role="row" aria-rowindex="8">
- <span role="gridcell" aria-colindex="2" aria-rowindex="8">Fred</span>
- <span role="gridcell" aria-colindex="3" aria-rowindex="8">Jackson</span>
- <span id="cell2" role="gridcell" aria-colindex="4" aria-rowindex="8" aria-rowspan="2">Acme, Inc.</span>
- <span id="cell3" role="gridcell" aria-colindex="5" aria-rowindex="8" aria-rowspan="0">123 Broad St.</span>
- </div>
- <div role="row" aria-rowindex="9">
- <span role="gridcell" aria-colindex="2">Sara</span>
- <span role="gridcell" aria-colindex="3">James</span>
- </div>
- </div>
- <div role="rowgroup">
- <div role="row" aria-rowindex="15">
- <span role="gridcell" aria-colindex="2">Footer 1</span>
- <span role="gridcell" aria-colindex="3">Footer 2</span>
- <span role="gridcell" aria-colindex="4" aria-colspan="2">Footer 3</span>
- </div>
- </div>
-</div>
-
-<div id="grid2" role="grid" aria-colcount="16">
- <div role="rowgroup">
- <div role="row" aria-colindex="2">
- <span role="columnheader">Name</span>
- <span id="cell4" role="columnheader">Company</span>
- <span id="cell5" role="columnheader" aria-colspan="3">Address</span>
- </div>
- </div>
-</div>
-
-<div id="grid3" role="grid">
- <div role="row">
- <span role="gridcell">Cell</span>
- <span id="cell6" role="gridcell" aria-rowspan="0">Span Cell</span>
- </div>
- <div role="row">
- <span role="gridcell">Cell</span>
- </div>
-</div>
-
-<table role="grid">
- <tr>
- <td>January</td>
- <td id="cell7" rowspan="2" aria-rowspan="3">$100</td>
- </tr>
- <tr><td>February</td></tr>
-</table>
-
-<script>
-
- description("This tests that attributes related to aria table/grid are working correctly.");
-
- if (window.accessibilityController) {
-
- var grid = accessibilityController.accessibleElementById("grid");
- var cell1 = accessibilityController.accessibleElementById("cell1");
- var cell2 = accessibilityController.accessibleElementById("cell2");
- var cell3 = accessibilityController.accessibleElementById("cell3");
- var cell4 = accessibilityController.accessibleElementById("cell4");
- var cell5 = accessibilityController.accessibleElementById("cell5");
- var cell6 = accessibilityController.accessibleElementById("cell6");
- var cell7 = accessibilityController.accessibleElementById("cell7");
-
- // aria-colcount and aria-rowcount
- shouldBe("grid.numberAttributeValue('AXARIAColumnCount')", "16");
- shouldBe("grid.numberAttributeValue('AXARIARowCount')", "30");
-
- // aria-colindex and aria-rowindex
- shouldBe("cell1.numberAttributeValue('AXARIAColumnIndex')", "2");
- shouldBe("cell1.numberAttributeValue('AXARIARowIndex')", "7");
- shouldBe("cell2.numberAttributeValue('AXARIAColumnIndex')", "4");
- shouldBe("cell2.numberAttributeValue('AXARIARowIndex')", "8");
- // aria-colindex from parent row
- shouldBe("cell4.numberAttributeValue('AXARIAColumnIndex')", "3");
-
- // aria-colspan and aria-rowspan
- shouldBe("cell2.rowIndexRange()", "'{1, 2}'");
- shouldBe("cell5.columnIndexRange()", "'{2, 3}'");
- // aria-rowspan="0"
- shouldBe("cell3.rowIndexRange()", "'{1, 2}'");
- shouldBe("cell6.rowIndexRange()", "'{0, 2}'");
- // use rowspan for native table
- shouldBe("cell7.rowIndexRange()", "'{0, 2}'");
- }
-
-</script>
-
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -612,6 +612,9 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/149016 accessibility/aria-current.html [ Skip ]
</span><span class="cx">
</span><ins>+# ARIA 1.1 table related attributes are not supported
+webkit.org/b/148967 accessibility/aria-table-attributes.html [ Skip ]
+
</ins><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> # End of Expected failures
</span><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/TestExpectations (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/TestExpectations        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/LayoutTests/platform/ios-simulator/TestExpectations        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -2793,6 +2793,9 @@
</span><span class="cx"> # Enable "aria-current" test for iOS
</span><span class="cx"> webkit.org/b/149297 accessibility/aria-current.html [ Pass ]
</span><span class="cx">
</span><ins>+# Enable "aria-table-attributes" test for iOS
+webkit.org/b/150366 accessibility/aria-table-attributes.html [ Pass ]
+
</ins><span class="cx"> # More flaky tests (Sept 18, 2015)
</span><span class="cx">
</span><span class="cx"> fast/forms/select-element-focus-ring.html [ Failure Pass ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/TestExpectations        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/LayoutTests/platform/win/TestExpectations        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -621,6 +621,9 @@
</span><span class="cx"> # TODO aria-current is not supported
</span><span class="cx"> webkit.org/b/149018 accessibility/aria-current.html [ Skip ]
</span><span class="cx">
</span><ins>+# TODO ARIA 1.1 table related attributes are not supported
+webkit.org/b/148967 accessibility/aria-table-attributes.html [ Skip ]
+
</ins><span class="cx"> # TODO webkit-font-smoothing is not supported.
</span><span class="cx"> webkit.org/b/149245 imported/w3c/css/css-multicol-1/multicol-basic-001.html [ Skip ]
</span><span class="cx"> webkit.org/b/149245 imported/w3c/css/css-multicol-1/multicol-basic-002.html [ Skip ]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/Source/WebCore/ChangeLog        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-10-21 Nan Wang <n_wang@apple.com>
+
+ AX: Expose table size and cell indexes on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=150366
+
+ Add support to expose table row/column count and cell indexes on iOS.
+
+ Reviewed by Chris Fleizach.
+
+ Test: accessibility/aria-table-attributes.html
+
+ * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
+ (-[WebAccessibilityObjectWrapper tableParent]):
+ (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]):
+ (-[WebAccessibilityObjectWrapper accessibilityRowCount]):
+ (-[WebAccessibilityObjectWrapper accessibilityColumnCount]):
+ (-[WebAccessibilityObjectWrapper accessibilityARIARowCount]):
+ (-[WebAccessibilityObjectWrapper accessibilityARIAColumnCount]):
+ (-[WebAccessibilityObjectWrapper accessibilityARIARowIndex]):
+ (-[WebAccessibilityObjectWrapper accessibilityARIAColumnIndex]):
+ (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
+
</ins><span class="cx"> 2015-10-21 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> HTMLIFrameElement.sandbox should be a DOMSettableTokenList
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityiosWebAccessibilityObjectWrapperIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -918,7 +918,7 @@
</span><span class="cx"> {
</span><span class="cx"> // Find if the parent table for the table cell.
</span><span class="cx"> AccessibilityObject* parentTable = nullptr;
</span><del>- for (parentTable = m_object; parentTable && !parentTable->isDataTable(); parentTable = parentTable->parentObject())
</del><ins>+ for (parentTable = m_object; parentTable && !(is<AccessibilityTable>(*parentTable) && downcast<AccessibilityTable>(*parentTable).isExposableThroughAccessibility()); parentTable = parentTable->parentObject())
</ins><span class="cx"> { }
</span><span class="cx">
</span><span class="cx"> if (!parentTable)
</span><span class="lines">@@ -1000,6 +1000,76 @@
</span><span class="cx"> return cell->wrapper();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (NSUInteger)accessibilityRowCount
+{
+ if (![self _prepareAccessibilityCall])
+ return 0;
+ AccessibilityTable *table = [self tableParent];
+ if (!table)
+ return 0;
+
+ return table->rowCount();
+}
+
+- (NSUInteger)accessibilityColumnCount
+{
+ if (![self _prepareAccessibilityCall])
+ return 0;
+ AccessibilityTable *table = [self tableParent];
+ if (!table)
+ return 0;
+
+ return table->columnCount();
+}
+
+- (NSUInteger)accessibilityARIARowCount
+{
+ if (![self _prepareAccessibilityCall])
+ return 0;
+ AccessibilityTable *table = [self tableParent];
+ if (!table)
+ return 0;
+
+ NSInteger rowCount = table->ariaRowCount();
+ return rowCount > 0 ? rowCount : 0;
+}
+
+- (NSUInteger)accessibilityARIAColumnCount
+{
+ if (![self _prepareAccessibilityCall])
+ return 0;
+ AccessibilityTable *table = [self tableParent];
+ if (!table)
+ return 0;
+
+ NSInteger colCount = table->ariaColumnCount();
+ return colCount > 0 ? colCount : 0;
+}
+
+- (NSUInteger)accessibilityARIARowIndex
+{
+ if (![self _prepareAccessibilityCall])
+ return NSNotFound;
+ AccessibilityTableCell* tableCell = [self tableCellParent];
+ if (!tableCell)
+ return NSNotFound;
+
+ NSInteger rowIndex = tableCell->ariaRowIndex();
+ return rowIndex > 0 ? rowIndex : NSNotFound;
+}
+
+- (NSUInteger)accessibilityARIAColumnIndex
+{
+ if (![self _prepareAccessibilityCall])
+ return NSNotFound;
+ AccessibilityTableCell* tableCell = [self tableCellParent];
+ if (!tableCell)
+ return NSNotFound;
+
+ NSInteger columnIndex = tableCell->ariaColumnIndex();
+ return columnIndex > 0 ? columnIndex : NSNotFound;
+}
+
</ins><span class="cx"> - (NSRange)accessibilityRowRange
</span><span class="cx"> {
</span><span class="cx"> if (![self _prepareAccessibilityCall])
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/Tools/ChangeLog        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-10-21 Nan Wang <n_wang@apple.com>
+
+ AX: Expose table size and cell indexes on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=150366
+
+ Reviewed by Chris Fleizach.
+
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+ (AccessibilityUIElement::rowCount):
+ (AccessibilityUIElement::columnCount):
+ (AccessibilityUIElement::indexInTable):
+ (AccessibilityUIElement::numberAttributeValue):
+ * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+ (WTR::AccessibilityUIElement::numberAttributeValue):
+ (WTR::AccessibilityUIElement::rowCount):
+ (WTR::AccessibilityUIElement::columnCount):
+ (WTR::AccessibilityUIElement::indexInTable):
+
</ins><span class="cx"> 2015-10-21 Youenn Fablet <youenn.fablet@crf.canon.fr>
</span><span class="cx">
</span><span class="cx"> W3C test importer should not import reference files as regular tests
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -84,6 +84,12 @@
</span><span class="cx"> - (void)_accessibilityActivate;
</span><span class="cx"> - (UIAccessibilityTraits)_axSelectedTrait;
</span><span class="cx"> - (NSString *)accessibilityARIACurrentStatus;
</span><ins>+- (NSUInteger)accessibilityRowCount;
+- (NSUInteger)accessibilityColumnCount;
+- (NSUInteger)accessibilityARIARowCount;
+- (NSUInteger)accessibilityARIAColumnCount;
+- (NSUInteger)accessibilityARIARowIndex;
+- (NSUInteger)accessibilityARIAColumnIndex;
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @interface NSObject (WebAccessibilityObjectWrapperPrivate)
</span><span class="lines">@@ -647,12 +653,12 @@
</span><span class="cx">
</span><span class="cx"> int AccessibilityUIElement::rowCount()
</span><span class="cx"> {
</span><del>- return -1;
</del><ins>+ return [m_element accessibilityRowCount];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int AccessibilityUIElement::columnCount()
</span><span class="cx"> {
</span><del>- return -1;
</del><ins>+ return [m_element accessibilityColumnCount];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int AccessibilityUIElement::indexInTable()
</span><span class="lines">@@ -863,7 +869,16 @@
</span><span class="cx">
</span><span class="cx"> double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
</span><span class="cx"> {
</span><del>- // FIXME: implement
</del><ins>+ // Support test for table related attributes.
+ if (JSStringIsEqualToUTF8CString(attribute, "AXARIAColumnCount"))
+ return [m_element accessibilityARIAColumnCount];
+ if (JSStringIsEqualToUTF8CString(attribute, "AXARIARowCount"))
+ return [m_element accessibilityARIARowCount];
+ if (JSStringIsEqualToUTF8CString(attribute, "AXARIAColumnIndex"))
+ return [m_element accessibilityARIAColumnIndex];
+ if (JSStringIsEqualToUTF8CString(attribute, "AXARIARowIndex"))
+ return [m_element accessibilityARIARowIndex];
+
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (191390 => 191391)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2015-10-21 17:12:35 UTC (rev 191390)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2015-10-21 17:46:40 UTC (rev 191391)
</span><span class="lines">@@ -61,6 +61,12 @@
</span><span class="cx"> - (void)_accessibilityActivate;
</span><span class="cx"> - (UIAccessibilityTraits)_axSelectedTrait;
</span><span class="cx"> - (NSString *)accessibilityARIACurrentStatus;
</span><ins>+- (NSUInteger)accessibilityRowCount;
+- (NSUInteger)accessibilityColumnCount;
+- (NSUInteger)accessibilityARIARowCount;
+- (NSUInteger)accessibilityARIAColumnCount;
+- (NSUInteger)accessibilityARIARowIndex;
+- (NSUInteger)accessibilityARIAColumnIndex;
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @interface NSObject (WebAccessibilityObjectWrapperPrivate)
</span><span class="lines">@@ -323,6 +329,16 @@
</span><span class="cx">
</span><span class="cx"> double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
</span><span class="cx"> {
</span><ins>+ // Support test for table related attributes.
+ if (JSStringIsEqualToUTF8CString(attribute, "AXARIAColumnCount"))
+ return [m_element accessibilityARIAColumnCount];
+ if (JSStringIsEqualToUTF8CString(attribute, "AXARIARowCount"))
+ return [m_element accessibilityARIARowCount];
+ if (JSStringIsEqualToUTF8CString(attribute, "AXARIAColumnIndex"))
+ return [m_element accessibilityARIAColumnIndex];
+ if (JSStringIsEqualToUTF8CString(attribute, "AXARIARowIndex"))
+ return [m_element accessibilityARIARowIndex];
+
</ins><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -658,12 +674,12 @@
</span><span class="cx">
</span><span class="cx"> int AccessibilityUIElement::rowCount()
</span><span class="cx"> {
</span><del>- return -1;
</del><ins>+ return [m_element accessibilityRowCount];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int AccessibilityUIElement::columnCount()
</span><span class="cx"> {
</span><del>- return -1;
</del><ins>+ return [m_element accessibilityColumnCount];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int AccessibilityUIElement::indexInTable()
</span></span></pre>
</div>
</div>
</body>
</html>