Bug #285076 --> XUL Template Builder doesn't work with Dynamic overlays because we aren't sending out notifications to the document when the overlay is loaded dynamically.

r=jst
sr=bryner
This commit is contained in:
scott%scott-macgregor.org 2005-03-17 21:26:04 +00:00
parent 894e0ed85d
commit fd9de2674a

View File

@ -1131,10 +1131,18 @@ nsXULContentBuilder::CreateTemplateAndContainerContents(nsIContent* aElement,
nsCOMPtr<nsIRDFResource> resource;
nsXULContentUtils::GetElementRefResource(aElement, getter_AddRefs(resource));
if (resource) {
// If we've already done initial reflow, the set notify to PR_TRUE
// to force notifications when content elements are added to the document.
PRBool notify = PR_FALSE;
nsIPresShell *shell = mRoot->GetDocument()->GetShellAt(0);
if (shell)
shell->GetDidInitialReflow(&notify);
// The element has a resource; that means that it corresponds
// to something in the graph, so we need to go to the graph to
// create its contents.
CreateContainerContents(aElement, resource, PR_FALSE, aContainer, aNewIndexInContainer);
CreateContainerContents(aElement, resource, notify, aContainer, aNewIndexInContainer);
}
return NS_OK;