Preserve restyle hints after ForThrottledAnimationFlush restyle.

Those remaining restyle hints are needed for normal traversal later.
This commit is contained in:
Hiroyuki Ikezoe 2017-07-15 11:17:57 +09:00
parent b688353c82
commit e700a66e9f
2 changed files with 27 additions and 2 deletions

View file

@ -61,6 +61,12 @@ impl RestyleData {
*self = Self::new();
}
/// Clear restyle flags and damage.
fn clear_flags_and_damage(&mut self) {
self.damage = RestyleDamage::empty();
self.flags = RestyleFlags::empty();
}
/// Returns whether this element or any ancestor is going to be
/// reconstructed.
pub fn reconstructed_self_or_ancestor(&self) -> bool {
@ -331,4 +337,9 @@ impl ElementData {
pub fn clear_restyle_state(&mut self) {
self.restyle.clear();
}
/// Drops restyle flags and damage from the element.
pub fn clear_restyle_flags_and_damage(&mut self) {
self.restyle.clear_flags_and_damage();
}
}