Bug 570866. De-bogify the assertion.
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 08 Jun 2010 23:36:17 -0400
changeset 43362 d743cad887b5da7f743178d8d6e2ad17756eeb72
parent 43361 8e2ff18bc67e3a14decbad48b3f5f9f057919ea0
child 43363 f17c85b40f0f703d1a91727995a3dbf8b57d13c2
push idunknown
push userunknown
push dateunknown
bugs570866
milestone1.9.3a5pre
Bug 570866. De-bogify the assertion.
layout/base/nsFrameManager.cpp
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -623,26 +623,25 @@ VerifyContextParent(nsPresContext* aPres
       fputs("Has parent context: ", stdout);
       DumpContext(nsnull, actualParentContext);
       fputs("Should be null\n\n", stdout);
     }
   }
 
   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);
   }
 }
 
 static void
 VerifyStyleTree(nsPresContext* aPresContext, nsIFrame* aFrame,