mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: More fine-grained viewport units invalidation
This should speed up window resize significantly. Differential Revision: https://phabricator.services.mozilla.com/D118878
This commit is contained in:
parent
85b7a60a69
commit
25edb3c21b
6 changed files with 88 additions and 1 deletions
|
@ -60,7 +60,12 @@ impl RestyleHint {
|
|||
/// Returns whether this hint invalidates the element and all its
|
||||
/// descendants.
|
||||
pub fn contains_subtree(&self) -> bool {
|
||||
self.contains(RestyleHint::RESTYLE_SELF | RestyleHint::RESTYLE_DESCENDANTS)
|
||||
self.contains(Self::restyle_subtree())
|
||||
}
|
||||
|
||||
/// Returns whether we'll recascade all of the descendants.
|
||||
pub fn will_recascade_subtree(&self) -> bool {
|
||||
self.contains_subtree() || self.contains(Self::recascade_subtree())
|
||||
}
|
||||
|
||||
/// Returns whether we need to restyle this element.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue