aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-04-25 09:22:54 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-04-27 10:42:27 +0200
commitd53eb777e1e6c7fec47b9de971def141810d7939 (patch)
treeae50196f3b102468ecc6b7f6466e2d2ab7ee5677
parent59a7819aa9849828f9c59e5a4e11be45a7d1463e (diff)
downloadservo-d53eb777e1e6c7fec47b9de971def141810d7939.tar.gz
servo-d53eb777e1e6c7fec47b9de971def141810d7939.zip
Implement the unitless length quirk for word-spacing
-rw-r--r--components/style/properties/longhand/inherited_text.mako.rs3
-rw-r--r--tests/wpt/metadata/quirks-mode/unitless-length.html.ini18
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 27edd52c0f0..091b10a8bf5 100644
--- a/components/style/properties/longhand/inherited_text.mako.rs
+++ b/components/style/properties/longhand/inherited_text.mako.rs
@@ -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 {
@@ -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)
}
}
diff --git a/tests/wpt/metadata/quirks-mode/unitless-length.html.ini b/tests/wpt/metadata/quirks-mode/unitless-length.html.ini
index 701b162c251..307046ccfdf 100644
--- a/tests/wpt/metadata/quirks-mode/unitless-length.html.ini
+++ b/tests/wpt/metadata/quirks-mode/unitless-length.html.ini
@@ -24,9 +24,6 @@
expected:
if os == "mac": FAIL
- [word-spacing: 1 (quirks)]
- expected: FAIL
-
[bottom: +1 (quirks)]
expected:
if os == "mac": FAIL
@@ -51,9 +48,6 @@
expected:
if os == "mac": FAIL
- [word-spacing: +1 (quirks)]
- expected: FAIL
-
[bottom: -1 (quirks)]
expected:
if os == "mac": FAIL
@@ -78,9 +72,6 @@
expected:
if os == "mac": FAIL
- [word-spacing: -1 (quirks)]
- expected: FAIL
-
[bottom: 1.5 (quirks)]
expected:
if os == "mac": FAIL
@@ -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
@@ -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
@@ -159,9 +144,6 @@
expected:
if os == "mac": FAIL
- [word-spacing: -1.5 (quirks)]
- expected: FAIL
-
[bottom: \\31 (quirks)]
expected:
if os == "mac": FAIL