style: Force to stop computing children if we find the parent has display: none.

This commit is contained in:
Emilio Cobos Álvarez 2016-08-05 11:22:20 -07:00
parent 436c1b3089
commit 544a117911
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
9 changed files with 254 additions and 116 deletions

View file

@ -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)