a11y atspi: Fix reporting table cell pos at index (0,0)

Table (cell) row and column indices both start at 0, so
an index of 0 is valid.

Adapt the check accordingly and check for non-negative
indices instead of positive ones.

(`gtk_cell_accessible_parent_get_cell_position` sets -1
in the fallback case, so that's still handled as it used
to be.)

This fixes reporting the position of the table cell at
index (0,0) via AT-SPI.

Fixes: #5161
This commit is contained in:
Michael Weghorn 2023-07-07 15:23:06 +02:00
parent fc32ff89c5
commit 8951777518

View File

@ -401,7 +401,7 @@ gtk_cell_accessible_get_position (AtkTableCell *table_cell,
gtk_cell_accessible_parent_get_cell_position (GTK_CELL_ACCESSIBLE_PARENT (parent),
cell,
row, column);
return ((row && *row > 0) || (column && *column > 0));
return ((row && *row >= 0) || (column && *column >= 0));
}
static int