mDocument->ContentAppended(mBody, mBodyChildCount); mBody->ChildCount(mBodyChildCount);
NotifyBody();
HTMLContentSink::PreEvaluateScript(){  // Cause frame creation and reflow of all body children that   // have thus far been appended. Note that if mDirty is true  // then we know that the current body child has not yet been  // added to the content model (and, hence, it's safe to create  // frames for all body children).  // We don't want the current body child to be appended (and  // have frames be constructed for it) since the current script  // may add new content to the tree (and cause an immediate   // reflow). As long as frames don't exist for the subtree rooted  // by the current body child, new content added to the subtree  // will not generate new frames and, hence, we won't have to   // worry about reflowing of incomplete content or double frame  // creation.  if (mDirty) {    if (nsnull != mBody) {      SINK_TRACE(SINK_TRACE_REFLOW,                 ("HTMLContentSink::PreEvaluateScript: reflow content"));      mDocument->ContentAppended(mBody, mBodyChildCount);      mBody->ChildCount(mBodyChildCount);    }    mDirty = PR_FALSE;  }  // Now eagerly all pending elements (including the current body child)  // to the body (so that they can be seen by scripts). Note that frames  // have not yet been created for them (and shouldn't be).  mCurrentContext->FlushTags();    return (nsnull != mBody);}