+2009-03-13 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Bug 24474: AX: in multi-body tables, asking for a cell at a specific coordinate can return nil
+ https://bugs.webkit.org/show_bug.cgi?id=24474
+
+ * platform/mac-snowleopard/accessibility/table-multi-bodies-expected.txt: Added.
+ * platform/mac-snowleopard/accessibility/table-multi-bodies.html: Added.
+
2009-03-13 Adele Peterson <adele@apple.com>
Reviewed by Justin Garcia.
--- /dev/null
+ Forum Last Post Threads Posts
+English Forums
+ Main Discussion
+ Want to communicate with other local fans? Do it here, too! Today 03:52pm 381 23,437
+
+
+
+------------------------
+Pass
--- /dev/null
+<html>
+
+ <head>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+ </script>
+ </head>
+
+ <body id="body">
+
+ <table class="tborder" cellpadding="6" cellspacing="1" border="1" width="100%" align="center">
+ <thead>
+ <tr align="center">
+ <td class="thead"> </td>
+ <td class="thead" width="100%" align="left">Forum</td>
+ <td class="thead">Last Post</td>
+ <td class="thead">Threads</td>
+ <td class="thead">Posts</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td class="tcat" colspan="5"><a style="float:right" href="#top" ><img id="collapseimg_forumbit_71" alt="" border="0" /></a>
+ <a href="forumdisplay.php?f=71">English Forums</a>
+ </td>
+ </tr>
+ </tbody>
+ <tbody id="collapseobj_forumbit_71" style="">
+ <tr>
+ <td class="tcat"><span class="smallfont"> </span></td>
+ <td class="tcat" colspan="4">
+ <a href="forumdisplay.php?f=30">Main Discussion</a>
+ </td>
+ </tr>
+ <tr align="center">
+ <td class="alt2"><img alt="" border="0" id="forum_statusicon_23" /></td>
+ <td class="alt1Active" align="left" id="f23">
+ Want to communicate with other local fans? Do it here, too!
+ </td>
+ <td class="alt2" nowrap="nowrap">
+ Today <span class="time">03:52pm</span>
+ </td>
+ <td class="alt1">381</td>
+<td class="alt2">23,437</td>
+</tr>
+</table>
+<BR><BR><BR>
+<div id="result">
+</div>
+
+<script>
+ if (window.accessibilityController) {
+
+ var body = document.getElementById("body");
+ body.focus();
+ var table = accessibilityController.focusedElement.childAtIndex(0);
+
+ result.innerText += "------------------------\n";
+ var axCellKey = "AXCell";
+
+ var tableCell1 = table.cellForColumnAndRow(2,0);
+ if (tableCell1.allAttributes().indexOf(axCellKey) != -1) {
+ result.innerText += "Pass";
+ }
+ else {
+ result.innerText += "Fail";
+ }
+ }
+</script>
+
+</body>
+</html>
+2009-03-13 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Beth Dakin.
+
+ Bug 24474: AX: in multi-body tables, asking for a cell at a specific coordinate can return nil
+ https://bugs.webkit.org/show_bug.cgi?id=24474
+
+ Test: platform/mac-snowleopard/accessibility/table-multi-bodies.html
+
+ * page/AccessibilityTable.cpp:
+ (WebCore::AccessibilityTable::cellForColumnAndRow):
+
2009-03-13 Jian Li <jianli@chromium.org>
Reviewed by Dimitri Glazkov.
unsigned rowOffset = 0;
while (tableSection) {
- rowCount += tableSection->numRows();
+ unsigned numRows = tableSection->numRows();
unsigned numCols = tableSection->numColumns();
- if (row < rowCount && column < numCols) {
- int sectionSpecificRow = row - rowOffset;
+ rowCount += numRows;
+
+ unsigned sectionSpecificRow = row - rowOffset;
+ if (row < rowCount && column < numCols && sectionSpecificRow < numRows) {
cell = tableSection->cellAt(sectionSpecificRow, column).cell;
// we didn't find the cell, which means there's spanning happening
if (cell)
break;
- rowOffset += rowCount;
+ rowOffset += numRows;
// we didn't find anything between the rows we should have
- if (row < rowOffset)
+ if (row < rowCount)
break;
tableSection = table->sectionBelow(tableSection, true);
}