mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Rematch all descendants when container-type
changes
Extend WPT to ensure invalidation of descendants deeper than one. Differential Revision: https://phabricator.services.mozilla.com/D158058
This commit is contained in:
parent
27958b191a
commit
6cb665df95
1 changed files with 9 additions and 0 deletions
|
@ -970,6 +970,15 @@ pub trait MatchMethods: TElement {
|
|||
None => return ChildRestyleRequirement::MustCascadeChildren,
|
||||
};
|
||||
|
||||
let old_container_type = old_primary_style.clone_container_type();
|
||||
let new_container_type = new_primary_style.clone_container_type();
|
||||
if old_container_type != new_container_type && !new_container_type.is_size_container_type()
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
restyle_requirement = cmp::max(
|
||||
restyle_requirement,
|
||||
self.accumulate_damage_for(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue