mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Avoid leaving stale ANCESTOR_WAS_RECONSTRUCTED bits in the tree.
MozReview-Commit-ID: 76q5XxK2o2a
This commit is contained in:
parent
2e60b27a21
commit
05a1b682bb
2 changed files with 15 additions and 7 deletions
|
@ -106,10 +106,14 @@ impl RestyleData {
|
|||
}
|
||||
|
||||
/// Sets the flag that tells us whether we've reconstructed an ancestor.
|
||||
pub fn set_reconstructed_ancestor(&mut self) {
|
||||
// If it weren't for animation-only traversals, we could assert
|
||||
// `!self.reconstructed_ancestor()` here.
|
||||
self.flags.insert(ANCESTOR_WAS_RECONSTRUCTED);
|
||||
pub fn set_reconstructed_ancestor(&mut self, reconstructed: bool) {
|
||||
if reconstructed {
|
||||
// If it weren't for animation-only traversals, we could assert
|
||||
// `!self.reconstructed_ancestor()` here.
|
||||
self.flags.insert(ANCESTOR_WAS_RECONSTRUCTED);
|
||||
} else {
|
||||
self.flags.remove(ANCESTOR_WAS_RECONSTRUCTED);
|
||||
}
|
||||
}
|
||||
|
||||
/// Mark this element as restyled, which is useful to know whether we need
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue