((nsFrame*)rootFrame)->Invalidate(mPresContext, rect, PR_FALSE);
if (!rect.IsEmpty()) { ((nsFrame*)rootFrame)->Invalidate(mPresContext, rect, PR_FALSE); }
PresShell::UnsuppressAndInvalidate(){  nsCOMPtr<nsIScriptGlobalObject> globalObject;  mDocument->GetScriptGlobalObject(getter_AddRefs(globalObject));    nsCOMPtr<nsPIDOMWindow> ourWindow = do_QueryInterface(globalObject);  nsCOMPtr<nsIFocusController> focusController;  if (ourWindow)    ourWindow->GetRootFocusController(getter_AddRefs(focusController));  if (focusController)    // Suppress focus.  The act of tearing down the old content viewer    // causes us to blur incorrectly.    focusController->SetSuppressFocus(PR_TRUE, "PresShell suppression on Web page loads");  nsCOMPtr<nsISupports> container;  mPresContext->GetContainer(getter_AddRefs(container));  if (container) {    nsCOMPtr<nsIDocShell> cvc(do_QueryInterface(container));    if (cvc) {      nsCOMPtr<nsIContentViewer> cv;      cvc->GetContentViewer(getter_AddRefs(cv));      if (cv) {        nsCOMPtr<nsIPresShell> kungFuDeathGrip(this);        cv->Show();        // Calling |Show| may destroy us.  Not sure why yet, but it's        // a smoketest blocker.        if (mIsDestroying)          return;      }    }  }  mPaintingSuppressed = PR_FALSE;  nsIFrame* rootFrame;  mFrameManager->GetRootFrame(&rootFrame);  if (rootFrame) {    nsRect rect;    rootFrame->GetRect(rect);    ((nsFrame*)rootFrame)->Invalidate(mPresContext, rect, PR_FALSE);  }  if (ourWindow)    CheckForFocus(ourWindow, focusController, mDocument);  if (focusController) // Unsuppress now that we've shown the new window and focused it.    focusController->SetSuppressFocus(PR_FALSE, "PresShell suppression on Web page loads");}