mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1347381: Tell Servo earlier about stylesheet changes. r=heycam
MozReview-Commit-ID: 4FcFzvSTckm --HG-- extra : rebase_source : 400153f672850975794b01fe7564e01b5ac65241
This commit is contained in:
parent
c85ce403fd
commit
4b44bcc15e
@ -4580,6 +4580,17 @@ nsIPresShell::RestyleForCSSRuleChanges()
|
||||
mPresContext->RebuildCounterStyles();
|
||||
}
|
||||
|
||||
// Tell Servo that the contents of style sheets have changed.
|
||||
//
|
||||
// NB: It's important to do so before bailing out.
|
||||
//
|
||||
// Even if we have no frames, we can end up styling those when creating
|
||||
// them, and it's important for Servo to know that it needs to use the
|
||||
// correct styles.
|
||||
if (mStyleSet->IsServo()) {
|
||||
mStyleSet->AsServo()->NoteStyleSheetsChanged();
|
||||
}
|
||||
|
||||
Element* root = mDocument->GetRootElement();
|
||||
if (!mDidInitialize) {
|
||||
// Nothing to do here, since we have no frames yet
|
||||
@ -4593,11 +4604,6 @@ nsIPresShell::RestyleForCSSRuleChanges()
|
||||
|
||||
RestyleManager* 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
|
||||
|
Loading…
Reference in New Issue
Block a user