From d6d204cff79fa699b32185533301998b2acbea76 Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Sat, 21 Aug 2010 19:55:55 -0500 Subject: [PATCH] Bug 588692. If we can't paint with widget layers, don't try to. r=roc --- layout/base/nsLayoutUtils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index e6557155e78..d48eca866f3 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -1219,13 +1219,13 @@ nsLayoutUtils::PaintFrame(nsIRenderingContext* aRenderingContext, nsIFrame* aFra const nsRegion& aDirtyRegion, nscolor aBackstop, PRUint32 aFlags) { -#ifdef DEBUG if (aFlags & PAINT_WIDGET_LAYERS) { nsIView* view = aFrame->GetView(); - NS_ASSERTION(view && view->GetWidget() && GetDisplayRootFrame(aFrame) == aFrame, - "PAINT_WIDGET_LAYERS should only be used on a display root that has a widget"); + if (!(view && view->GetWidget() && GetDisplayRootFrame(aFrame) == aFrame)) { + aFlags &= ~PAINT_WIDGET_LAYERS; + NS_ASSERTION(aRenderingContext, "need a rendering context"); + } } -#endif nsPresContext* presContext = aFrame->PresContext(); nsIPresShell* presShell = presContext->PresShell();