Bug 1735970 part 7: Make AccIterable::Next return an Accessible. r=morgan

We need to be able to iterate through explicitly associated headers for both local and remote Accessibles.
AccIterable will serve nicely as a base class, but it needs to support the Accessible base class to do that.

Differential Revision: https://phabricator.services.mozilla.com/D141210
This commit is contained in:
James Teh 2022-04-01 09:49:58 +00:00
Родитель 1f562c2009
Коммит cdc489e318
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -23,7 +23,7 @@ namespace a11y {
class AccIterable {
public:
virtual ~AccIterable() {}
virtual LocalAccessible* Next() = 0;
virtual Accessible* Next() = 0;
private:
friend class Relation;

Просмотреть файл

@ -75,7 +75,7 @@ class Relation {
* compute and return the next related accessible.
*/
inline LocalAccessible* Next() {
LocalAccessible* target = nullptr;
Accessible* target = nullptr;
while (mFirstIter && !(target = mFirstIter->Next())) {
mFirstIter = std::move(mFirstIter->mNextIter);
@ -83,7 +83,7 @@ class Relation {
if (!mFirstIter) mLastIter = nullptr;
return target;
return target ? target->AsLocal() : nullptr;
}
private: