mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Pass a callback to recalc_style_at to avoid traversing children twice.
MozReview-Commit-ID: DIHXaVNzbFM
This commit is contained in:
parent
e534ec9e47
commit
b7de96e702
6 changed files with 166 additions and 188 deletions
|
@ -70,11 +70,16 @@ impl RestyleData {
|
|||
/// Returns whether this element or any ancestor is going to be
|
||||
/// reconstructed.
|
||||
pub fn reconstructed_self_or_ancestor(&self) -> bool {
|
||||
self.reconstructed_ancestor() ||
|
||||
self.reconstructed_ancestor() || self.reconstructed_self()
|
||||
}
|
||||
|
||||
/// Returns whether this element is going to be reconstructed.
|
||||
pub fn reconstructed_self(&self) -> bool {
|
||||
self.damage.contains(RestyleDamage::reconstruct())
|
||||
}
|
||||
|
||||
/// Returns whether any ancestor of this element was restyled.
|
||||
/// Returns whether any ancestor of this element is going to be
|
||||
/// reconstructed.
|
||||
fn reconstructed_ancestor(&self) -> bool {
|
||||
self.flags.contains(ANCESTOR_WAS_RECONSTRUCTED)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue