mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Preserve restyle hints after ForThrottledAnimationFlush restyle.
Those remaining restyle hints are needed for normal traversal later.
This commit is contained in:
parent
b688353c82
commit
e700a66e9f
2 changed files with 27 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue