Fix for double frame creation for scripts that document.write content that causes sink context creation. Fix that allows the last children of a body to be flushed. R=harishd
git-svn-id: svn://10.0.0.236/trunk@52232 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1066,7 +1066,7 @@ SinkContext::DidAddContent(nsIContent* aContent, PRBool aDidNotify)
|
||||
// If we just added content to a node for which
|
||||
// an insertion happen, we need to do an immediate
|
||||
// notification for that insertion.
|
||||
if ((0 < mStackPos) &&
|
||||
if (!aDidNotify && (0 < mStackPos) &&
|
||||
(mStack[mStackPos-1].mInsertionPoint != -1)) {
|
||||
nsIContent* parent = mStack[mStackPos-1].mContent;
|
||||
|
||||
@@ -2328,15 +2328,12 @@ HTMLContentSink::CloseBody(const nsIParserNode& aNode)
|
||||
NS_STOP_STOPWATCH(mWatch)
|
||||
return rv;
|
||||
}
|
||||
// Flush out anything that's left
|
||||
SINK_TRACE(SINK_TRACE_REFLOW,
|
||||
("HTMLContentSink::CloseBody: layout final body content"));
|
||||
mCurrentContext->FlushTags();
|
||||
mCurrentContext->CloseContainer(aNode);
|
||||
|
||||
if (didFlush) {
|
||||
SINK_TRACE(SINK_TRACE_REFLOW,
|
||||
("HTMLContentSink::CloseBody: layout final body text"));
|
||||
// Trigger a reflow for the flushed text
|
||||
mCurrentContext->FlushTags();
|
||||
}
|
||||
|
||||
RAPTOR_STOPWATCH_DEBUGTRACE(("Stop: nsHTMLContentSink::CloseBody()\n"));
|
||||
NS_STOP_STOPWATCH(mWatch)
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user