Bug 123899 (document.body.innerHTML is broken). Don't notify the document twice about content modification from script. r=Fabian, sr=jst, a=asa.

This commit is contained in:
peterv%netscape.com 2002-03-20 13:22:27 +00:00
Родитель 5a075d3f67
Коммит 11201c927b
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -4937,7 +4937,7 @@ HTMLContentSink::PreEvaluateScript()
// to the body (so that they can be seen by scripts) and force reflow. // to the body (so that they can be seen by scripts) and force reflow.
SINK_TRACE(SINK_TRACE_CALLS, SINK_TRACE(SINK_TRACE_CALLS,
("HTMLContentSink::PreEvaluateScript: flushing tags before evaluating script")); ("HTMLContentSink::PreEvaluateScript: flushing tags before evaluating script"));
mCurrentContext->FlushTags(PR_FALSE); FlushPendingNotifications();
mCurrentContext->SetPreAppend(PR_TRUE); mCurrentContext->SetPreAppend(PR_TRUE);
mInScript++; mInScript++;
@ -4949,6 +4949,8 @@ HTMLContentSink::PostEvaluateScript()
{ {
mInScript--; mInScript--;
mCurrentContext->SetPreAppend(PR_FALSE); mCurrentContext->SetPreAppend(PR_FALSE);
// Take into account the content that script evaluation might have added.
mCurrentContext->UpdateChildCounts();
} }
PRBool PRBool