mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-20 00:20:37 +00:00
Assert when we set the quirk style sheet after building rule cascades. (Bug 448281) r+sr=bzbarsky
This commit is contained in:
parent
6512c51303
commit
c155fd6771
@ -96,6 +96,12 @@ public:
|
||||
NS_IMETHOD MediumFeaturesChanged(nsPresContext* aPresContext,
|
||||
PRBool* aRulesChanged);
|
||||
|
||||
#ifdef DEBUG
|
||||
void AssertQuirksChangeOK() {
|
||||
NS_ASSERTION(!mRuleCascades, "too late to set quirks style sheet");
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
RuleCascadeData* GetRuleCascade(nsPresContext* aPresContext);
|
||||
void RefreshRuleCascade(nsPresContext* aPresContext);
|
||||
|
@ -369,6 +369,12 @@ nsStyleSet::EnableQuirkStyleSheet(PRBool aEnable)
|
||||
}
|
||||
NS_ASSERTION(mQuirkStyleSheet, "no quirk stylesheet");
|
||||
if (mQuirkStyleSheet) {
|
||||
#ifdef DEBUG
|
||||
if (mRuleProcessors[eAgentSheet]) {
|
||||
static_cast<nsCSSRuleProcessor*>(static_cast<nsIStyleRuleProcessor*>(
|
||||
mRuleProcessors[eAgentSheet]))->AssertQuirksChangeOK();
|
||||
}
|
||||
#endif
|
||||
#ifdef DEBUG_dbaron_off // XXX Make this |DEBUG| once it stops firing.
|
||||
PRBool applicableNow;
|
||||
mQuirkStyleSheet->GetApplicable(applicableNow);
|
||||
|
Loading…
x
Reference in New Issue
Block a user