/* -*- 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/. */
// The only reference to the xpcAccessibleDocument is in DocManager's cache. if (r == 1 && !!mIntl && mCache.Count() == 0) { if (mIntl->IsLocal()) {
GetAccService()->RemoveFromXPCDocumentCache(mIntl->AsLocal()->AsDoc());
} else {
GetAccService()->RemoveFromRemoteXPCDocumentCache(
mIntl->AsRemote()->AsDoc());
}
} return r;
}
xpcAccessibleGeneric* xpcAccessibleDocument::GetAccessible(
Accessible* aAccessible) { if (aAccessible->IsLocal() &&
ToXPCDocument(aAccessible->AsLocal()->Document()) != this) {
NS_ERROR( "This XPCOM document is not related with given internal accessible!"); return nullptr;
}
if (aAccessible->IsRemote() &&
ToXPCDocument(aAccessible->AsRemote()->Document()) != this) {
NS_ERROR( "This XPCOM document is not related with given internal accessible!"); return nullptr;
}
if (aAccessible->IsDoc()) returnthis;
return mCache.LookupOrInsertWith(aAccessible, [&]() -> xpcAccessibleGeneric* { if (aAccessible->IsImage()) { returnnew xpcAccessibleImage(aAccessible);
} if (aAccessible->IsTable()) { returnnew xpcAccessibleTable(aAccessible);
} if (aAccessible->IsTableCell()) { returnnew xpcAccessibleTableCell(aAccessible);
} if (aAccessible->IsHyperText()) { returnnew xpcAccessibleHyperText(aAccessible);
}
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.