mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add assertions that would catch bug 558943 earlier. r=dbaron
This commit is contained in:
parent
6e35d9ce4f
commit
43a16212af
@ -614,6 +614,7 @@ VerifyContextParent(nsPresContext* aPresContext, nsIFrame* aFrame,
|
||||
fputs("\n", stdout);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
if (actualParentContext) {
|
||||
@ -624,6 +625,23 @@ VerifyContextParent(nsPresContext* aPresContext, nsIFrame* aFrame,
|
||||
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().
|
||||
if (childStyleIfVisited &&
|
||||
!((childStyleIfVisited->GetRuleNode() != aContext->GetRuleNode() &&
|
||||
childStyleIfVisited->GetParent() == aContext->GetParent()) ||
|
||||
(childStyleIfVisited->GetRuleNode() == aContext->GetRuleNode() &&
|
||||
childStyleIfVisited->GetParent() ==
|
||||
aContext->GetParent()->GetStyleIfVisited()))) {
|
||||
NS_ERROR("Visited style has wrong parent");
|
||||
DumpContext(aFrame, aContext);
|
||||
fputs("\n", stdout);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user