mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Re-evaluate container queries when container gets display:contents
Differential Revision: https://phabricator.services.mozilla.com/D164234
This commit is contained in:
parent
cd50d30c31
commit
c4b8e451ed
4 changed files with 20 additions and 4 deletions
|
@ -981,6 +981,13 @@ pub trait MatchMethods: TElement {
|
|||
// Stopped being a size container. Re-evaluate container queries and units on all our descendants.
|
||||
// Changes into and between different size containment is handled in `UpdateContainerQueryStyles`.
|
||||
restyle_requirement = ChildRestyleRequirement::MustMatchDescendants;
|
||||
} else if old_container_type.is_size_container_type() &&
|
||||
!old_primary_style.is_display_contents() &&
|
||||
new_primary_style.is_display_contents()
|
||||
{
|
||||
// Also re-evaluate when a container gets 'display: contents', since size queries will now evaluate to unknown.
|
||||
// Other displays like 'inline' will keep generating a box, so they are handled in `UpdateContainerQueryStyles`.
|
||||
restyle_requirement = ChildRestyleRequirement::MustMatchDescendants;
|
||||
}
|
||||
|
||||
restyle_requirement = cmp::max(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue