mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Fix dynamic change handling of justify-items legacy values.
Bug: 1384542 Reviewed-by: heycam MozReview-Commit-ID: NEPGlL4ri7
This commit is contained in:
parent
0e4c7c3722
commit
c0922dabb6
1 changed files with 12 additions and 8 deletions
|
@ -324,15 +324,19 @@ trait PrivateMatchMethods: TElement {
|
||||||
restyle.damage |= difference.damage;
|
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 {
|
match difference.change {
|
||||||
StyleChange::Unchanged => {
|
StyleChange::Unchanged => ChildCascadeRequirement::CanSkipCascade,
|
||||||
// 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::Changed => ChildCascadeRequirement::MustCascadeChildren,
|
StyleChange::Changed => ChildCascadeRequirement::MustCascadeChildren,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue