Bug 1382077 part 3 - Record viewport unit usage and generate proper restyle hint. r=heycam

MozReview-Commit-ID: FA2TiIejUT
This commit is contained in:
Xidorn Quan
2017-07-24 13:02:17 +10:00
parent 2798346a35
commit 6e2262114a
2 changed files with 3 additions and 13 deletions

View File

@@ -116,17 +116,7 @@ ServoStyleSet::InvalidateStyleForCSSRuleChanges()
nsRestyleHint
ServoStyleSet::MediumFeaturesChanged(bool aViewportChanged) const
{
if (Servo_StyleSet_MediumFeaturesChanged(mRawSet.get())) {
return eRestyle_Subtree;
}
if (aViewportChanged) {
// Rebuild all style data without rerunning selector matching.
//
// FIXME(emilio, bug 1328652): We don't set mUsesViewportUnits in stylo yet,
// so assume the worst.
return eRestyle_ForceDescendants;
}
return nsRestyleHint(0);
return Servo_StyleSet_MediumFeaturesChanged(mRawSet.get(), aViewportChanged);
}
size_t