nsHTMLReflowCommand* reflowCmd; rv = NS_NewHTMLReflowCommand(&reflowCmd, this, eReflowType_ReflowDirty); if (NS_SUCCEEDED(rv)) { GetPresContext()->PresShell()->AppendReflowCommand(reflowCmd); }
rv = GetPresContext()->PresShell()-> AppendReflowCommand(this, eReflowType_ReflowDirty, nsnull);
CanvasFrame::RemoveFrame(nsIAtom*        aListName,                         nsIFrame*       aOldFrame){  nsresult  rv;  NS_ASSERTION(!aListName, "unexpected child list name");  if (aListName) {    // We only support the unnamed principal child list    rv = NS_ERROR_INVALID_ARG;    } else if (aOldFrame == mFrames.FirstChild()) {    // It's our one and only child frame    // Damage the area occupied by the deleted frame    // The child of the canvas probably can't have an outline, but why bother    // thinking about that?    Invalidate(aOldFrame->GetOverflowRect() + aOldFrame->GetPosition(), PR_FALSE);    // Remove the frame and destroy it    mFrames.DestroyFrame(GetPresContext(), aOldFrame);    // Generate a reflow command so we get reflowed    nsHTMLReflowCommand* reflowCmd;    rv = NS_NewHTMLReflowCommand(&reflowCmd, this, eReflowType_ReflowDirty);    if (NS_SUCCEEDED(rv)) {      GetPresContext()->PresShell()->AppendReflowCommand(reflowCmd);    }  } else {    rv = NS_ERROR_FAILURE;  }  return rv;}