Fix for bug 167355 (non-inline document.write does not work in builds after 090522)

Clear the mDidInitialReflow flag in ContentRemoved() to allow the content sink
to call InitialReflow() when the <html> node is re-inserted.

r=jkeiser@netscape.com  sr=jst@netscape.com  a=asa@mozilla.org
This commit is contained in:
kin%netscape.com 2002-09-10 04:36:00 +00:00
Родитель 86e88e2cbb
Коммит d38f0b028d
2 изменённых файлов: 30 добавлений и 0 удалений

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

@ -5314,6 +5314,21 @@ PresShell::ContentRemoved(nsIDocument *aDocument,
WillCauseReflow();
nsresult rv = mStyleSet->ContentRemoved(mPresContext, aContainer,
aChild, aIndexInContainer);
// If we have no root content node at this point, be sure to reset
// mDidInitialReflow to PR_FALSE, this will allow InitialReflow()
// to be called again should a new root node be inserted for this
// presShell. (Bug 167355)
if (mDocument) {
nsCOMPtr<nsIContent> rootContent;
mDocument->GetRootContent(getter_AddRefs(rootContent));
if (!rootContent) {
mDidInitialReflow = PR_FALSE;
}
}
VERIFY_STYLE_TREE;
DidCauseReflow();
return rv;

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

@ -5314,6 +5314,21 @@ PresShell::ContentRemoved(nsIDocument *aDocument,
WillCauseReflow();
nsresult rv = mStyleSet->ContentRemoved(mPresContext, aContainer,
aChild, aIndexInContainer);
// If we have no root content node at this point, be sure to reset
// mDidInitialReflow to PR_FALSE, this will allow InitialReflow()
// to be called again should a new root node be inserted for this
// presShell. (Bug 167355)
if (mDocument) {
nsCOMPtr<nsIContent> rootContent;
mDocument->GetRootContent(getter_AddRefs(rootContent));
if (!rootContent) {
mDidInitialReflow = PR_FALSE;
}
}
VERIFY_STYLE_TREE;
DidCauseReflow();
return rv;