Worked around a startup problem that caused body's attributes and style context to be prematurely mapped before the attributes were read in or the ua.css was read in

git-svn-id: svn://10.0.0.236/trunk@5182 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp
1998-07-08 23:15:32 +00:00
parent c722ac6974
commit f7850f3d9a
2 changed files with 26 additions and 2 deletions

View File

@@ -298,7 +298,9 @@ HTMLContentSink::Init(nsIDocument* aDoc,
if (NS_OK != rv) {
return rv;
}
mRoot->AppendChild(mBody, PR_FALSE);
// Note: Can't do this here; see the comment in OpenBody
//XXX mRoot->AppendChild(mBody, PR_FALSE);
return rv;
}
@@ -414,6 +416,10 @@ HTMLContentSink::OpenBody(const nsIParserNode& aNode)
// root has no children
SINK_TRACE(SINK_TRACE_REFLOW,
("HTMLContentSink::OpenBody: start layout"));
// This is done here instead of earlier because we need the
// attributes from the real body tag before we initiate reflow.
mRoot->AppendChild(mBody, PR_FALSE);
StartLayout();
}
@@ -716,6 +722,12 @@ HTMLContentSink::CloseContainer(const nsIParserNode& aNode)
#endif
parent->AppendChild(container, allowReflow);
#ifdef NS_DEBUG
if (allowReflow && (((PRInt32)gSinkLogModuleInfo->level) > 127)) {
printf("tick...\n");
PR_Sleep(PR_SecondsToInterval(3));
}
#endif
#if XXX
if (parent == mBody) {
// We just closed a child of the body off. Trigger a