aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/stylesheets
diff options
context:
space:
mode:
authorOriol Brufau <oriol-bugzilla@hotmail.com>2022-12-06 19:08:51 +0000
committerMartin Robinson <mrobinson@igalia.com>2023-11-04 08:17:09 +0100
commit0c36795e204bb43d65e61faaab7a1d3bb65ce5e4 (patch)
tree579038eb6f509c86f1781db5b0adfa75588fbadb /components/style/stylesheets
parent1beb9880a9b2815b523a9ab6d35535a5d83b8cc9 (diff)
downloadservo-0c36795e204bb43d65e61faaab7a1d3bb65ce5e4.tar.gz
servo-0c36795e204bb43d65e61faaab7a1d3bb65ce5e4.zip
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
Diffstat (limited to 'components/style/stylesheets')
-rw-r--r--components/style/stylesheets/container_rule.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/style/stylesheets/container_rule.rs b/components/style/stylesheets/container_rule.rs
index aab9e64d56d..8e9babff28c 100644
--- a/components/style/stylesheets/container_rule.rs
+++ b/components/style/stylesheets/container_rule.rs
@@ -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(