mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Implement the unitless length quirk for vertical-align
This commit is contained in:
parent
16dd554534
commit
59a7819aa9
2 changed files with 2 additions and 19 deletions
|
@ -264,6 +264,7 @@ ${helpers.single_keyword("position", "static absolute relative fixed",
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use style_traits::ToCss;
|
use style_traits::ToCss;
|
||||||
use values::HasViewportPercentage;
|
use values::HasViewportPercentage;
|
||||||
|
use values::specified::AllowQuirks;
|
||||||
|
|
||||||
<% vertical_align = data.longhands_by_name["vertical-align"] %>
|
<% vertical_align = data.longhands_by_name["vertical-align"] %>
|
||||||
<% vertical_align.keyword = Keyword("vertical-align",
|
<% vertical_align.keyword = Keyword("vertical-align",
|
||||||
|
@ -306,7 +307,7 @@ ${helpers.single_keyword("position", "static absolute relative fixed",
|
||||||
/// baseline | sub | super | top | text-top | middle | bottom | text-bottom
|
/// baseline | sub | super | top | text-top | middle | bottom | text-bottom
|
||||||
/// | <percentage> | <length>
|
/// | <percentage> | <length>
|
||||||
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
|
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)
|
.map(SpecifiedValue::LengthOrPercentage)
|
||||||
.or_else(|_| {
|
.or_else(|_| {
|
||||||
match_ignore_ascii_case! { &try!(input.expect_ident()),
|
match_ignore_ascii_case! { &try!(input.expect_ident()),
|
||||||
|
|
|
@ -24,9 +24,6 @@
|
||||||
expected:
|
expected:
|
||||||
if os == "mac": FAIL
|
if os == "mac": FAIL
|
||||||
|
|
||||||
[vertical-align: 1 (quirks)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[word-spacing: 1 (quirks)]
|
[word-spacing: 1 (quirks)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -54,9 +51,6 @@
|
||||||
expected:
|
expected:
|
||||||
if os == "mac": FAIL
|
if os == "mac": FAIL
|
||||||
|
|
||||||
[vertical-align: +1 (quirks)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[word-spacing: +1 (quirks)]
|
[word-spacing: +1 (quirks)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -84,9 +78,6 @@
|
||||||
expected:
|
expected:
|
||||||
if os == "mac": FAIL
|
if os == "mac": FAIL
|
||||||
|
|
||||||
[vertical-align: -1 (quirks)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[word-spacing: -1 (quirks)]
|
[word-spacing: -1 (quirks)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -114,9 +105,6 @@
|
||||||
expected:
|
expected:
|
||||||
if os == "mac": FAIL
|
if os == "mac": FAIL
|
||||||
|
|
||||||
[vertical-align: 1.5 (quirks)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[word-spacing: 1.5 (quirks)]
|
[word-spacing: 1.5 (quirks)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -144,9 +132,6 @@
|
||||||
expected:
|
expected:
|
||||||
if os == "mac": FAIL
|
if os == "mac": FAIL
|
||||||
|
|
||||||
[vertical-align: +1.5 (quirks)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[word-spacing: +1.5 (quirks)]
|
[word-spacing: +1.5 (quirks)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -174,9 +159,6 @@
|
||||||
expected:
|
expected:
|
||||||
if os == "mac": FAIL
|
if os == "mac": FAIL
|
||||||
|
|
||||||
[vertical-align: -1.5 (quirks)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[word-spacing: -1.5 (quirks)]
|
[word-spacing: -1.5 (quirks)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue