style: Recascade the document when rem units are used and the root font-size changes.

This commit is contained in:
Cameron McCormack 2017-06-03 13:18:43 +08:00
parent 7b61d55421
commit 19b61dfc08
6 changed files with 76 additions and 21 deletions

View file

@ -9,7 +9,7 @@ use context::SharedStyleContext;
use dom::TElement;
use properties::{AnimationRules, ComputedValues, PropertyDeclarationBlock};
use properties::longhands::display::computed_value as display;
use restyle_hints::{HintComputationContext, RestyleReplacements, RestyleHint};
use restyle_hints::{CascadeHint, HintComputationContext, RestyleReplacements, RestyleHint};
use rule_tree::StrongRuleNode;
use selector_parser::{EAGER_PSEUDO_COUNT, PseudoElement, RestyleDamage};
use selectors::matching::VisitedHandlingMode;
@ -414,6 +414,11 @@ impl StoredRestyleHint {
pub fn has_recascade_self(&self) -> bool {
self.0.has_recascade_self()
}
/// Insert the specified `CascadeHint`.
pub fn insert_cascade_hint(&mut self, cascade_hint: CascadeHint) {
self.0.insert_cascade_hint(cascade_hint);
}
}
impl Default for StoredRestyleHint {