Skip to content
Snippets Groups Projects

Backport v2022 <- v2023: Update from debian/bullseye-security

Merged Dylan Aïssi requested to merge apertis/v2023-security into apertis/v2022-security
281 files
+ 7996
5161
Compare changes
  • Side-by-side
  • Inline
Files
281
@@ -47,13 +47,13 @@ class CompoundWidgetSiblingRule : public PivotRule {
};
AccGroupInfo::AccGroupInfo(const Accessible* aItem, role aRole)
: mPosInSet(0), mSetSize(0), mParent(nullptr), mItem(aItem), mRole(aRole) {
: mPosInSet(0), mSetSize(0), mParentId(0), mItem(aItem), mRole(aRole) {
MOZ_COUNT_CTOR(AccGroupInfo);
Update();
}
void AccGroupInfo::Update() {
mParent = nullptr;
mParentId = 0;
Accessible* parent = mItem->GetNonGenericParent();
if (!parent) {
@@ -89,7 +89,7 @@ void AccGroupInfo::Update() {
// (group will be continued).
const int32_t siblingLevel = GetARIAOrDefaultLevel(candidateSibling);
if (siblingLevel < level) {
mParent = candidateSibling;
mParentId = candidateSibling->ID();
break;
}
@@ -102,7 +102,7 @@ void AccGroupInfo::Update() {
// build group information for this item based on found one.
if (siblingGroupInfo) {
mPosInSet += siblingGroupInfo->mPosInSet;
mParent = siblingGroupInfo->mParent;
mParentId = siblingGroupInfo->mParentId;
mSetSize = siblingGroupInfo->mSetSize;
return;
}
@@ -142,7 +142,7 @@ void AccGroupInfo::Update() {
// If the next item in the group has calculated group information then
// build group information for this item based on found one.
if (siblingGroupInfo) {
mParent = siblingGroupInfo->mParent;
mParentId = siblingGroupInfo->mParentId;
mSetSize = siblingGroupInfo->mSetSize;
return;
}
@@ -150,13 +150,13 @@ void AccGroupInfo::Update() {
mSetSize++;
}
if (mParent) {
if (mParentId) {
return;
}
roles::Role parentRole = parent->Role();
if (ShouldReportRelations(mRole, parentRole)) {
mParent = parent;
mParentId = parent->ID();
}
// ARIA tree and list can be arranged by using ARIA groups to organize levels.
@@ -177,7 +177,7 @@ void AccGroupInfo::Update() {
CompoundWidgetSiblingRule parentSiblingRule{mRole};
Accessible* parentPrevSibling = pivot.Prev(parent, widgetSiblingRule);
if (parentPrevSibling && parentPrevSibling->Role() == mRole) {
mParent = parentPrevSibling;
mParentId = parentPrevSibling->ID();
return;
}
}
@@ -188,7 +188,7 @@ void AccGroupInfo::Update() {
if (mRole == roles::LISTITEM || mRole == roles::OUTLINEITEM) {
Accessible* grandParent = parent->GetNonGenericParent();
if (grandParent && grandParent->Role() == mRole) {
mParent = grandParent;
mParentId = grandParent->ID();
}
}
}
@@ -347,7 +347,7 @@ Accessible* AccGroupInfo::NextItemTo(Accessible* aItem) {
}
size_t AccGroupInfo::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) {
// We don't count mParent or mItem since they (should be) counted
// We don't count mParentId or mItem since they (should be) counted
// as part of the document.
return aMallocSizeOf(this);
}
@@ -371,6 +371,18 @@ int32_t AccGroupInfo::GetARIAOrDefaultLevel(const Accessible* aAccessible) {
return aAccessible->GetLevel(true);
}
Accessible* AccGroupInfo::ConceptualParent() const {
if (!mParentId) {
// The conceptual parent can never be the document, so id 0 means none.
return nullptr;
}
if (Accessible* doc =
nsAccUtils::DocumentFor(const_cast<Accessible*>(mItem))) {
return nsAccUtils::GetAccessibleByID(doc, mParentId);
}
return nullptr;
}
static role BaseRole(role aRole) {
if (aRole == roles::CHECK_MENU_ITEM || aRole == roles::PARENT_MENUITEM ||
aRole == roles::RADIO_MENU_ITEM) {
Loading