<!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>[162986] 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/162986">162986</a></dd>
<dt>Author</dt> <dd>cfleizach@apple.com</dd>
<dt>Date</dt> <dd>2014-01-28 17:05:07 -0800 (Tue, 28 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>AX: Support @scope in HTML tables
https://bugs.webkit.org/show_bug.cgi?id=127688

Reviewed by Mario Sanchez Prada.

Source/WebCore: 

Add support for scope attribute so that row headers and column headers
are now exposed at the table cell level where appropriate.

Test: platform/mac/accessibility/table-scope.html

* accessibility/AccessibilityARIAGridCell.cpp:
(WebCore::AccessibilityARIAGridCell::parentTable):
* accessibility/AccessibilityARIAGridCell.h:
* accessibility/AccessibilityARIAGridRow.cpp:
(WebCore::AccessibilityARIAGridRow::parentTable):
* accessibility/AccessibilityARIAGridRow.h:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::columns):
(WebCore::AccessibilityTable::rows):
* accessibility/AccessibilityTable.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::parentTable):
(WebCore::AccessibilityTableCell::isTableHeaderCell):
(WebCore::AccessibilityTableCell::isTableCellInSameRowGroup):
(WebCore::AccessibilityTableCell::isTableCellInSameColGroup):
(WebCore::AccessibilityTableCell::columnHeaders):
(WebCore::AccessibilityTableCell::rowHeaders):
* accessibility/AccessibilityTableCell.h:
* accessibility/AccessibilityTableRow.cpp:
(WebCore::AccessibilityTableRow::parentTable):
* accessibility/AccessibilityTableRow.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools: 

Add support for rowHeaders and columnHeaders.

* DumpRenderTree/AccessibilityUIElement.cpp:
(convertElementsToObjectArray):
(columnHeadersCallback):
(rowHeadersCallback):
(uiElementArrayAttributeValueCallback):
(AccessibilityUIElement::columnHeaders):
(AccessibilityUIElement::rowHeaders):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::rowHeaders):
(AccessibilityUIElement::columnHeaders):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue):
(WTR::AccessibilityUIElement::rowHeaders):
(WTR::AccessibilityUIElement::columnHeaders):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::convertElementsToObjectArray):
(WTR::AccessibilityUIElement::rowHeaders):
(WTR::AccessibilityUIElement::columnHeaders):
(WTR::AccessibilityUIElement::uiElementArrayAttributeValue):

LayoutTests: 

