mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Make the assertions saner. Bug 342923, r+sr=dbaron
This commit is contained in:
parent
45428cf473
commit
715c457c96
@ -423,11 +423,11 @@ nsStyleSet::AssertNoCSSRules(nsRuleNode* aCurrLevelNode,
|
||||
if (!aCurrLevelNode || aCurrLevelNode == aLastPrevLevelNode)
|
||||
return;
|
||||
|
||||
AssertNoImportantRules(aCurrLevelNode->GetParent(), aLastPrevLevelNode);
|
||||
AssertNoCSSRules(aCurrLevelNode->GetParent(), aLastPrevLevelNode);
|
||||
|
||||
nsIStyleRule *rule = aCurrLevelNode->GetRule();
|
||||
nsCOMPtr<nsICSSStyleRule> cssRule(do_QueryInterface(rule));
|
||||
NS_ASSERTION(!cssRule, "Unexpected CSS rule");
|
||||
NS_ASSERTION(!cssRule || !cssRule->Selector(), "Unexpected CSS rule");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -493,6 +493,7 @@ nsStyleSet::FileRules(nsIStyleRuleProcessor::EnumFunc aCollectorFunc,
|
||||
#endif
|
||||
AddImportantRules(lastUserRN, lastPresHintRN); //user
|
||||
#ifdef DEBUG
|
||||
AssertNoCSSRules(lastPresHintRN, lastAgentRN);
|
||||
AssertNoImportantRules(lastPresHintRN, lastAgentRN); // preshints
|
||||
#endif
|
||||
AddImportantRules(lastAgentRN, nsnull); //agent
|
||||
|
Loading…
Reference in New Issue
Block a user