style: Fix container query evaluation on unsupported axis

We were falling back to viewport size, which is not what the spec says.

Differential Revision: https://phabricator.services.mozilla.com/D161132
This commit is contained in:
Emilio Cobos Álvarez 2022-11-03 14:07:02 +00:00 committed by Martin Robinson
parent aba0a4bce0
commit 81ae588ec9
3 changed files with 47 additions and 35 deletions

View file

@ -34,11 +34,13 @@ pub type KeywordParser = for<'a, 'i, 't> fn(
#[allow(missing_docs)]
pub enum Evaluator {
Length(QueryFeatureGetter<CSSPixelLength>),
OptionalLength(QueryFeatureGetter<Option<CSSPixelLength>>),
Integer(QueryFeatureGetter<u32>),
Float(QueryFeatureGetter<f32>),
BoolInteger(QueryFeatureGetter<bool>),
/// A non-negative number ratio, such as the one from device-pixel-ratio.
NumberRatio(QueryFeatureGetter<Ratio>),
OptionalNumberRatio(QueryFeatureGetter<Option<Ratio>>),
/// A resolution.
Resolution(QueryFeatureGetter<Resolution>),
/// A keyword value.