Bug 1385372 - Allow same id in aria-owns. r=surkov

This commit is contained in:
Eitan Isaacson 2017-08-09 12:33:44 -04:00
parent 419b26dee6
commit b6d69628bd

View File

@ -2108,6 +2108,10 @@ DocAccessible::DoARIAOwnsRelocation(Accessible* aOwner)
"candidate", child, nullptr);
#endif
if (owned->IndexOf(child) < idx) {
continue; // ignore second entry of same ID
}
// Same child on same position, no change.
if (child->Parent() == aOwner) {
int32_t indexInParent = child->IndexInParent();
@ -2138,10 +2142,6 @@ DocAccessible::DoARIAOwnsRelocation(Accessible* aOwner)
MOZ_ASSERT(owned->SafeElementAt(idx) != child, "Already in place!");
if (owned->IndexOf(child) < idx) {
continue; // ignore second entry of same ID
}
// A new child is found, check for loops.
if (child->Parent() != aOwner) {
// Child is aria-owned by another container, skip.