Exemplo n.º 1
0
uint32_t ARIAGridCellAccessible::ColIdx() const {
  Accessible* row = Row();
  if (!row) return 0;

  int32_t indexInRow = IndexInParent();
  uint32_t colIdx = 0;
  for (int32_t idx = 0; idx < indexInRow; idx++) {
    Accessible* cell = row->GetChildAt(idx);
    if (cell->IsTableCell()) {
      colIdx += cell->AsTableCell()->ColExtent();
    }
  }

  return colIdx;
}
Exemplo n.º 2
0
uint32_t ARIAGridAccessible::ColCount() const {
  AccIterator rowIter(this, filters::GetRow);
  Accessible* row = rowIter.Next();
  if (!row) return 0;

  AccIterator cellIter(row, filters::GetCell);
  Accessible* cell = nullptr;

  uint32_t colCount = 0;
  while ((cell = cellIter.Next())) {
    MOZ_ASSERT(cell->IsTableCell(), "No table or grid cell!");
    colCount += cell->AsTableCell()->ColExtent();
  }

  return colCount;
}