Skip to content

Commit

Permalink
Implement the unitless length quirk for word-spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Apr 27, 2017
1 parent 59a7819 commit d53eb77
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 @@ -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 {
Expand Down Expand Up @@ -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)
}
}
Expand Down
18 changes: 0 additions & 18 deletions tests/wpt/metadata/quirks-mode/unitless-length.html.ini
Expand Up @@ -24,9 +24,6 @@
expected:
if os == "mac": FAIL

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

[bottom: +1 (quirks)]
expected:
if os == "mac": FAIL
Expand All @@ -51,9 +48,6 @@
expected:
if os == "mac": FAIL

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

[bottom: -1 (quirks)]
expected:
if os == "mac": FAIL
Expand All @@ -78,9 +72,6 @@
expected:
if os == "mac": FAIL

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

[bottom: 1.5 (quirks)]
expected:
if os == "mac": FAIL
Expand All @@ -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
Expand All @@ -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
Expand All @@ -159,9 +144,6 @@
expected:
if os == "mac": FAIL

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

[bottom: \\31 (quirks)]
expected:
if os == "mac": FAIL
Expand Down

0 comments on commit d53eb77

Please sign in to comment.