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; restyle.damage |= difference.damage;
} }
match difference.change { // We need to cascade the children in order to ensure the correct
StyleChange::Unchanged => { // propagation of computed value flags.
// 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 { if old_values.flags != new_values.flags {
return ChildCascadeRequirement::MustCascadeChildren; return ChildCascadeRequirement::MustCascadeChildren;
} }
ChildCascadeRequirement::CanSkipCascade
}, match difference.change {
StyleChange::Unchanged => ChildCascadeRequirement::CanSkipCascade,
StyleChange::Changed => ChildCascadeRequirement::MustCascadeChildren, StyleChange::Changed => ChildCascadeRequirement::MustCascadeChildren,
} }
} }