Fix assert. Bug 236921, r+sr=dbaron, a=chofmann

git-svn-id: svn://10.0.0.236/trunk@154403 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2004-03-31 03:13:54 +00:00
parent d0fbbca5fd
commit b897a5e2fc
2 changed files with 10 additions and 12 deletions

View File

@ -2487,19 +2487,18 @@ const nsStyleBackground*
nsCSSRendering::FindNonTransparentBackground(nsStyleContext* aContext,
PRBool aStartAtParent /*= PR_FALSE*/)
{
NS_ASSERTION(aContext, "Cannot find NonTransparentBackground in a null context" );
const nsStyleBackground* result = nsnull;
nsStyleContext* context;
nsStyleContext* context = nsnull;
if (aStartAtParent) {
context = aContext->GetParent();
} else {
}
if (!context) {
context = aContext;
}
NS_ASSERTION(context, "Cannot find NonTransparentBackground in a null context" );
while (context) {
// Have to .get() because some compilers won't match the template
// otherwise (they don't look for implicit type conversions while doing
// template matching?).
result = context->GetStyleBackground();
if (0 == (result->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT))
break;

View File

@ -2487,19 +2487,18 @@ const nsStyleBackground*
nsCSSRendering::FindNonTransparentBackground(nsStyleContext* aContext,
PRBool aStartAtParent /*= PR_FALSE*/)
{
NS_ASSERTION(aContext, "Cannot find NonTransparentBackground in a null context" );
const nsStyleBackground* result = nsnull;
nsStyleContext* context;
nsStyleContext* context = nsnull;
if (aStartAtParent) {
context = aContext->GetParent();
} else {
}
if (!context) {
context = aContext;
}
NS_ASSERTION(context, "Cannot find NonTransparentBackground in a null context" );
while (context) {
// Have to .get() because some compilers won't match the template
// otherwise (they don't look for implicit type conversions while doing
// template matching?).
result = context->GetStyleBackground();
if (0 == (result->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT))
break;