rendered paste bodynsGlobalWindow::Redraw(){ nsresult rv; usleep(500000); nsCOMPtr<nsIDocShell> docShell = GetDocShellInternal(); if (!docShell) return NS_ERROR_FAILURE; nsCOMPtr<nsIPresShell> presShell; rv = docShell->GetPresShell(getter_AddRefs(presShell)); if (!presShell || NS_FAILED(rv)) return NS_ERROR_FAILURE; nsIFrame *rootFrame = presShell->GetRootFrame(); if (!rootFrame) return NS_ERROR_FAILURE; nsRect r = rootFrame->GetRect(); r.x = r.y = 0; rootFrame->Invalidate(r, PR_TRUE); presShell->GetDocument()->FlushPendingNotifications(Flush_Display); return NS_OK;}