[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:23:39 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 24c5d4edc811a325469ba0377db8c04c8cda03aa
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 30 17:19:40 2009 +0000
2009-10-30 Joanmarie Diggs <joanmarie.diggs at gmail.com>
Reviewed by Xan Lopez.
https://bugs.webkit.org/show_bug.cgi?id=25534
[GTK] Objects of ROLE_TABLE should implement the accessible table interface
Second part of the implementation of AtkTable.
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(cellAtIndex):
(webkit_accessible_table_get_column_at_index):
(webkit_accessible_table_get_row_at_index):
(webkit_accessible_table_get_caption):
(atk_table_interface_init):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50339 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index abd8c92..cee32de 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-30 Joanmarie Diggs <joanmarie.diggs at gmail.com>
+
+ Reviewed by Xan Lopez.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25534
+ [GTK] Objects of ROLE_TABLE should implement the accessible table interface
+
+ Second part of the implementation of AtkTable.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (cellAtIndex):
+ (webkit_accessible_table_get_column_at_index):
+ (webkit_accessible_table_get_row_at_index):
+ (webkit_accessible_table_get_caption):
+ (atk_table_interface_init):
+
2009-10-30 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
index b516c51..2721359 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
@@ -1238,6 +1238,20 @@ static gint cellIndex(AccessibilityTableCell* AXCell, AccessibilityTable* AXTabl
return position - allCells.begin();
}
+static AccessibilityTableCell* cellAtIndex(AtkTable* table, gint index)
+{
+ AccessibilityObject* accTable = core(table);
+ if (accTable->isAccessibilityRenderObject()) {
+ AccessibilityObject::AccessibilityChildrenVector allCells;
+ static_cast<AccessibilityTable*>(accTable)->cells(allCells);
+ if (0 <= index && static_cast<unsigned>(index) < allCells.size()) {
+ AccessibilityObject* accCell = allCells.at(index).get();
+ return static_cast<AccessibilityTableCell*>(accCell);
+ }
+ }
+ return 0;
+}
+
static AtkObject* webkit_accessible_table_ref_at(AtkTable* table, gint row, gint column)
{
AccessibilityTableCell* AXCell = cell(table, row, column);
@@ -1253,6 +1267,28 @@ static gint webkit_accessible_table_get_index_at(AtkTable* table, gint row, gint
return cellIndex(AXCell, AXTable);
}
+static gint webkit_accessible_table_get_column_at_index(AtkTable* table, gint index)
+{
+ AccessibilityTableCell* axCell = cellAtIndex(table, index);
+ if (axCell){
+ pair<int, int> columnRange;
+ axCell->columnIndexRange(columnRange);
+ return columnRange.first;
+ }
+ return -1;
+}
+
+static gint webkit_accessible_table_get_row_at_index(AtkTable* table, gint index)
+{
+ AccessibilityTableCell* axCell = cellAtIndex(table, index);
+ if (axCell){
+ pair<int, int> rowRange;
+ axCell->rowIndexRange(rowRange);
+ return rowRange.first;
+ }
+ return -1;
+}
+
static gint webkit_accessible_table_get_n_columns(AtkTable* table)
{
AccessibilityObject* accTable = core(table);
@@ -1308,15 +1344,32 @@ static AtkObject* webkit_accessible_table_get_row_header(AtkTable* table, gint r
return 0;
}
+static AtkObject* webkit_accessible_table_get_caption(AtkTable* table)
+{
+ AccessibilityObject* accTable = core(table);
+ if (accTable->isAccessibilityRenderObject()) {
+ Node* node = static_cast<AccessibilityRenderObject*>(accTable)->renderer()->node();
+ if (node && node->hasTagName(HTMLNames::tableTag)) {
+ HTMLTableCaptionElement* caption = static_cast<HTMLTableElement*>(node)->caption();
+ if (caption)
+ return AccessibilityObject::firstAccessibleObjectFromNode(caption->renderer()->node())->wrapper();
+ }
+ }
+ return 0;
+}
+
static void atk_table_interface_init(AtkTableIface* iface)
{
iface->ref_at = webkit_accessible_table_ref_at;
iface->get_index_at = webkit_accessible_table_get_index_at;
+ iface->get_column_at_index = webkit_accessible_table_get_column_at_index;
+ iface->get_row_at_index = webkit_accessible_table_get_row_at_index;
iface->get_n_columns = webkit_accessible_table_get_n_columns;
iface->get_n_rows = webkit_accessible_table_get_n_rows;
iface->get_column_extent_at = webkit_accessible_table_get_column_extent_at;
iface->get_row_extent_at = webkit_accessible_table_get_row_extent_at;
iface->get_row_header = webkit_accessible_table_get_row_header;
+ iface->get_caption = webkit_accessible_table_get_caption;
}
static const GInterfaceInfo AtkInterfacesInitFunctions[] = {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list