mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
style: Evaluate size feature to unknown if the container lacks size containment
For example, inline elements may have container-type:size but they don't support size containment, so @container(width >= 0) shouldn't match. Differential Revision: https://phabricator.services.mozilla.com/D163936
This commit is contained in:
parent
1beb9880a9
commit
0c36795e20
3 changed files with 14 additions and 30 deletions
|
@ -201,7 +201,7 @@ impl ContainerCondition {
|
|||
}
|
||||
}
|
||||
|
||||
let size = potential_container.primary_content_box_size();
|
||||
let size = potential_container.query_container_size();
|
||||
let style = style.clone();
|
||||
TraversalResult::Done(ContainerLookupResult {
|
||||
element: potential_container,
|
||||
|
@ -464,7 +464,7 @@ impl<'a> ContainerSizeQuery<'a> {
|
|||
let box_style = style.get_box();
|
||||
|
||||
let container_type = box_style.clone_container_type();
|
||||
let size = e.primary_content_box_size();
|
||||
let size = e.query_container_size();
|
||||
match container_type {
|
||||
ContainerType::Size => {
|
||||
TraversalResult::Done(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue