Bug 669263 - reorder event for document must be fired after document initial tree creation, r=tbsaunde

This commit is contained in:
Alexander Surkov
2011-07-19 17:30:32 +09:00
parent 4f88c636ad
commit 62164b8893
6 changed files with 168 additions and 63 deletions

View File

@@ -258,17 +258,9 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
if (ownerContent) {
nsAccessible* outerDocAcc = mDocument->GetAccessible(ownerContent);
if (outerDocAcc && outerDocAcc->AppendChild(childDoc)) {
if (mDocument->AppendChildDocument(childDoc)) {
// Fire reorder event to notify new accessible document has been
// attached to the tree.
nsRefPtr<AccEvent> reorderEvent =
new AccEvent(nsIAccessibleEvent::EVENT_REORDER, outerDocAcc,
eAutoDetect, AccEvent::eCoalesceFromSameSubtree);
if (reorderEvent)
QueueEvent(reorderEvent);
if (mDocument->AppendChildDocument(childDoc))
continue;
}
outerDocAcc->RemoveChild(childDoc);
}