зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
86e88e2cbb
Коммит
d38f0b028d
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче