From 1785fd66a4a3c2f3d74d26a5cb99ab2e55a2f7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 13 Jul 2017 02:07:36 +0200 Subject: [PATCH] style: Avoid parsing negative padding in the padding shorthand. --- components/style/properties/shorthand/padding.mako.rs | 2 +- tests/wpt/metadata-css/css21_dev/html4/c5510-padn-002.htm.ini | 3 --- tests/wpt/metadata-css/css21_dev/html4/padding-009.htm.ini | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 tests/wpt/metadata-css/css21_dev/html4/c5510-padn-002.htm.ini delete mode 100644 tests/wpt/metadata-css/css21_dev/html4/padding-009.htm.ini diff --git a/components/style/properties/shorthand/padding.mako.rs b/components/style/properties/shorthand/padding.mako.rs index c07a80b1e04..2972fb45259 100644 --- a/components/style/properties/shorthand/padding.mako.rs +++ b/components/style/properties/shorthand/padding.mako.rs @@ -4,6 +4,6 @@ <%namespace name="helpers" file="/helpers.mako.rs" /> -${helpers.four_sides_shorthand("padding", "padding-%s", "specified::LengthOrPercentage::parse", +${helpers.four_sides_shorthand("padding", "padding-%s", "specified::LengthOrPercentage::parse_non_negative", spec="https://drafts.csswg.org/css-box-3/#propdef-padding", allow_quirks=True)} diff --git a/tests/wpt/metadata-css/css21_dev/html4/c5510-padn-002.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/c5510-padn-002.htm.ini deleted file mode 100644 index 2688c52e5da..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/c5510-padn-002.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[c5510-padn-002.htm] - type: reftest - expected: FAIL diff --git a/tests/wpt/metadata-css/css21_dev/html4/padding-009.htm.ini b/tests/wpt/metadata-css/css21_dev/html4/padding-009.htm.ini deleted file mode 100644 index 14a459b2d0e..00000000000 --- a/tests/wpt/metadata-css/css21_dev/html4/padding-009.htm.ini +++ /dev/null @@ -1,3 +0,0 @@ -[padding-009.htm] - type: reftest - expected: FAIL