if (mIsReflowing) {
if (mIsReflowing || mChangeNestCount) {
PresShell::IsSafeToFlush(PRBool& aIsSafeToFlush){  aIsSafeToFlush = PR_TRUE;  if (mIsReflowing) {    // Not safe if we are reflowing    aIsSafeToFlush = PR_FALSE;  } else {    // Not safe if we are painting    nsIViewManager* viewManager = GetViewManager();    if (viewManager) {      PRBool isPainting = PR_FALSE;      viewManager->IsPainting(isPainting);      if (isPainting) {        aIsSafeToFlush = PR_FALSE;      }    }  }  return NS_OK;}