Bug 276431 patch 12b: Allow "UnsuppressPainting" call to be effective in resource documents, by disabling EnsureVisible check. r=roc a=blocking
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 08 Sep 2010 13:40:39 -0700
changeset 52218 2515b8ed7160d5d18dcc5cc561c38dc37aa05cf9
parent 52217 153aab5549269f1abc2fcd05a1600dbb49e56ae7
child 52219 e4b11cd1b34cf59157e988ff58b7f48b2cbea60b
push id15573
push userdholbert@mozilla.com
push dateWed, 08 Sep 2010 20:57:52 +0000
treeherdermozilla-central@ec53c1b41f3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, blocking
bugs276431
milestone2.0b6pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 276431 patch 12b: Allow "UnsuppressPainting" call to be effective in resource documents, by disabling EnsureVisible check. r=roc a=blocking
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -4523,17 +4523,20 @@ PresShell::CaptureHistoryState(nsILayout
   FrameManager()->CaptureFrameState(rootFrame, historyState);  
  
   return NS_OK;
 }
 
 void
 PresShell::UnsuppressAndInvalidate()
 {
-  if (!mPresContext->EnsureVisible() || mHaveShutDown) {
+  // Note: We ignore the EnsureVisible check for resource documents, because
+  // they won't have a docshell, so they'll always fail EnsureVisible.
+  if ((!mDocument->IsResourceDoc() && !mPresContext->EnsureVisible()) ||
+      mHaveShutDown) {
     // No point; we're about to be torn down anyway.
     return;
   }
   
   mPaintingSuppressed = PR_FALSE;
   nsIFrame* rootFrame = FrameManager()->GetRootFrame();
   if (rootFrame) {
     // let's assume that outline on a root frame is not supported