Bug 1457102: Avoid all the work if the compat mode hasn't actually changed. r=heycam
In this case the stylist is marked dirty because a compat mode change. The change just doesn't exist (NavQuirks -> NavQuirks). So avoid the work in the first place. MozReview-Commit-ID: lchKJECNkO
This commit is contained in:
@@ -852,6 +852,9 @@ nsHTMLDocument::SetCompatibilityMode(nsCompatibility aMode)
|
||||
NS_ASSERTION(IsHTMLDocument() || aMode == eCompatibility_FullStandards,
|
||||
"Bad compat mode for XHTML document!");
|
||||
|
||||
if (mCompatMode == aMode) {
|
||||
return;
|
||||
}
|
||||
mCompatMode = aMode;
|
||||
CSSLoader()->SetCompatibilityMode(mCompatMode);
|
||||
RefPtr<nsPresContext> pc = GetPresContext();
|
||||
|
||||
Reference in New Issue
Block a user