diff options
author | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-08-05 11:22:20 -0700 |
---|---|---|
committer | Emilio Cobos Álvarez <ecoal95@gmail.com> | 2016-08-10 18:26:21 -0700 |
commit | 544a117911c7283a3dbfc2cf089c6481d287508f (patch) | |
tree | 72c0aedc3350f83fca79a808eb23ce1024f8692d /components/script_layout_interface/restyle_damage.rs | |
parent | 436c1b308930e1c98b311df2fa107757de38026f (diff) | |
download | servo-544a117911c7283a3dbfc2cf089c6481d287508f.tar.gz servo-544a117911c7283a3dbfc2cf089c6481d287508f.zip |
style: Force to stop computing children if we find the parent has display: none.
Diffstat (limited to 'components/script_layout_interface/restyle_damage.rs')
-rw-r--r-- | components/script_layout_interface/restyle_damage.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script_layout_interface/restyle_damage.rs b/components/script_layout_interface/restyle_damage.rs index fc7c11d4259..95722cc1a86 100644 --- a/components/script_layout_interface/restyle_damage.rs +++ b/components/script_layout_interface/restyle_damage.rs @@ -47,6 +47,10 @@ impl TRestyleDamage for RestyleDamage { /// For Servo the style source is always the computed values. type PreExistingComputedValues = Arc<ServoComputedValues>; + fn empty() -> Self { + RestyleDamage::empty() + } + fn compute(old: Option<&Arc<ServoComputedValues>>, new: &Arc<ServoComputedValues>) -> RestyleDamage { compute_damage(old, new) |