Bug 629823 - Assert that the root view size is in sync with the pres context visible size. r=tnikkel a=roc
authorMats Palmgren <matspal@gmail.com>
Thu, 10 Feb 2011 23:38:37 +0100
changeset 62314 502b2bea2c4de2b2a7d96ae40c18c38ccbb44fe0
parent 62313 0a9069e1e1b8335db1b4b32c6ef0a8565707e999
child 62315 3268bdbd64c4edc0d86e2cab9511713f83046b09
push id18692
push usermpalmgren@mozilla.com
push dateThu, 10 Feb 2011 22:38:09 +0000
treeherdermozilla-central@502b2bea2c4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel, roc
bugs629823
milestone2.0b12pre
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 629823 - Assert that the root view size is in sync with the pres context visible size. r=tnikkel a=roc
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -4906,16 +4906,26 @@ PresShell::FlushPendingNotifications(moz
     if (aType >= Flush_Layout) {
       // Flush plugin geometry. Don't flush plugin geometry for
       // interruptible layouts, since WillPaint does an interruptible
       // layout.
       nsRootPresContext* rootPresContext = mPresContext->GetRootPresContext();
       if (rootPresContext) {
         rootPresContext->UpdatePluginGeometry();
       }
+#ifdef DEBUG
+      if (!mIsDestroying) {
+        nsIView* rootView;
+        if (NS_SUCCEEDED(mViewManager->GetRootView(rootView)) && rootView) {
+          nsRect bounds = rootView->GetBounds();
+          NS_ASSERTION(bounds.Size() == mPresContext->GetVisibleArea().Size(),
+                       "root view / pres context visible size mismatch");
+        }
+      }
+#endif
     }
 
     PRUint32 updateFlags = NS_VMREFRESH_NO_SYNC;
     if (aType >= Flush_Display) {
       // Flushing paints, so perform the invalidates and drawing
       // immediately
       updateFlags = NS_VMREFRESH_IMMEDIATE;
     }