bug 1270916 - call CreateSubtree() before firing a show event for the tree root

r=davidb

This ensures that if creating the sub tree creates events to fire they will go
before the show event for the root of the tree.  It is fine to fire show events
for the subtree before the root because they will just get coalesced away
anyway.  However it is important that any hide events come before the hidden
subtree appears in the new tree.
This commit is contained in:
Trevor Saunders 2016-11-10 23:35:51 -05:00
Родитель ac89878cfd
Коммит 44c897cc27
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -1860,8 +1860,8 @@ DocAccessible::ProcessContentInserted(Accessible* aContainer,
"container", aContainer, "child", iter.Child(), nullptr);
#endif
mt.AfterInsertion(iter.Child());
CreateSubtree(iter.Child());
mt.AfterInsertion(iter.Child());
continue;
}
@ -1907,10 +1907,10 @@ DocAccessible::ProcessContentInserted(Accessible* aContainer, nsIContent* aNode)
if (!aContainer->InsertAfter(child, walker.Prev())) {
return;
}
CreateSubtree(child);
mt.AfterInsertion(child);
mt.Done();
CreateSubtree(child);
FireEventsOnInsertion(aContainer);
}
}