style: Fix dynamic change handling of justify-items legacy values.

Bug: 1384542
Reviewed-by: heycam
MozReview-Commit-ID: NEPGlL4ri7
This commit is contained in:
Emilio Cobos Álvarez 2017-07-27 16:45:04 +02:00
parent 0e4c7c3722
commit c0922dabb6
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -324,15 +324,19 @@ trait PrivateMatchMethods: TElement {
restyle.damage |= difference.damage;
}
// We need to cascade the children in order to ensure the correct
// propagation of computed value flags.
//
// FIXME(emilio): If we start optimizing changes to reset-only
// properties that aren't explicitly inherited, we'd need to add a flag
// to handle justify-items: auto correctly when there's a legacy
// justify-items.
if old_values.flags != new_values.flags {
return ChildCascadeRequirement::MustCascadeChildren;
}
match difference.change {
StyleChange::Unchanged => {
// We need to cascade the children in order to ensure the
// correct propagation of computed value flags.
if old_values.flags != new_values.flags {
return ChildCascadeRequirement::MustCascadeChildren;
}
ChildCascadeRequirement::CanSkipCascade
},
StyleChange::Unchanged => ChildCascadeRequirement::CanSkipCascade,
StyleChange::Changed => ChildCascadeRequirement::MustCascadeChildren,
}
}