Skip to content

Commit

Permalink
Implement the unitless length quirk for vertical-align
Browse files Browse the repository at this point in the history
  • Loading branch information
nox committed Apr 27, 2017
1 parent 16dd554 commit 59a7819
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/box.mako.rs
Expand Up @@ -264,6 +264,7 @@ ${helpers.single_keyword("position", "static absolute relative fixed",
use std::fmt;
use style_traits::ToCss;
use values::HasViewportPercentage;
use values::specified::AllowQuirks;

<% vertical_align = data.longhands_by_name["vertical-align"] %>
<% vertical_align.keyword = Keyword("vertical-align",
Expand Down Expand Up @@ -306,7 +307,7 @@ ${helpers.single_keyword("position", "static absolute relative fixed",
/// baseline | sub | super | top | text-top | middle | bottom | text-bottom
/// | <percentage> | <length>
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
input.try(|i| specified::LengthOrPercentage::parse(context, i))
input.try(|i| specified::LengthOrPercentage::parse_quirky(context, i, AllowQuirks::Yes))
.map(SpecifiedValue::LengthOrPercentage)
.or_else(|_| {
match_ignore_ascii_case! { &try!(input.expect_ident()),
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

[vertical-align: 1 (quirks)]
expected: FAIL

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

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

[vertical-align: +1 (quirks)]
expected: FAIL

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

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

[vertical-align: -1 (quirks)]
expected: FAIL

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

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

[vertical-align: 1.5 (quirks)]
expected: FAIL

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

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

[vertical-align: +1.5 (quirks)]
expected: FAIL

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

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

[vertical-align: -1.5 (quirks)]
expected: FAIL

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

Expand Down

0 comments on commit 59a7819

Please sign in to comment.