Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: third_party/WebKit/Source/web/WebAXObject.cpp

Issue 2539503003: ARIA 1.1: implementation for aria-col-* and aria-row-*. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebAXObject.cpp
diff --git a/third_party/WebKit/Source/web/WebAXObject.cpp b/third_party/WebKit/Source/web/WebAXObject.cpp
index 9b5e11b57558aa3a1556f7f0f60c15fcaccf21a8..07ff8f047e22b7a53e78bcd3bc05f4efff4d2c50 100644
--- a/third_party/WebKit/Source/web/WebAXObject.cpp
+++ b/third_party/WebKit/Source/web/WebAXObject.cpp
@@ -1110,6 +1110,53 @@ bool WebAXObject::lineBreaks(WebVector<int>& result) const {
return true;
}
+int WebAXObject::ariaColumnCount() const
+{
+ if (isDetached())
+ return 0;
+
+ if (!m_private->isAXTable())
+ return 0;
+
+ return toAXTable(m_private.get())->ariaColumnCount();
+}
+
+unsigned WebAXObject::ariaColumnIndex() const
+{
+ if (isDetached())
+ return 0;
+
+ if (!m_private->isTableCell())
+ return 0;
+
+ return toAXTableCell(m_private.get())->ariaColumnIndex();
+}
+
+int WebAXObject::ariaRowCount() const
+{
+ if (isDetached())
+ return 0;
+
+ if (!m_private->isAXTable())
+ return 0;
+
+ return toAXTable(m_private.get())->ariaRowCount();
+}
+
+unsigned WebAXObject::ariaRowIndex() const
+{
+ if (isDetached())
+ return 0;
+
+ if (m_private->isTableCell())
+ return toAXTableCell(m_private.get())->ariaRowIndex();
+
+ if (m_private->isTableRow())
+ return toAXTableRow(m_private.get())->ariaRowIndex();
+
+ return 0;
+}
+
unsigned WebAXObject::columnCount() const {
if (isDetached())
return false;
@@ -1120,9 +1167,10 @@ unsigned WebAXObject::columnCount() const {
return toAXTable(m_private.get())->columnCount();
}
-unsigned WebAXObject::rowCount() const {
+unsigned WebAXObject::rowCount() const
+{
if (isDetached())
- return false;
+ return 0;
if (!m_private->isAXTable())
return 0;

Powered by Google App Engine
This is Rietveld 408576698