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:
Oriol Brufau 2022-12-06 19:08:51 +00:00 committed by Martin Robinson
parent 1beb9880a9
commit 0c36795e20
3 changed files with 14 additions and 30 deletions

View file

@ -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