mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue