From 72186c200c358f60acc122dae24f24da3b232d33 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 24 Apr 2017 17:47:56 +0200 Subject: [PATCH] Implement the unitless length quirk for letter-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 57385c982179..779bb9532f5b 100644 --- a/components/style/properties/longhand/inherited_text.mako.rs +++ b/components/style/properties/longhand/inherited_text.mako.rs @@ -411,6 +411,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 { @@ -487,7 +488,7 @@ ${helpers.single_keyword("text-align-last", if input.try(|input| input.expect_ident_matching("normal")).is_ok() { Ok(SpecifiedValue::Normal) } else { - specified::Length::parse(context, input).map(SpecifiedValue::Specified) + specified::Length::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 385892d38e5e..a584a4c7e625 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 - [letter-spacing: 1 (quirks)] - expected: FAIL - [margin-left: 1 (quirks)] expected: FAIL @@ -87,9 +84,6 @@ expected: if os == "mac": FAIL - [letter-spacing: +1 (quirks)] - expected: FAIL - [margin-left: +1 (quirks)] expected: FAIL @@ -162,9 +156,6 @@ expected: if os == "mac": FAIL - [letter-spacing: -1 (quirks)] - expected: FAIL - [margin-left: -1 (quirks)] expected: FAIL @@ -213,9 +204,6 @@ expected: if os == "mac": FAIL - [letter-spacing: 1.5 (quirks)] - expected: FAIL - [margin-left: 1.5 (quirks)] expected: FAIL @@ -288,9 +276,6 @@ expected: if os == "mac": FAIL - [letter-spacing: +1.5 (quirks)] - expected: FAIL - [margin-left: +1.5 (quirks)] expected: FAIL @@ -363,9 +348,6 @@ expected: if os == "mac": FAIL - [letter-spacing: -1.5 (quirks)] - expected: FAIL - [margin-left: -1.5 (quirks)] expected: FAIL