Bug 1324341 - Part 2: Redo the cascade when CSSOM methods modify style sheets. r=xidorn

MozReview-Commit-ID: AIkwBaUlxD7
This commit is contained in:
Cameron McCormack
2016-12-19 14:30:14 +08:00
parent c6d72a683a
commit 244c8f4be3
4 changed files with 21 additions and 1 deletions

View File

@@ -4518,6 +4518,12 @@ nsIPresShell::RestyleForCSSRuleChanges()
}
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
if (mStyleSet->IsServo()) {
// Tell Servo that the contents of style sheets have changed.
mStyleSet->AsServo()->NoteStyleSheetsChanged();
}
if (scopeRoots.IsEmpty()) {
// If scopeRoots is empty, we know that mStylesHaveChanged was true at
// the beginning of this function, and that we need to restyle the whole
@@ -4550,7 +4556,6 @@ PresShell::RecordStyleSheetChange(StyleSheet* aStyleSheet)
}
} else {
NS_WARNING("stylo: ServoStyleSheets don't support <style scoped>");
return;
}
mStylesHaveChanged = true;