* platform/mac/accessibility/aria-columnrowheaders-expected.txt:
* platform/mac/accessibility/table-attributes-expected.txt:
* platform/mac/accessibility/table-cell-spans-expected.txt:
* platform/mac/accessibility/table-cells-expected.txt:
* platform/mac/accessibility/table-scope-expected.txt: Added.
* platform/mac/accessibility/table-scope.html: Added.
* platform/mac/accessibility/table-sections-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityariacolumnrowheadersexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/aria-columnrowheaders-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitytableattributesexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/table-attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitytablecellspansexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/table-cell-spans-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitytablecellsexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/table-cells-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitytablesectionsexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/table-sections-expected.txt</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="#trunkSourceWebCoreaccessibilityAccessibilityARIAGridRowcpp">trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityARIAGridRowh">trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTablecpp">trunk/Source/WebCore/accessibility/AccessibilityTable.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTableh">trunk/Source/WebCore/accessibility/AccessibilityTable.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>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTableRowcpp">trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityTableRowh">trunk/Source/WebCore/accessibility/AccessibilityTableRow.h</a></li>
<li><a href="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeAccessibilityUIElementcpp">trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreeAccessibilityUIElementh">trunk/Tools/DumpRenderTree/AccessibilityUIElement.h</a></li>
<li><a href="#trunkToolsDumpRenderTreemacAccessibilityUIElementMacmm">trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementh">trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundlemacAccessibilityUIElementMacmm">trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitytablescopeexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/table-scope-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilitytablescopehtml">trunk/LayoutTests/platform/mac/accessibility/table-scope.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/LayoutTests/ChangeLog        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-01-27  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: Support @scope in HTML tables
+        https://bugs.webkit.org/show_bug.cgi?id=127688
+
+        Reviewed by Mario Sanchez Prada.
+
+        * platform/mac/accessibility/aria-columnrowheaders-expected.txt:
+        * platform/mac/accessibility/table-attributes-expected.txt:
+        * platform/mac/accessibility/table-cell-spans-expected.txt:
+        * platform/mac/accessibility/table-cells-expected.txt:
+        * platform/mac/accessibility/table-scope-expected.txt: Added.
+        * platform/mac/accessibility/table-scope.html: Added.
+        * platform/mac/accessibility/table-sections-expected.txt:
+
</ins><span class="cx"> 2014-01-28  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r162947): Repaint test results are different between WK1 and WK2
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityariacolumnrowheadersexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/aria-columnrowheaders-expected.txt (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/aria-columnrowheaders-expected.txt        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/LayoutTests/platform/mac/accessibility/aria-columnrowheaders-expected.txt        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -32,6 +32,8 @@
</span><span class="cx"> AXDOMClassList: 
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: 
+AXRowHeaderUIElements: 
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -62,6 +64,8 @@
</span><span class="cx"> AXDOMClassList: 
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: 
+AXRowHeaderUIElements: 
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -92,6 +96,8 @@
</span><span class="cx"> AXDOMClassList: 
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: 
+AXRowHeaderUIElements: 
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -125,6 +131,8 @@
</span><span class="cx"> AXDOMClassList: 
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: 
+AXRowHeaderUIElements: 
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -155,6 +163,8 @@
</span><span class="cx"> AXDOMClassList: 
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: 
+AXRowHeaderUIElements: 
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitytableattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/table-attributes-expected.txt (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/table-attributes-expected.txt        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/LayoutTests/platform/mac/accessibility/table-attributes-expected.txt        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -34,6 +34,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -64,6 +66,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -94,6 +98,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -124,6 +130,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -154,6 +162,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -188,6 +198,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -218,6 +230,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -248,6 +262,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -278,6 +294,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -587,6 +605,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -617,6 +637,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -647,6 +669,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -677,6 +701,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -707,6 +733,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {4, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -737,6 +765,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -767,6 +797,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -797,6 +829,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -827,6 +861,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -857,6 +893,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {4, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -887,6 +925,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -917,6 +957,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -947,6 +989,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -977,6 +1021,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {4, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitytablecellspansexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/table-cell-spans-expected.txt (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/table-cell-spans-expected.txt        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/LayoutTests/platform/mac/accessibility/table-cell-spans-expected.txt        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -34,6 +34,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -67,6 +69,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -100,6 +104,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -133,6 +139,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -166,6 +174,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitytablecellsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/table-cells-expected.txt (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/table-cells-expected.txt        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/LayoutTests/platform/mac/accessibility/table-cells-expected.txt        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -36,6 +36,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -67,6 +69,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -98,6 +102,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 1&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 2}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 2}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -129,6 +135,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -160,6 +168,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {5, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {3, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitytablescopeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/table-scope-expected.txt (0 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/table-scope-expected.txt                                (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/table-scope-expected.txt        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+Community Courses -- Bath Autumn 1997
+Course Name        Course Tutor        Summary        Code        Fee
+After the Civil War        Dr. John Wroughton         The course will examine the turbulent years in England after 1646. 6 weekly meetings starting Monday 13th October.        H27        Â£32        Â£32
+An Introduction to Anglo-Saxon England        Mark Cottle         One day course introducing the early medieval period reconstruction the Anglo-Saxons and their society. Saturday 18th October.        H28        Â£18        Â£18
+The Glory that was Greece         Birthplace of democracy, philosophy, heartland of theater, home of argument. The Romans may have done it but the Greeks did it first. Saturday day school 25th October 1997        H30        Â£18        Â£18
+This tests the scope attribute on table cells will manifest as the right header elements on the cells in that row or column.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0)) is true
+PASS colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0)) is true
+PASS colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0)) is true
+PASS colHeaders[1].isEqual(table.cellForColumnAndRow(1, 1)) is true
+PASS rowHeaders[0].isEqual(table.cellForColumnAndRow(0, 2)) is true
+PASS colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0)) is true
+PASS colHeaders[1].isEqual(table.cellForColumnAndRow(3, 1)) is true
+PASS rowHeaders[0].isEqual(table.cellForColumnAndRow(0, 3)) is true
+PASS rowHeaders[1].isEqual(table.cellForColumnAndRow(1, 3)) is true
+PASS rowHeaders[0].isEqual(table.cellForColumnAndRow(0, 4)) is true
+PASS rowHeaders[1].isEqual(table.cellForColumnAndRow(1, 3)) is true
+PASS colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0)) is true
+PASS colHeaders[1].isEqual(table.cellForColumnAndRow(4, 1)) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitytablescopehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/accessibility/table-scope.html (0 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/table-scope.html                                (rev 0)
+++ trunk/LayoutTests/platform/mac/accessibility/table-scope.html        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -0,0 +1,113 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body id=&quot;body&quot;&gt;
+
+&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;2&quot; id=&quot;table&quot;&gt;
+  &lt;tbody&gt;&lt;tr&gt;
+    &lt;th colspan=&quot;6&quot; scope=&quot;colgroup&quot;&gt;Community Courses -- Bath Autumn 1997&lt;/th&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;th scope=&quot;col&quot; abbr=&quot;Name&quot;&gt;Course Name&lt;/th&gt;
+    &lt;th scope=&quot;col&quot; abbr=&quot;Tutor&quot;&gt;Course Tutor&lt;/th&gt;
+    &lt;th scope=&quot;col&quot;&gt;Summary&lt;/th&gt;
+    &lt;th scope=&quot;col&quot;&gt;Code&lt;/th&gt;
+    &lt;th scope=&quot;col&quot; colspan=&quot;2&quot;&gt;Fee&lt;/th&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;td scope=&quot;row&quot;&gt;After the Civil War&lt;/td&gt;
+    &lt;td&gt;Dr. John Wroughton&lt;/td&gt;
+    &lt;td&gt;
+       The course will examine the turbulent years in England
+       after 1646. &lt;em&gt;6 weekly meetings starting Monday 13th
+      October.&lt;/em&gt;
+    &lt;/td&gt;
+    &lt;td&gt;H27&lt;/td&gt;
+    &lt;td&gt;£32&lt;/td&gt;
+    &lt;td&gt;£32&lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;td scope=&quot;row&quot;&gt;An Introduction to Anglo-Saxon England&lt;/td&gt;
+    &lt;td scope=&quot;rowgroup&quot; rowspan=&quot;2&quot;&gt;Mark Cottle&lt;/td&gt;
+    &lt;td&gt;
+       One day course introducing the early medieval
+       period reconstruction the Anglo-Saxons and
+       their society. &lt;em&gt;Saturday 18th October.&lt;/em&gt;
+    &lt;/td&gt;
+    &lt;td&gt;H28&lt;/td&gt;
+    &lt;td&gt;£18&lt;/td&gt;
+    &lt;td&gt;£18&lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;td scope=&quot;row&quot;&gt;The Glory that was Greece&lt;/td&gt;
+    &lt;td&gt;
+     Birthplace of democracy, philosophy, heartland of theater, home of
+     argument. The Romans may have done it but the Greeks did it
+     first. &lt;em&gt;Saturday day school 25th October 1997&lt;/em&gt;
+    &lt;/td&gt;
+    &lt;td&gt;H30&lt;/td&gt;
+    &lt;td&gt;£18&lt;/td&gt;
+    &lt;td&gt;£18&lt;/td&gt;
+  &lt;/tr&gt;
+&lt;/tbody&gt;&lt;/table&gt;
+
+
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+
+    description(&quot;This tests the scope attribute on table cells will manifest as the right header elements on the cells in that row or column.&quot;);
+
+    if (window.accessibilityController) {
+
+        var table = accessibilityController.accessibleElementById(&quot;table&quot;);
+
+        // Course name has a column header of Community Courses.
+        var cell = table.cellForColumnAndRow(0, 1);
+        var colHeaders = cell.columnHeaders();
+        shouldBeTrue(&quot;colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0))&quot;);
+
+        // As does Fee.
+        cell = table.cellForColumnAndRow(4, 1);
+        var colHeaders = cell.columnHeaders();
+        shouldBeTrue(&quot;colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0))&quot;);
+
+        // Dr. John should have two col headers and a row header.
+        cell = table.cellForColumnAndRow(1, 2);
+        colHeaders = cell.columnHeaders();
+        rowHeaders = cell.rowHeaders();
+        shouldBeTrue(&quot;colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0))&quot;);
+        shouldBeTrue(&quot;colHeaders[1].isEqual(table.cellForColumnAndRow(1, 1))&quot;);
+        shouldBeTrue(&quot;rowHeaders[0].isEqual(table.cellForColumnAndRow(0, 2))&quot;);
+
+        // Code H28, two row headers, two col headers.
+        cell = table.cellForColumnAndRow(3, 3);
+        colHeaders = cell.columnHeaders();
+        rowHeaders = cell.rowHeaders();
+        shouldBeTrue(&quot;colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0))&quot;);
+        shouldBeTrue(&quot;colHeaders[1].isEqual(table.cellForColumnAndRow(3, 1))&quot;);
+        shouldBeTrue(&quot;rowHeaders[0].isEqual(table.cellForColumnAndRow(0, 3))&quot;);
+        shouldBeTrue(&quot;rowHeaders[1].isEqual(table.cellForColumnAndRow(1, 3))&quot;);
+
+        // Verify Code H30 has two row headers even though the 2nd header started in a span before this row.
+        cell = table.cellForColumnAndRow(3, 4);
+        rowHeaders = cell.rowHeaders();
+        shouldBeTrue(&quot;rowHeaders[0].isEqual(table.cellForColumnAndRow(0, 4))&quot;);
+        shouldBeTrue(&quot;rowHeaders[1].isEqual(table.cellForColumnAndRow(1, 3))&quot;);
+
+        // Verify items in column 5 are picking up Fee as a header even though it's colspan starts before this column.
+        cell = table.cellForColumnAndRow(4, 4);
+        colHeaders = cell.columnHeaders();
+        shouldBeTrue(&quot;colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0))&quot;);
+        shouldBeTrue(&quot;colHeaders[1].isEqual(table.cellForColumnAndRow(4, 1))&quot;);
+
+    }
+
+&lt;/script&gt;
+
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilitytablesectionsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/table-sections-expected.txt (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/table-sections-expected.txt        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/LayoutTests/platform/mac/accessibility/table-sections-expected.txt        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -43,6 +43,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -73,6 +75,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -103,6 +107,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -137,6 +143,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -167,6 +175,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -197,6 +207,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -444,6 +456,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -474,6 +488,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -504,6 +520,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -534,6 +552,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -564,6 +584,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -594,6 +616,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -624,6 +648,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -654,6 +680,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -684,6 +712,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -714,6 +744,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 3&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -744,6 +776,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -774,6 +808,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -843,6 +879,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -873,6 +911,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -903,6 +943,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -937,6 +979,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -967,6 +1011,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -997,6 +1043,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1244,6 +1292,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1274,6 +1324,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1304,6 +1356,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {0, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1334,6 +1388,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1364,6 +1420,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1394,6 +1452,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {1, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1424,6 +1484,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 2&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1454,6 +1516,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1484,6 +1548,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {2, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1514,6 +1580,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {0, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 3&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1544,6 +1612,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {1, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 1&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span><span class="lines">@@ -1574,6 +1644,8 @@
</span><span class="cx"> AXDOMClassList: &lt;array of size 0&gt;
</span><span class="cx"> AXRowIndexRange: NSRange: {3, 1}
</span><span class="cx"> AXColumnIndexRange: NSRange: {2, 1}
</span><ins>+AXColumnHeaderUIElements: &lt;array of size 0&gt;
+AXRowHeaderUIElements: &lt;array of size 0&gt;
</ins><span class="cx"> AXElementBusy: 0
</span><span class="cx"> AXRequired: 0
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/ChangeLog        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-01-27  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: Support @scope in HTML tables
+        https://bugs.webkit.org/show_bug.cgi?id=127688
+
+        Reviewed by Mario Sanchez Prada.
+
+        Add support for scope attribute so that row headers and column headers
+        are now exposed at the table cell level where appropriate.
+
+        Test: platform/mac/accessibility/table-scope.html
+
+        * accessibility/AccessibilityARIAGridCell.cpp:
+        (WebCore::AccessibilityARIAGridCell::parentTable):
+        * accessibility/AccessibilityARIAGridCell.h:
+        * accessibility/AccessibilityARIAGridRow.cpp:
+        (WebCore::AccessibilityARIAGridRow::parentTable):
+        * accessibility/AccessibilityARIAGridRow.h:
+        * accessibility/AccessibilityTable.cpp:
+        (WebCore::AccessibilityTable::columns):
+        (WebCore::AccessibilityTable::rows):
+        * accessibility/AccessibilityTable.h:
+        * accessibility/AccessibilityTableCell.cpp:
+        (WebCore::AccessibilityTableCell::parentTable):
+        (WebCore::AccessibilityTableCell::isTableHeaderCell):
+        (WebCore::AccessibilityTableCell::isTableCellInSameRowGroup):
+        (WebCore::AccessibilityTableCell::isTableCellInSameColGroup):
+        (WebCore::AccessibilityTableCell::columnHeaders):
+        (WebCore::AccessibilityTableCell::rowHeaders):
+        * accessibility/AccessibilityTableCell.h:
+        * accessibility/AccessibilityTableRow.cpp:
+        (WebCore::AccessibilityTableRow::parentTable):
+        * accessibility/AccessibilityTableRow.h:
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
+        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+
</ins><span class="cx"> 2014-01-28  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Improve latching behavior for wheel events
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityARIAGridCellcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.cpp        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -49,23 +49,23 @@
</span><span class="cx">     return adoptRef(new AccessibilityARIAGridCell(renderer));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-AccessibilityObject* AccessibilityARIAGridCell::parentTable() const
</del><ins>+AccessibilityTable* AccessibilityARIAGridCell::parentTable() const
</ins><span class="cx"> {
</span><span class="cx">     AccessibilityObject* parent = parentObjectUnignored();
</span><span class="cx">     if (!parent)
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     
</span><span class="cx">     if (parent-&gt;isAccessibilityTable())
</span><del>-        return parent;
</del><ins>+        return toAccessibilityTable(parent);
</ins><span class="cx"> 
</span><span class="cx">     // It could happen that we hadn't reached the parent table yet (in
</span><span class="cx">     // case objects for rows were not ignoring accessibility) so for
</span><span class="cx">     // that reason we need to run parentObjectUnignored once again.
</span><span class="cx">     parent = parent-&gt;parentObjectUnignored();
</span><span class="cx">     if (!parent || !parent-&gt;isAccessibilityTable())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx">     
</span><del>-    return parent;
</del><ins>+    return toAccessibilityTable(parent);
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> void AccessibilityARIAGridCell::rowIndexRange(std::pair&lt;unsigned, unsigned&gt;&amp; rowRange)
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityARIAGridCellh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.h (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.h        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGridCell.h        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     virtual void columnIndexRange(std::pair&lt;unsigned, unsigned&gt;&amp; columnRange) override;
</span><span class="cx">     
</span><span class="cx"> protected:
</span><del>-    virtual AccessibilityObject* parentTable() const override;
</del><ins>+    virtual AccessibilityTable* parentTable() const override;
</ins><span class="cx"> }; 
</span><span class="cx">     
</span><span class="cx"> } // namespace WebCore 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityARIAGridRowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -114,14 +114,14 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-AccessibilityObject* AccessibilityARIAGridRow::parentTable() const
</del><ins>+AccessibilityTable* AccessibilityARIAGridRow::parentTable() const
</ins><span class="cx"> {
</span><span class="cx">     // The parent table might not be the direct ancestor of the row unfortunately. ARIA states that role=&quot;grid&quot; should
</span><span class="cx">     // only have &quot;row&quot; elements, but if not, we still should handle it gracefully by finding the right table.
</span><span class="cx">     for (AccessibilityObject* parent = parentObject(); parent; parent = parent-&gt;parentObject()) {
</span><span class="cx">         // The parent table for an ARIA grid row should be an ARIA table.
</span><span class="cx">         if (parent-&gt;isTable() &amp;&amp; parent-&gt;isAccessibilityTable() &amp;&amp; toAccessibilityTable(parent)-&gt;isAriaTable())
</span><del>-            return parent;
</del><ins>+            return toAccessibilityTable(parent);
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     return nullptr;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityARIAGridRowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.h (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.h        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.h        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx">     
</span><ins>+class AccessibilityTable;
+    
</ins><span class="cx"> class AccessibilityARIAGridRow : public AccessibilityTableRow {
</span><span class="cx">     
</span><span class="cx"> private:
</span><span class="lines">@@ -48,7 +50,7 @@
</span><span class="cx">     
</span><span class="cx"> private:
</span><span class="cx">     virtual bool isARIATreeGridRow() const override;
</span><del>-    virtual AccessibilityObject* parentTable() const override;
</del><ins>+    virtual AccessibilityTable* parentTable() const override;
</ins><span class="cx"> }; 
</span><span class="cx"> 
</span><span class="cx"> ACCESSIBILITY_OBJECT_TYPE_CASTS(AccessibilityARIAGridRow, isARIATreeGridRow())
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTable.cpp (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTable.cpp        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityTable.cpp        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -407,14 +407,14 @@
</span><span class="cx">     return m_headerContainer.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-AccessibilityObject::AccessibilityChildrenVector&amp; AccessibilityTable::columns()
</del><ins>+const AccessibilityObject::AccessibilityChildrenVector&amp; AccessibilityTable::columns()
</ins><span class="cx"> {
</span><span class="cx">     updateChildrenIfNecessary();
</span><span class="cx">         
</span><span class="cx">     return m_columns;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-AccessibilityObject::AccessibilityChildrenVector&amp; AccessibilityTable::rows()
</del><ins>+const AccessibilityObject::AccessibilityChildrenVector&amp; AccessibilityTable::rows()
</ins><span class="cx"> {
</span><span class="cx">     updateChildrenIfNecessary();
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTable.h (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTable.h        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityTable.h        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -53,8 +53,8 @@
</span><span class="cx">     virtual void addChildren() override;
</span><span class="cx">     virtual void clearChildren() override;
</span><span class="cx">     
</span><del>-    AccessibilityChildrenVector&amp; columns();
-    AccessibilityChildrenVector&amp; rows();
</del><ins>+    const AccessibilityChildrenVector&amp; columns();
+    const AccessibilityChildrenVector&amp; rows();
</ins><span class="cx">     
</span><span class="cx">     virtual bool supportsSelectedRows() { return false; }
</span><span class="cx">     unsigned columnCount();
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableCellcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableCell.cpp        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -30,6 +30,8 @@
</span><span class="cx"> #include &quot;AccessibilityTableCell.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;AXObjectCache.h&quot;
</span><ins>+#include &quot;AccessibilityTable.h&quot;
+#include &quot;AccessibilityTableRow.h&quot;
</ins><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;RenderObject.h&quot;
</span><span class="cx"> #include &quot;RenderTableCell.h&quot;
</span><span class="lines">@@ -65,8 +67,8 @@
</span><span class="cx">     
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><del>-   
-AccessibilityObject* AccessibilityTableCell::parentTable() const
</del><ins>+
+AccessibilityTable* AccessibilityTableCell::parentTable() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_renderer || !m_renderer-&gt;isTableCell())
</span><span class="cx">         return 0;
</span><span class="lines">@@ -80,7 +82,7 @@
</span><span class="cx">     // By using only get() implies that the AXTable must be created before AXTableCells. This should
</span><span class="cx">     // always be the case when AT clients access a table.
</span><span class="cx">     // https://bugs.webkit.org/show_bug.cgi?id=42652    
</span><del>-    return axObjectCache()-&gt;get(toRenderTableCell(m_renderer)-&gt;table());
</del><ins>+    return toAccessibilityTable(axObjectCache()-&gt;get(toRenderTableCell(m_renderer)-&gt;table()));
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> bool AccessibilityTableCell::isTableCell() const
</span><span class="lines">@@ -104,6 +106,95 @@
</span><span class="cx">     return CellRole;
</span><span class="cx"> }
</span><span class="cx">     
</span><ins>+bool AccessibilityTableCell::isTableHeaderCell() const
+{
+    return node() &amp;&amp; node()-&gt;hasTagName(thTag);
+}
+
+bool AccessibilityTableCell::isTableCellInSameRowGroup(AccessibilityTableCell* otherTableCell)
+{
+    Node* parentNode = node();
+    for ( ; parentNode; parentNode = parentNode-&gt;parentNode()) {
+        if (parentNode-&gt;hasTagName(theadTag) || parentNode-&gt;hasTagName(tbodyTag) || parentNode-&gt;hasTagName(tfootTag))
+            break;
+    }
+    
+    Node* otherParentNode = otherTableCell-&gt;node();
+    for ( ; otherParentNode; otherParentNode = otherParentNode-&gt;parentNode()) {
+        if (otherParentNode-&gt;hasTagName(theadTag) || otherParentNode-&gt;hasTagName(tbodyTag) || otherParentNode-&gt;hasTagName(tfootTag))
+            break;
+    }
+    
+    return otherParentNode == parentNode;
+}
+
+
+bool AccessibilityTableCell::isTableCellInSameColGroup(AccessibilityTableCell* tableCell)
+{
+    std::pair&lt;unsigned, unsigned&gt; colRange;
+    columnIndexRange(colRange);
+    
+    std::pair&lt;unsigned, unsigned&gt; otherColRange;
+    tableCell-&gt;columnIndexRange(otherColRange);
+    
+    if (colRange.first &lt;= (otherColRange.first + otherColRange.second))
+        return true;
+    return false;
+}
+    
+void AccessibilityTableCell::columnHeaders(AccessibilityChildrenVector&amp; headers)
+{
+    AccessibilityTable* parent = parentTable();
+    if (!parent)
+        return;
+
+    std::pair&lt;unsigned, unsigned&gt; rowRange;
+    rowIndexRange(rowRange);
+    
+    std::pair&lt;unsigned, unsigned&gt; colRange;
+    columnIndexRange(colRange);
+    
+    for (unsigned row = 0; row &lt; rowRange.first; row++) {
+        AccessibilityTableCell* tableCell = parent-&gt;cellForColumnAndRow(colRange.first, row);
+        if (tableCell == this || headers.contains(tableCell))
+            continue;
+
+        std::pair&lt;unsigned, unsigned&gt; childRowRange;
+        tableCell-&gt;rowIndexRange(childRowRange);
+            
+        const AtomicString&amp; scope = tableCell-&gt;getAttribute(scopeAttr);
+        if (scope == &quot;col&quot; || tableCell-&gt;isTableHeaderCell())
+            headers.append(tableCell);
+        else if (scope == &quot;colgroup&quot; &amp;&amp; isTableCellInSameColGroup(tableCell))
+            headers.append(tableCell);
+    }
+}
+    
+void AccessibilityTableCell::rowHeaders(AccessibilityChildrenVector&amp; headers)
+{
+    AccessibilityTable* parent = parentTable();
+    if (!parent)
+        return;
+
+    std::pair&lt;unsigned, unsigned&gt; rowRange;
+    rowIndexRange(rowRange);
+
+    std::pair&lt;unsigned, unsigned&gt; colRange;
+    columnIndexRange(colRange);
+
+    for (unsigned column = 0; column &lt; colRange.first; column++) {
+        AccessibilityTableCell* tableCell = parent-&gt;cellForColumnAndRow(column, rowRange.first);
+        if (tableCell == this || headers.contains(tableCell))
+            continue;
+        
+        const AtomicString&amp; scope = tableCell-&gt;getAttribute(scopeAttr);
+        if (scope == &quot;row&quot;)
+            headers.append(tableCell);
+        else if (scope == &quot;rowgroup&quot; &amp;&amp; isTableCellInSameRowGroup(tableCell))
+            headers.append(tableCell);
+    }
+}
+    
</ins><span class="cx"> void AccessibilityTableCell::rowIndexRange(std::pair&lt;unsigned, unsigned&gt;&amp; rowRange)
</span><span class="cx"> {
</span><span class="cx">     if (!m_renderer || !m_renderer-&gt;isTableCell())
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableCellh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTableCell.h (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTableCell.h        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableCell.h        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx">     
</span><ins>+class AccessibilityTable;
+    
</ins><span class="cx"> class AccessibilityTableCell : public AccessibilityRenderObject {
</span><span class="cx">     
</span><span class="cx"> protected:
</span><span class="lines">@@ -42,14 +44,18 @@
</span><span class="cx">     virtual ~AccessibilityTableCell();
</span><span class="cx">     
</span><span class="cx">     virtual bool isTableCell() const override;
</span><ins>+    bool isTableHeaderCell() const;
</ins><span class="cx">     
</span><span class="cx">     // fills in the start location and row span of cell
</span><span class="cx">     virtual void rowIndexRange(std::pair&lt;unsigned, unsigned&gt;&amp; rowRange);
</span><span class="cx">     // fills in the start location and column span of cell
</span><span class="cx">     virtual void columnIndexRange(std::pair&lt;unsigned, unsigned&gt;&amp; columnRange);
</span><span class="cx">     
</span><ins>+    void columnHeaders(AccessibilityChildrenVector&amp;);
+    void rowHeaders(AccessibilityChildrenVector&amp;);
+
</ins><span class="cx"> protected:
</span><del>-    virtual AccessibilityObject* parentTable() const;
</del><ins>+    virtual AccessibilityTable* parentTable() const;
</ins><span class="cx">     int m_rowIndex;
</span><span class="cx">     virtual AccessibilityRole determineAccessibilityRole() override;
</span><span class="cx"> 
</span><span class="lines">@@ -58,7 +64,10 @@
</span><span class="cx">     virtual AccessibilityObject* titleUIElement() const override;
</span><span class="cx">     virtual bool exposesTitleUIElement() const override { return true; }
</span><span class="cx">     virtual bool computeAccessibilityIsIgnored() const override;
</span><del>-}; 
</del><ins>+    
+    bool isTableCellInSameRowGroup(AccessibilityTableCell*);
+    bool isTableCellInSameColGroup(AccessibilityTableCell*);
+};
</ins><span class="cx"> 
</span><span class="cx"> ACCESSIBILITY_OBJECT_TYPE_CASTS(AccessibilityTableCell, isTableCell())
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableRowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &quot;AccessibilityTableRow.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;AXObjectCache.h&quot;
</span><ins>+#include &quot;AccessibilityTable.h&quot;
</ins><span class="cx"> #include &quot;AccessibilityTableCell.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;HTMLTableRowElement.h&quot;
</span><span class="lines">@@ -98,7 +99,7 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx">     
</span><del>-AccessibilityObject* AccessibilityTableRow::parentTable() const
</del><ins>+AccessibilityTable* AccessibilityTableRow::parentTable() const
</ins><span class="cx"> {
</span><span class="cx">     // The parent table might not be the direct ancestor of the row unfortunately. ARIA states that role=&quot;grid&quot; should
</span><span class="cx">     // only have &quot;row&quot; elements, but if not, we still should handle it gracefully by finding the right table.
</span><span class="lines">@@ -106,7 +107,7 @@
</span><span class="cx">         // If this is a table object, but not an accessibility table, we should stop because we don't want to
</span><span class="cx">         // choose another ancestor table as this row's table.
</span><span class="cx">         if (parent-&gt;isTable())
</span><del>-            return parent-&gt;isAccessibilityTable() ? parent : 0;
</del><ins>+            return parent-&gt;isAccessibilityTable() ? toAccessibilityTable(parent) : 0;
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     return 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityTableRowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityTableRow.h (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityTableRow.h        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/AccessibilityTableRow.h        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx">     
</span><ins>+class AccessibilityTable;
+
</ins><span class="cx"> class AccessibilityTableRow : public AccessibilityRenderObject {
</span><span class="cx">     
</span><span class="cx"> protected:
</span><span class="lines">@@ -45,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx">     // retrieves the &quot;row&quot; header (a th tag in the rightmost column)
</span><span class="cx">     virtual AccessibilityObject* headerObject();
</span><del>-    virtual AccessibilityObject* parentTable() const;
</del><ins>+    virtual AccessibilityTable* parentTable() const;
</ins><span class="cx">     
</span><span class="cx">     void setRowIndex(int rowIndex) { m_rowIndex = rowIndex; }
</span><span class="cx">     int rowIndex() const { return m_rowIndex; }
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -87,10 +87,6 @@
</span><span class="cx"> #define NSAccessibilityVisibleCellsAttribute @&quot;AXVisibleCells&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#ifndef NSAccessibilityRowHeaderUIElementsAttribute
-#define NSAccessibilityRowHeaderUIElementsAttribute @&quot;AXRowHeaderUIElements&quot;
-#endif
-
</del><span class="cx"> #ifndef NSAccessibilityRowIndexRangeAttribute
</span><span class="cx"> #define NSAccessibilityRowIndexRangeAttribute @&quot;AXRowIndexRange&quot;
</span><span class="cx"> #endif
</span><span class="lines">@@ -1357,7 +1353,7 @@
</span><span class="cx">         [tempArray addObject:NSAccessibilityColumnsAttribute];
</span><span class="cx">         [tempArray addObject:NSAccessibilityVisibleColumnsAttribute];
</span><span class="cx">         [tempArray addObject:NSAccessibilityVisibleCellsAttribute];
</span><del>-        [tempArray addObject:(NSString *)kAXColumnHeaderUIElementsAttribute];
</del><ins>+        [tempArray addObject:NSAccessibilityColumnHeaderUIElementsAttribute];
</ins><span class="cx">         [tempArray addObject:NSAccessibilityRowHeaderUIElementsAttribute];
</span><span class="cx">         [tempArray addObject:NSAccessibilityHeaderAttribute];
</span><span class="cx">         [tempArray addObject:NSAccessibilityColumnCountAttribute];
</span><span class="lines">@@ -1384,6 +1380,8 @@
</span><span class="cx">         tempArray = [[NSMutableArray alloc] initWithArray:attributes];
</span><span class="cx">         [tempArray addObject:NSAccessibilityRowIndexRangeAttribute];
</span><span class="cx">         [tempArray addObject:NSAccessibilityColumnIndexRangeAttribute];
</span><ins>+        [tempArray addObject:NSAccessibilityColumnHeaderUIElementsAttribute];
+        [tempArray addObject:NSAccessibilityRowHeaderUIElementsAttribute];
</ins><span class="cx">         tableCellAttrs = [[NSArray alloc] initWithArray:tempArray];
</span><span class="cx">         [tempArray release];
</span><span class="cx">     }
</span><span class="lines">@@ -2431,7 +2429,7 @@
</span><span class="cx">             [attributeName isEqualToString:NSAccessibilitySelectedCellsAttribute])
</span><span class="cx">             return nil;
</span><span class="cx">         
</span><del>-        if ([attributeName isEqualToString:(NSString *)kAXColumnHeaderUIElementsAttribute]) {
</del><ins>+        if ([attributeName isEqualToString:NSAccessibilityColumnHeaderUIElementsAttribute]) {
</ins><span class="cx">             AccessibilityObject::AccessibilityChildrenVector columnHeaders;
</span><span class="cx">             toAccessibilityTable(m_object)-&gt;columnHeaders(columnHeaders);
</span><span class="cx">             return convertToNSArray(columnHeaders);
</span><span class="lines">@@ -2491,6 +2489,16 @@
</span><span class="cx">             toAccessibilityTableCell(m_object)-&gt;columnIndexRange(columnRange);
</span><span class="cx">             return [NSValue valueWithRange:NSMakeRange(columnRange.first, columnRange.second)];
</span><span class="cx">         }
</span><ins>+        if ([attributeName isEqualToString:NSAccessibilityColumnHeaderUIElementsAttribute]) {
+            AccessibilityObject::AccessibilityChildrenVector columnHeaders;
+            toAccessibilityTableCell(m_object)-&gt;columnHeaders(columnHeaders);
+            return convertToNSArray(columnHeaders);
+        }
+        if ([attributeName isEqualToString:NSAccessibilityRowHeaderUIElementsAttribute]) {
+            AccessibilityObject::AccessibilityChildrenVector rowHeaders;
+            toAccessibilityTableCell(m_object)-&gt;rowHeaders(rowHeaders);
+            return convertToNSArray(rowHeaders);
+        }
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (m_object-&gt;isTree()) {
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Tools/ChangeLog        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2014-01-27  Chris Fleizach  &lt;cfleizach@apple.com&gt;
+
+        AX: Support @scope in HTML tables
+        https://bugs.webkit.org/show_bug.cgi?id=127688
+
+        Reviewed by Mario Sanchez Prada.
+
+        Add support for rowHeaders and columnHeaders.
+
+        * DumpRenderTree/AccessibilityUIElement.cpp:
+        (convertElementsToObjectArray):
+        (columnHeadersCallback):
+        (rowHeadersCallback):
+        (uiElementArrayAttributeValueCallback):
+        (AccessibilityUIElement::columnHeaders):
+        (AccessibilityUIElement::rowHeaders):
+        (AccessibilityUIElement::getJSClass):
+        * DumpRenderTree/AccessibilityUIElement.h:
+        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+        (AccessibilityUIElement::rowHeaders):
+        (AccessibilityUIElement::columnHeaders):
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+        * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::uiElementArrayAttributeValue):
+        (WTR::AccessibilityUIElement::rowHeaders):
+        (WTR::AccessibilityUIElement::columnHeaders):
+        * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+        (WTR::convertElementsToObjectArray):
+        (WTR::AccessibilityUIElement::rowHeaders):
+        (WTR::AccessibilityUIElement::columnHeaders):
+        (WTR::AccessibilityUIElement::uiElementArrayAttributeValue):
+
</ins><span class="cx"> 2014-01-28  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Teach Buildbot dashboard to parse alternative revision format
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeAccessibilityUIElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -482,6 +482,30 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static JSValueRef convertElementsToObjectArray(JSContextRef context, Vector&lt;AccessibilityUIElement&gt;&amp; elements, JSValueRef* exception)
+{
+    size_t elementCount = elements.size();
+    auto valueElements = std::make_unique&lt;JSValueRef[]&gt;(elementCount);
+    for (size_t i = 0; i &lt; elementCount; ++i)
+        valueElements[i] = AccessibilityUIElement::makeJSAccessibilityUIElement(context, elements[i]);
+    
+    return JSObjectMakeArray(context, elementCount, valueElements.get(), exception);
+}
+
+static JSValueRef columnHeadersCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    Vector&lt;AccessibilityUIElement&gt; elements;
+    toAXElement(thisObject)-&gt;columnHeaders(elements);
+    return convertElementsToObjectArray(context, elements, exception);
+}
+
+static JSValueRef rowHeadersCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    Vector&lt;AccessibilityUIElement&gt; elements;
+    toAXElement(thisObject)-&gt;rowHeaders(elements);
+    return convertElementsToObjectArray(context, elements, exception);
+}
+
</ins><span class="cx"> static JSValueRef uiElementArrayAttributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
</span><span class="cx"> {
</span><span class="cx">     if (argumentCount != 1)
</span><span class="lines">@@ -491,13 +515,7 @@
</span><span class="cx">     
</span><span class="cx">     Vector&lt;AccessibilityUIElement&gt; elements;
</span><span class="cx">     toAXElement(thisObject)-&gt;uiElementArrayAttributeValue(attribute.get(), elements);
</span><del>-    
-    size_t elementCount = elements.size();
-    auto valueElements = std::make_unique&lt;JSValueRef[]&gt;(elementCount);
-    for (size_t i = 0; i &lt; elementCount; ++i)
-        valueElements[i] = AccessibilityUIElement::makeJSAccessibilityUIElement(context, elements[i]);
-    
-    return JSObjectMakeArray(context, elementCount, valueElements.get(), exception);
</del><ins>+    return convertElementsToObjectArray(context, elements, exception);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static JSValueRef uiElementAttributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
</span><span class="lines">@@ -1247,6 +1265,8 @@
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(MAC)
</span><span class="cx"> void AccessibilityUIElement::uiElementArrayAttributeValue(JSStringRef, Vector&lt;AccessibilityUIElement&gt;&amp;) const { }
</span><ins>+void AccessibilityUIElement::columnHeaders(Vector&lt;AccessibilityUIElement&gt;&amp;) const { }
+void AccessibilityUIElement::rowHeaders(Vector&lt;AccessibilityUIElement&gt;&amp;) const { }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(WIN)
</span><span class="lines">@@ -1480,6 +1500,8 @@
</span><span class="cx">         { &quot;setSelectedTextRange&quot;, setSelectedTextRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;stringAttributeValue&quot;, stringAttributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;uiElementArrayAttributeValue&quot;, uiElementArrayAttributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><ins>+        { &quot;rowHeaders&quot;, rowHeadersCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { &quot;columnHeaders&quot;, columnHeadersCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</ins><span class="cx">         { &quot;uiElementAttributeValue&quot;, uiElementAttributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;numberAttributeValue&quot;, numberAttributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;boolAttributeValue&quot;, boolAttributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -179,6 +179,8 @@
</span><span class="cx">     JSStringRef columnIndexRange();
</span><span class="cx">     int rowCount();
</span><span class="cx">     int columnCount();
</span><ins>+    void rowHeaders(Vector&lt;AccessibilityUIElement&gt;&amp; elements) const;
+    void columnHeaders(Vector&lt;AccessibilityUIElement&gt;&amp; elements) const;
</ins><span class="cx">     
</span><span class="cx">     // Tree/Outline specific attributes
</span><span class="cx">     AccessibilityUIElement selectedRowAtIndex(unsigned);
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacAccessibilityUIElementMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -466,6 +466,24 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void AccessibilityUIElement::rowHeaders(Vector&lt;AccessibilityUIElement&gt;&amp; elements) const
+{
+    BEGIN_AX_OBJC_EXCEPTIONS
+    id value = [m_element accessibilityAttributeValue:NSAccessibilityRowHeaderUIElementsAttribute];
+    if ([value isKindOfClass:[NSArray class]])
+        convertNSArrayToVector(value, elements);
+    END_AX_OBJC_EXCEPTIONS
+}
+
+void AccessibilityUIElement::columnHeaders(Vector&lt;AccessibilityUIElement&gt;&amp; elements) const
+{
+    BEGIN_AX_OBJC_EXCEPTIONS
+    id value = [m_element accessibilityAttributeValue:NSAccessibilityColumnHeaderUIElementsAttribute];
+    if ([value isKindOfClass:[NSArray class]])
+        convertNSArrayToVector(value, elements);
+    END_AX_OBJC_EXCEPTIONS
+}
+
</ins><span class="cx"> void AccessibilityUIElement::uiElementArrayAttributeValue(JSStringRef attribute, Vector&lt;AccessibilityUIElement&gt;&amp; elements) const
</span><span class="cx"> {
</span><span class="cx">     BEGIN_AX_OBJC_EXCEPTIONS
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -175,7 +175,9 @@
</span><span class="cx">     JSRetainPtr&lt;JSStringRef&gt; columnIndexRange();
</span><span class="cx">     int rowCount();
</span><span class="cx">     int columnCount();
</span><del>-    
</del><ins>+    JSValueRef rowHeaders() const;
+    JSValueRef columnHeaders() const;
+
</ins><span class="cx">     // Tree/Outline specific attributes
</span><span class="cx">     PassRefPtr&lt;AccessibilityUIElement&gt; selectedRowAtIndex(unsigned);
</span><span class="cx">     PassRefPtr&lt;AccessibilityUIElement&gt; disclosedByRow();
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -139,6 +139,8 @@
</span><span class="cx">     DOMString columnIndexRange();
</span><span class="cx">     int rowCount();
</span><span class="cx">     int columnCount();
</span><ins>+    object columnHeaders();
+    object rowHeaders();
</ins><span class="cx"> 
</span><span class="cx">     AccessibilityUIElement ariaOwnsElementAtIndex(unsigned long index);
</span><span class="cx">     AccessibilityUIElement ariaFlowToElementAtIndex(unsigned long index);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -820,6 +820,18 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValueRef AccessibilityUIElement::rowHeaders() const
+{
+    // FIXME: implement
+    return nullptr;
+}
+
+JSValueRef AccessibilityUIElement::columnHeaders() const
+{
+    // FIXME: implement
+    return nullptr;
+}
+
</ins><span class="cx"> PassRefPtr&lt;AccessibilityUIElement&gt; AccessibilityUIElement::uiElementAttributeValue(JSStringRef attribute) const
</span><span class="cx"> {
</span><span class="cx">     // FIXME: implement
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundlemacAccessibilityUIElementMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (162985 => 162986)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm        2014-01-29 00:59:52 UTC (rev 162985)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm        2014-01-29 01:05:07 UTC (rev 162986)
</span><span class="lines">@@ -176,6 +176,16 @@
</span><span class="cx">     return attributesString;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static JSValueRef convertElementsToObjectArray(JSContextRef context, Vector&lt;RefPtr&lt;AccessibilityUIElement&gt;&gt;&amp; elements)
+{
+    size_t elementCount = elements.size();
+    auto valueElements = std::make_unique&lt;JSValueRef[]&gt;(elementCount);
+    for (size_t i = 0; i &lt; elementCount; ++i)
+        valueElements[i] = JSObjectMake(context, elements[i]-&gt;wrapperClass(), elements[i].get());
+    
+    return JSObjectMakeArray(context, elementCount, valueElements.get(), nullptr);
+}
+
</ins><span class="cx"> static JSStringRef concatenateAttributeAndValue(NSString* attribute, NSString* value)
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;UniChar&gt; buffer([attribute length]);
</span><span class="lines">@@ -301,6 +311,34 @@
</span><span class="cx">     END_AX_OBJC_EXCEPTIONS
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSValueRef AccessibilityUIElement::rowHeaders() const
+{
+    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()-&gt;page());
+    JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
+    
+    BEGIN_AX_OBJC_EXCEPTIONS
+    Vector&lt;RefPtr&lt;AccessibilityUIElement&gt;&gt; elements;
+    id value = [m_element accessibilityAttributeValue:NSAccessibilityRowHeaderUIElementsAttribute];
+    if ([value isKindOfClass:[NSArray class]])
+        convertNSArrayToVector(value, elements);
+    return convertElementsToObjectArray(context, elements);
+    END_AX_OBJC_EXCEPTIONS
+}
+
+JSValueRef AccessibilityUIElement::columnHeaders() const
+{
+    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()-&gt;page());
+    JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
+
+    BEGIN_AX_OBJC_EXCEPTIONS
+    Vector&lt;RefPtr&lt;AccessibilityUIElement&gt;&gt; elements;
+    id value = [m_element accessibilityAttributeValue:NSAccessibilityColumnHeaderUIElementsAttribute];
+    if ([value isKindOfClass:[NSArray class]])
+        convertNSArrayToVector(value, elements);
+    return convertElementsToObjectArray(context, elements);
+    END_AX_OBJC_EXCEPTIONS
+}
+    
</ins><span class="cx"> int AccessibilityUIElement::childrenCount()
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;RefPtr&lt;AccessibilityUIElement&gt; &gt; children;
</span><span class="lines">@@ -506,15 +544,9 @@
</span><span class="cx">     WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()-&gt;page());
</span><span class="cx">     JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
</span><span class="cx">     
</span><del>-    Vector&lt;RefPtr&lt;AccessibilityUIElement&gt; &gt; elements;
</del><ins>+    Vector&lt;RefPtr&lt;AccessibilityUIElement&gt;&gt; elements;
</ins><span class="cx">     getUIElementsWithAttribute(attribute, elements);
</span><del>-    
-    size_t elementCount = elements.size();
-    auto valueElements = std::make_unique&lt;JSValueRef[]&gt;(elementCount);
-    for (size_t i = 0; i &lt; elementCount; ++i)
-        valueElements[i] = JSObjectMake(context, elements[i]-&gt;wrapperClass(), elements[i].get());
-    
-    return JSObjectMakeArray(context, elementCount, valueElements.get(), 0);
</del><ins>+    return convertElementsToObjectArray(context, elements);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;AccessibilityUIElement&gt; AccessibilityUIElement::uiElementAttributeValue(JSStringRef attribute) const
</span></span></pre>
</div>
</div>

</body>
</html>