Bug 588692. If we can't paint with widget layers, don't try to. r=roc

This commit is contained in:
Timothy Nikkel 2010-08-21 19:55:55 -05:00
Родитель 4d4053f999
Коммит d6d204cff7
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -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();