Bug 570866. De-bogify the assertion.

This commit is contained in:
Boris Zbarsky 2010-06-08 23:36:17 -04:00
parent fad57cbfe8
commit 9c0d6be952

View File

@ -628,16 +628,15 @@ VerifyContextParent(nsPresContext* aPresContext, nsIFrame* aFrame,
nsStyleContext* childStyleIfVisited = aContext->GetStyleIfVisited();
// Since we have different rules for :link and :visited in our ua/user sheets,
// we know that either childStyleIfVisited has a different rulenode than
// aContext (in which case it has :visited rules applied and its parent must
// be aContext->GetParent()), or it has the same rulenode and then its parent
// must be aContext->GetParent()->GetStyleIfVisited().
// we know that either childStyleIfVisited has
// aContext->GetParent()->GetStyleIfVisited() as the parent or it has a
// different rulenode from aContext _and_ has aContext->GetParent() as the
// parent.
if (childStyleIfVisited &&
!((childStyleIfVisited->GetRuleNode() != aContext->GetRuleNode() &&
childStyleIfVisited->GetParent() == aContext->GetParent()) ||
(childStyleIfVisited->GetRuleNode() == aContext->GetRuleNode() &&
childStyleIfVisited->GetParent() ==
aContext->GetParent()->GetStyleIfVisited()))) {
childStyleIfVisited->GetParent() ==
aContext->GetParent()->GetStyleIfVisited())) {
NS_ERROR("Visited style has wrong parent");
DumpContext(aFrame, aContext);
fputs("\n", stdout);