This commit is contained in:
hyatt%netscape.com 2000-08-22 22:53:46 +00:00
Родитель 1ec7a97591
Коммит c73e081e36
4 изменённых файлов: 28 добавлений и 0 удалений

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

@ -354,6 +354,17 @@ nsXBLStreamListener::Load(nsIDOMEvent* aEvent)
nsXBLBindingRequest* req = (nsXBLBindingRequest*)mBindingRequests.ElementAt(i);
req->DocumentLoaded(mBindingDocument);
}
// All reqs normally have the same binding doc. Force a synchronous
// reflow on this binding doc to deal with the fact that iframes
// don't construct or load their subdocs until they get a reflow.
if (count > 0) {
nsXBLBindingRequest* req = (nsXBLBindingRequest*)mBindingRequests.ElementAt(i);
nsCOMPtr<nsIDocument> document;
req->mBoundElement->GetDocument(*getter_AddRefs(document));
if (document)
document->FlushPendingNotifications();
}
}
for (i = 0; i < count; i++) {

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

@ -4185,6 +4185,9 @@ nsXULDocument::StartLayout(void)
}
shell->InitialReflow(r.width, r.height);
FlushPendingNotifications(); // This is done because iframes don't load their subdocs until
// they get reflowed. If we reflow asynchronously, our onload
// will fire too early. -- hyatt
// Start observing the document _after_ we do the initial
// reflow. Otherwise, we'll get into an trouble trying to

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

@ -354,6 +354,17 @@ nsXBLStreamListener::Load(nsIDOMEvent* aEvent)
nsXBLBindingRequest* req = (nsXBLBindingRequest*)mBindingRequests.ElementAt(i);
req->DocumentLoaded(mBindingDocument);
}
// All reqs normally have the same binding doc. Force a synchronous
// reflow on this binding doc to deal with the fact that iframes
// don't construct or load their subdocs until they get a reflow.
if (count > 0) {
nsXBLBindingRequest* req = (nsXBLBindingRequest*)mBindingRequests.ElementAt(i);
nsCOMPtr<nsIDocument> document;
req->mBoundElement->GetDocument(*getter_AddRefs(document));
if (document)
document->FlushPendingNotifications();
}
}
for (i = 0; i < count; i++) {

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

@ -4185,6 +4185,9 @@ nsXULDocument::StartLayout(void)
}
shell->InitialReflow(r.width, r.height);
FlushPendingNotifications(); // This is done because iframes don't load their subdocs until
// they get reflowed. If we reflow asynchronously, our onload
// will fire too early. -- hyatt
// Start observing the document _after_ we do the initial
// reflow. Otherwise, we'll get into an trouble trying to