diff options
author | Oriol Brufau <oriol-bugzilla@hotmail.com> | 2022-12-06 19:08:51 +0000 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-11-04 08:17:09 +0100 |
commit | 0c36795e204bb43d65e61faaab7a1d3bb65ce5e4 (patch) | |
tree | 579038eb6f509c86f1781db5b0adfa75588fbadb /components/style/dom.rs | |
parent | 1beb9880a9b2815b523a9ab6d35535a5d83b8cc9 (diff) | |
download | servo-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/dom.rs')
-rw-r--r-- | components/style/dom.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/components/style/dom.rs b/components/style/dom.rs index 98246ae562c..3f0924cf77e 100644 --- a/components/style/dom.rs +++ b/components/style/dom.rs @@ -943,8 +943,10 @@ pub trait TElement: fn namespace(&self) -> &<SelectorImpl as selectors::parser::SelectorImpl>::BorrowedNamespaceUrl; - /// Returns the size of the primary box of the element. - fn primary_content_box_size(&self) -> euclid::default::Size2D<Option<app_units::Au>>; + /// Returns the size of the element to be used in container size queries. + /// This will usually be the size of the content area of the primary box, + /// but can be None if there is no box or if some axis lacks size containment. + fn query_container_size(&self) -> euclid::default::Size2D<Option<app_units::Au>>; } /// TNode and TElement aren't Send because we want to be careful and explicit |