aboutsummaryrefslogtreecommitdiffstats
path: root/components/style
diff options
context:
space:
mode:
authorHuxley <framlog@gmail.com>2017-02-17 14:29:07 +0800
committerHuxley <framlog@gmail.com>2017-02-19 22:59:51 +0800
commit06650f8428f4ef7ec8477b8ec234d85b8c84c189 (patch)
treec57f86fcdee6cf518235204fb4d204cfb39e0b30 /components/style
parent11396b4dd3834d6794bd4e32f30c1df96fc6a01d (diff)
downloadservo-06650f8428f4ef7ec8477b8ec234d85b8c84c189.tar.gz
servo-06650f8428f4ef7ec8477b8ec234d85b8c84c189.zip
fixed the wrong behavior of border-spacing
Diffstat (limited to 'components/style')
-rw-r--r--components/style/properties/longhand/inherited_table.mako.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/components/style/properties/longhand/inherited_table.mako.rs b/components/style/properties/longhand/inherited_table.mako.rs
index 21930ed0114..c80fe9779fe 100644
--- a/components/style/properties/longhand/inherited_table.mako.rs
+++ b/components/style/properties/longhand/inherited_table.mako.rs
@@ -113,15 +113,11 @@ ${helpers.single_keyword("caption-side", "top bottom",
Err(()) => (),
Ok(length) => {
first = Some(length);
- match specified::Length::parse_non_negative(input) {
- Err(()) => (),
- Ok(length) => second = Some(length),
+ if let Ok(len) = input.try(|input| specified::Length::parse_non_negative(input)) {
+ second = Some(len);
}
}
}
- if input.next().is_ok() {
- return Err(())
- }
match (first, second) {
(None, None) => Err(()),
(Some(length), None) => {