Bug 1294853: Move an accessible child before showing its new parent. r?surkov
MozReview-Commit-ID: EcdEpOZhJu7
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -1879,20 +1879,23 @@ DocAccessible::ProcessContentInserted(Ac
child = GetAccService()->CreateAccessible(aNode, aContainer);
}
if (child) {
TreeMutation mt(aContainer);
if (!aContainer->InsertAfter(child, walker.Prev())) {
return;
}
+ // Create subtree, including moving grandchildren and adding those
+ // grandchildren's hide and show events, before adding the new child's
+ // show event.
+ CreateSubtree(child);
mt.AfterInsertion(child);
mt.Done();
- CreateSubtree(child);
FireEventsOnInsertion(aContainer);
}
}
#ifdef A11Y_LOG
logging::TreeInfo("children after insertion", logging::eVerbose, aContainer);
#endif
}