mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 416742 - Regression: multiple rowgroups interfere with getColumnAtIndex(), r=bernd, sr=roc, a=beltzner
This commit is contained in:
parent
1095ea5a72
commit
17652cbd2d
@ -48,6 +48,7 @@ include $(topsrcdir)/config/rules.mk
|
|||||||
_TEST_FILES =\
|
_TEST_FILES =\
|
||||||
test_bug368835.xul \
|
test_bug368835.xul \
|
||||||
test_groupattrs.xul \
|
test_groupattrs.xul \
|
||||||
|
test_table_indexes.html \
|
||||||
test_nsIAccessibleTable_1.html \
|
test_nsIAccessibleTable_1.html \
|
||||||
test_nsIAccessibleTable_2.html \
|
test_nsIAccessibleTable_2.html \
|
||||||
test_nsIAccessibleTable_3.html \
|
test_nsIAccessibleTable_3.html \
|
||||||
|
@ -903,7 +903,7 @@ nsTableCellMap::GetIndexByRowAndColumn(PRInt32 aRow, PRInt32 aColumn) const
|
|||||||
nsCellMap* cellMap = mFirstMap;
|
nsCellMap* cellMap = mFirstMap;
|
||||||
while (cellMap) {
|
while (cellMap) {
|
||||||
PRInt32 rowCount = cellMap->GetRowCount();
|
PRInt32 rowCount = cellMap->GetRowCount();
|
||||||
if (rowCount < rowIndex) {
|
if (rowIndex >= rowCount) {
|
||||||
// If the rowCount is less than the rowIndex, this means that the index is
|
// If the rowCount is less than the rowIndex, this means that the index is
|
||||||
// not within the current map. If so, get the index of the last cell in
|
// not within the current map. If so, get the index of the last cell in
|
||||||
// the last row.
|
// the last row.
|
||||||
@ -911,7 +911,7 @@ nsTableCellMap::GetIndexByRowAndColumn(PRInt32 aRow, PRInt32 aColumn) const
|
|||||||
rowCount - 1,
|
rowCount - 1,
|
||||||
colCount - 1);
|
colCount - 1);
|
||||||
if (cellMapIdx != -1) {
|
if (cellMapIdx != -1) {
|
||||||
index += cellMapIdx;
|
index += cellMapIdx + 1;
|
||||||
rowIndex -= rowCount;
|
rowIndex -= rowCount;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -955,7 +955,7 @@ nsTableCellMap::GetRowAndColumnByIndex(PRInt32 aIndex,
|
|||||||
if (index > cellMapIdx) {
|
if (index > cellMapIdx) {
|
||||||
// The index is not within this map, so decrease it by the cellMapIdx
|
// The index is not within this map, so decrease it by the cellMapIdx
|
||||||
// determined index and increase the total row index accordingly.
|
// determined index and increase the total row index accordingly.
|
||||||
index -= cellMapIdx;
|
index -= cellMapIdx + 1;
|
||||||
previousRows += rowCount;
|
previousRows += rowCount;
|
||||||
} else {
|
} else {
|
||||||
cellMap->GetRowAndColumnByIndex(colCount, index, aRow, aColumn);
|
cellMap->GetRowAndColumnByIndex(colCount, index, aRow, aColumn);
|
||||||
|
Loading…
Reference in New Issue
Block a user