From d53eb777e1e6c7fec47b9de971def141810d7939 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 25 Apr 2017 09:22:54 +0200 Subject: [PATCH] Implement the unitless length quirk for word-spacing --- .../properties/longhand/inherited_text.mako.rs | 3 ++- .../quirks-mode/unitless-length.html.ini | 18 ------------------ 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/components/style/properties/longhand/inherited_text.mako.rs b/components/style/properties/longhand/inherited_text.mako.rs index 27edd52c0f0c..091b10a8bf53 100644 --- a/components/style/properties/longhand/inherited_text.mako.rs +++ b/components/style/properties/longhand/inherited_text.mako.rs @@ -499,6 +499,7 @@ ${helpers.single_keyword("text-align-last", use std::fmt; use style_traits::ToCss; use values::HasViewportPercentage; + use values::specified::AllowQuirks; impl HasViewportPercentage for SpecifiedValue { fn has_viewport_percentage(&self) -> bool { @@ -574,7 +575,7 @@ ${helpers.single_keyword("text-align-last", if input.try(|input| input.expect_ident_matching("normal")).is_ok() { Ok(SpecifiedValue::Normal) } else { - specified::LengthOrPercentage::parse(context, input) + specified::LengthOrPercentage::parse_quirky(context, input, AllowQuirks::Yes) .map(SpecifiedValue::Specified) } } diff --git a/tests/wpt/metadata/quirks-mode/unitless-length.html.ini b/tests/wpt/metadata/quirks-mode/unitless-length.html.ini index 701b162c251a..307046ccfdff 100644 --- a/tests/wpt/metadata/quirks-mode/unitless-length.html.ini +++ b/tests/wpt/metadata/quirks-mode/unitless-length.html.ini @@ -24,9 +24,6 @@ expected: if os == "mac": FAIL - [word-spacing: 1 (quirks)] - expected: FAIL - [bottom: +1 (quirks)] expected: if os == "mac": FAIL @@ -51,9 +48,6 @@ expected: if os == "mac": FAIL - [word-spacing: +1 (quirks)] - expected: FAIL - [bottom: -1 (quirks)] expected: if os == "mac": FAIL @@ -78,9 +72,6 @@ expected: if os == "mac": FAIL - [word-spacing: -1 (quirks)] - expected: FAIL - [bottom: 1.5 (quirks)] expected: if os == "mac": FAIL @@ -105,9 +96,6 @@ expected: if os == "mac": FAIL - [word-spacing: 1.5 (quirks)] - expected: FAIL - [bottom: +1.5 (quirks)] expected: if os == "mac": FAIL @@ -132,9 +120,6 @@ expected: if os == "mac": FAIL - [word-spacing: +1.5 (quirks)] - expected: FAIL - [bottom: -1.5 (quirks)] expected: if os == "mac": FAIL @@ -159,9 +144,6 @@ expected: if os == "mac": FAIL - [word-spacing: -1.5 (quirks)] - expected: FAIL - [bottom: \\31 (quirks)] expected: if os == "mac": FAIL