зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1f562c2009
Коммит
cdc489e318
|
@ -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:
|
||||
|
|
Загрузка…
Ссылка в новой задаче