diff --git a/components/style/properties/longhand/position.mako.rs b/components/style/properties/longhand/position.mako.rs index 263e45579f33..590b7cb8980a 100644 --- a/components/style/properties/longhand/position.mako.rs +++ b/components/style/properties/longhand/position.mako.rs @@ -158,6 +158,7 @@ ${helpers.predefined_type("flex-basis", "computed::LengthOrPercentageOrAuto::Auto", "parse_non_negative", spec=spec % size, + allow_quirks=not logical, animation_value_type="ComputedValue", logical = logical)} % if product == "gecko": % for min_max in ["min", "max"]: diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs index 6a66e658aef0..2581db7290db 100644 --- a/components/style/values/specified/length.rs +++ b/components/style/values/specified/length.rs @@ -1360,7 +1360,16 @@ impl LengthOrPercentageOrAuto { /// Parse a non-negative length, percentage, or auto. #[inline] pub fn parse_non_negative(context: &ParserContext, input: &mut Parser) -> Result { - Self::parse_internal(context, input, AllowedLengthType::NonNegative, AllowQuirks::No) + Self::parse_non_negative_quirky(context, input, AllowQuirks::No) + } + + /// Parse a non-negative length, percentage, or auto. + #[inline] + pub fn parse_non_negative_quirky(context: &ParserContext, + input: &mut Parser, + allow_quirks: AllowQuirks) + -> Result { + Self::parse_internal(context, input, AllowedLengthType::NonNegative, allow_quirks) } /// Returns the `auto` value. diff --git a/tests/wpt/metadata/quirks-mode/unitless-length.html.ini b/tests/wpt/metadata/quirks-mode/unitless-length.html.ini index 95010cb9d615..385892d38e5e 100644 --- a/tests/wpt/metadata/quirks-mode/unitless-length.html.ini +++ b/tests/wpt/metadata/quirks-mode/unitless-length.html.ini @@ -12,9 +12,6 @@ expected: if os == "mac": FAIL - [height: 1 (quirks)] - expected: FAIL - [letter-spacing: 1 (quirks)] expected: FAIL @@ -75,9 +72,6 @@ [vertical-align: 1 (quirks)] expected: FAIL - [width: 1 (quirks)] - expected: FAIL - [word-spacing: 1 (quirks)] expected: FAIL @@ -93,9 +87,6 @@ expected: if os == "mac": FAIL - [height: +1 (quirks)] - expected: FAIL - [letter-spacing: +1 (quirks)] expected: FAIL @@ -156,9 +147,6 @@ [vertical-align: +1 (quirks)] expected: FAIL - [width: +1 (quirks)] - expected: FAIL - [word-spacing: +1 (quirks)] expected: FAIL @@ -225,9 +213,6 @@ expected: if os == "mac": FAIL - [height: 1.5 (quirks)] - expected: FAIL - [letter-spacing: 1.5 (quirks)] expected: FAIL @@ -288,9 +273,6 @@ [vertical-align: 1.5 (quirks)] expected: FAIL - [width: 1.5 (quirks)] - expected: FAIL - [word-spacing: 1.5 (quirks)] expected: FAIL @@ -306,9 +288,6 @@ expected: if os == "mac": FAIL - [height: +1.5 (quirks)] - expected: FAIL - [letter-spacing: +1.5 (quirks)] expected: FAIL @@ -369,9 +348,6 @@ [vertical-align: +1.5 (quirks)] expected: FAIL - [width: +1.5 (quirks)] - expected: FAIL - [word-spacing: +1.5 (quirks)] expected: FAIL