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