Skip to content

Commit

Permalink
Implement the unitless length quirk for letter-spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Apr 27, 2017
1 parent 65f74ea commit 72186c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
3 changes: 2 additions & 1 deletion components/style/properties/longhand/inherited_text.mako.rs
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
}
</%helpers:longhand>
Expand Down
18 changes: 0 additions & 18 deletions tests/wpt/metadata/quirks-mode/unitless-length.html.ini
Expand Up @@ -12,9 +12,6 @@
expected:
if os == "mac": FAIL

[letter-spacing: 1 (quirks)]
expected: FAIL

[margin-left: 1 (quirks)]
expected: FAIL

Expand Down Expand Up @@ -87,9 +84,6 @@
expected:
if os == "mac": FAIL

[letter-spacing: +1 (quirks)]
expected: FAIL

[margin-left: +1 (quirks)]
expected: FAIL

Expand Down Expand Up @@ -162,9 +156,6 @@
expected:
if os == "mac": FAIL

[letter-spacing: -1 (quirks)]
expected: FAIL

[margin-left: -1 (quirks)]
expected: FAIL

Expand Down Expand Up @@ -213,9 +204,6 @@
expected:
if os == "mac": FAIL

[letter-spacing: 1.5 (quirks)]
expected: FAIL

[margin-left: 1.5 (quirks)]
expected: FAIL

Expand Down Expand Up @@ -288,9 +276,6 @@
expected:
if os == "mac": FAIL

[letter-spacing: +1.5 (quirks)]
expected: FAIL

[margin-left: +1.5 (quirks)]
expected: FAIL

Expand Down Expand Up @@ -363,9 +348,6 @@
expected:
if os == "mac": FAIL

[letter-spacing: -1.5 (quirks)]
expected: FAIL

[margin-left: -1.5 (quirks)]
expected: FAIL

Expand Down

0 comments on commit 72186c2

Please sign in to comment.