/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// Get the Accessible for this table cell given its ancestor table Accessible, // verifying that the Accessible is valid.
Accessible* Acc(Accessible* aTableAcc) const;
uint64_t mAccID; // CachedTableAccessible methods which fetch a cell should retrieve the // Accessible using Acc() rather than using mAcc. We need mAcc for some // methods because we can't fetch a document by id. It's okay to use mAcc in // these methods because the caller has to hold the Accessible in order to // call them.
Accessible* mAcc;
uint32_t mRowIdx;
uint32_t mColIdx; // The cell index of the previous implicit column header.
uint32_t mPrevColHeaderCellIdx; friendclass CachedTableAccessible;
};
/** * TableAccessible implementation which builds and queries a cache.
*/ class CachedTableAccessible final : public TableAccessible { public: static CachedTableAccessible* GetFrom(Accessible* aAcc);
/** * This must be called whenever a table is destroyed or the structure of a * table changes; e.g. cells wer added or removed. It can be called with * either a table or a cell.
*/ staticvoid Invalidate(Accessible* aAcc);
// Ensure that the given row exists in our data structure, creating array // elements as needed. void EnsureRow(uint32_t aRowIdx);
// Ensure that the given row and column coordinate exists in our data // structure, creating array elements as needed. A newly created coordinate // will be set to kNoCellIdx. void EnsureRowCol(uint32_t aRowIdx, uint32_t aColIdx);
Accessible* mAcc; // The table Accessible. // We track the column count because it might not be uniform across rows in // malformed tables.
uint32_t mColCount = 0; // An array of cell instances. A cell index is an index into this array.
nsTArray<CachedTableCellAccessible> mCells; // Maps row and column coordinates to cell indices.
nsTArray<nsTArray<uint32_t>> mRowColToCellIdx; // Maps Accessibles to cell indexes to facilitate retrieval of a cell // instance from a cell Accessible. The Accessible* keys should only be used // for lookup. They should not be dereferenced.
nsTHashMap<Accessible*, uint32_t> mAccToCellIdx;
uint64_t mCaptionAccID = 0;
friendclass CachedTableCellAccessible;
};
} // namespace mozilla::a11y
#endif
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.