зеркало из https://github.com/mozilla/pjs.git
fix for 49835, r=danm
This commit is contained in:
Родитель
1ec7a97591
Коммит
c73e081e36
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче