aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/canvas_traits/Cargo.toml2
-rw-r--r--components/layout/Cargo.toml2
-rw-r--r--components/msg/Cargo.toml2
-rw-r--r--components/script/Cargo.toml2
-rw-r--r--components/servo/Cargo.lock34
-rw-r--r--components/style/Cargo.toml2
-rw-r--r--components/style/font_face.rs2
-rw-r--r--components/style/lib.rs2
-rw-r--r--components/style/media_queries.rs4
-rw-r--r--components/style/properties.mako.rs61
-rw-r--r--components/style/stylesheets.rs4
-rw-r--r--components/style/values.rs16
-rw-r--r--components/style_traits/Cargo.toml2
-rw-r--r--components/style_traits/values.rs2
-rw-r--r--components/util/Cargo.toml4
-rw-r--r--components/util/cursor.rs2
16 files changed, 61 insertions, 82 deletions
diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml
index 2ab3a3da631..12964b8f66b 100644
--- a/components/canvas_traits/Cargo.toml
+++ b/components/canvas_traits/Cargo.toml
@@ -35,7 +35,7 @@ path = "../plugins"
path = "../util"
[dependencies]
-cssparser = { version = "0.4", features = [ "serde-serialization" ] }
+cssparser = { version = "0.5", features = [ "serde-serialization" ] }
euclid = {version = "0.4", features = ["plugins"]}
serde_macros = "0.6"
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml
index 34926c41c2f..fb006dd59ac 100644
--- a/components/layout/Cargo.toml
+++ b/components/layout/Cargo.toml
@@ -55,7 +55,7 @@ git = "https://github.com/servo/ipc-channel"
[dependencies]
app_units = {version = "0.1", features = ["plugins"]}
-cssparser = { version = "0.4", features = [ "serde-serialization" ] }
+cssparser = { version = "0.5", features = [ "serde-serialization" ] }
log = "0.3"
fnv = "1.0"
bitflags = "0.3"
diff --git a/components/msg/Cargo.toml b/components/msg/Cargo.toml
index 7a2cbfd61e0..bb14b3aa065 100644
--- a/components/msg/Cargo.toml
+++ b/components/msg/Cargo.toml
@@ -21,7 +21,7 @@ git = "https://github.com/servo/ipc-channel"
path = "../plugins"
[dependencies]
-cssparser = { version = "0.4", features = [ "serde-serialization" ] }
+cssparser = { version = "0.5", features = [ "serde-serialization" ] }
bitflags = "0.3"
hyper = { version = "0.7", features = [ "serde-serialization" ] }
rustc-serialize = "0.3.4"
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index e72e8925f89..0a1c5f9b6b9 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -64,7 +64,7 @@ path = "../gfx_traits"
[dependencies]
app_units = {version = "0.1", features = ["plugins"]}
-cssparser = { version = "0.4", features = [ "serde-serialization" ] }
+cssparser = { version = "0.5", features = [ "serde-serialization" ] }
log = "0.3"
encoding = "0.2"
fnv = "1.0"
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index 13b74a9de9c..240d485bd7b 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -163,7 +163,7 @@ name = "canvas_traits"
version = "0.0.1"
dependencies = [
"azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1",
"ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
@@ -328,7 +328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cssparser"
-version = "0.4.0"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -947,7 +947,7 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
- "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
@@ -963,7 +963,7 @@ dependencies = [
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"script 0.0.1",
"script_traits 0.0.1",
- "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1130,7 +1130,7 @@ name = "msg"
version = "0.0.1"
dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.1.0 (git+https://github.com/servo/ipc-channel)",
@@ -1509,7 +1509,7 @@ dependencies = [
"canvas 0.0.1",
"canvas_traits 0.0.1",
"caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1532,7 +1532,7 @@ dependencies = [
"ref_slice 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"script_traits 0.0.1",
- "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1582,11 +1582,11 @@ dependencies = [
[[package]]
name = "selectors"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quickersort 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1775,7 +1775,7 @@ version = "0.0.1"
dependencies = [
"app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1785,7 +1785,7 @@ dependencies = [
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1801,11 +1801,11 @@ name = "style_tests"
version = "0.0.1"
dependencies = [
"app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
"plugins 0.0.1",
- "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1",
"style_traits 0.0.1",
@@ -1817,14 +1817,14 @@ dependencies = [
name = "style_traits"
version = "0.0.1"
dependencies = [
- "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
"plugins 0.0.1",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1954,7 +1954,7 @@ dependencies = [
"app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.2.1 (git+https://github.com/servo/rust-azure)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1970,7 +1970,7 @@ dependencies = [
"plugins 0.0.1",
"rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "selectors 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "selectors 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml
index d44f27588ae..0fa4d69caa4 100644
--- a/components/style/Cargo.toml
+++ b/components/style/Cargo.toml
@@ -20,7 +20,7 @@ path = "../style_traits"
[dependencies]
app_units = {version = "0.1", features = ["plugins"]}
-cssparser = { version = "0.4", features = [ "serde-serialization" ] }
+cssparser = { version = "0.5", features = [ "serde-serialization" ] }
log = "0.3"
encoding = "0.2"
fnv = "1.0"
diff --git a/components/style/font_face.rs b/components/style/font_face.rs
index decb564676a..d42e0feb3e9 100644
--- a/components/style/font_face.rs
+++ b/components/style/font_face.rs
@@ -91,7 +91,7 @@ impl<'a, 'b> DeclarationParser for FontFaceRuleParser<'a, 'b> {
Ok(FontFaceDescriptorDeclaration::Src(try!(input.parse_comma_separated(|input| {
parse_one_src(self.context, input)
}))))
- }
+ },
_ => Err(())
}
}
diff --git a/components/style/lib.rs b/components/style/lib.rs
index dd95d954c68..f9e26d670c0 100644
--- a/components/style/lib.rs
+++ b/components/style/lib.rs
@@ -15,6 +15,8 @@
#![plugin(serde_macros)]
#![plugin(plugins)]
+#![recursion_limit = "500"] // For match_ignore_ascii_case in PropertyDeclaration::parse
+
extern crate app_units;
#[macro_use]
extern crate bitflags;
diff --git a/components/style/media_queries.rs b/components/style/media_queries.rs
index 066fc76528d..82b02cc9701 100644
--- a/components/style/media_queries.rs
+++ b/components/style/media_queries.rs
@@ -133,7 +133,7 @@ impl Expression {
},
"max-width" => {
Ok(Expression::Width(Range::Max(try!(specified::Length::parse_non_negative(input)))))
- }
+ },
_ => Err(())
}
})
@@ -157,7 +157,7 @@ impl MediaQuery {
media_type = match_ignore_ascii_case! { ident,
"screen" => MediaQueryType::MediaType(MediaType::Screen),
"print" => MediaQueryType::MediaType(MediaType::Print),
- "all" => MediaQueryType::All
+ "all" => MediaQueryType::All,
_ => MediaQueryType::MediaType(MediaType::Unknown)
}
} else {
diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs
index b3dc4fa70ce..ac6722b6321 100644
--- a/components/style/properties.mako.rs
+++ b/components/style/properties.mako.rs
@@ -478,7 +478,7 @@ pub mod longhands {
pub fn parse(_context: &ParserContext, input: &mut Parser)
-> Result<SpecifiedValue, ()> {
match_ignore_ascii_case! { try!(input.expect_ident()),
- % for value in values[:-1]:
+ % for value in values:
"${value}" => {
% if value in experimental_values:
if !::util::prefs::get_pref("layout.${value}.enabled")
@@ -489,17 +489,6 @@ pub mod longhands {
Ok(computed_value::T::${to_rust_ident(value)})
},
% endfor
- % for value in values[-1:]:
- "${value}" => {
- % if value in experimental_values:
- if !::util::prefs::get_pref("layout.${value}.enabled")
- .as_boolean().unwrap_or(false) {
- return Err(())
- }
- % endif
- Ok(computed_value::T::${to_rust_ident(value)})
- }
- % endfor
_ => Err(())
}
}
@@ -797,14 +786,9 @@ pub mod longhands {
.map(SpecifiedValue::LengthOrPercentage)
.or_else(|()| {
match_ignore_ascii_case! { try!(input.expect_ident()),
- % for keyword in vertical_align_keywords[:-1]:
+ % for keyword in vertical_align_keywords:
"${keyword}" => Ok(SpecifiedValue::${to_rust_ident(keyword)}),
% endfor
-
- // Hack to work around quirks of macro_rules parsing in match_ignore_ascii_case!
- % for keyword in vertical_align_keywords[-1:]:
- "${keyword}" => Ok(SpecifiedValue::${to_rust_ident(keyword)})
- % endfor
_ => Err(())
}
})
@@ -1075,7 +1059,7 @@ pub mod longhands {
list_style_type::parse(context, input)
}).unwrap_or(list_style_type::computed_value::T::decimal);
Ok(ContentItem::Counters(name, separator, style))
- })
+ }),
_ => return Err(())
}));
}
@@ -1084,7 +1068,7 @@ pub mod longhands {
"open-quote" => content.push(ContentItem::OpenQuote),
"close-quote" => content.push(ContentItem::CloseQuote),
"no-open-quote" => content.push(ContentItem::NoOpenQuote),
- "no-close-quote" => content.push(ContentItem::NoCloseQuote)
+ "no-close-quote" => content.push(ContentItem::NoCloseQuote),
_ => return Err(())
}
}
@@ -1746,7 +1730,7 @@ pub mod longhands {
super::SANS_SERIF => Some(FontFamily::SansSerif),
super::CURSIVE => Some(FontFamily::Cursive),
super::FANTASY => Some(FontFamily::Fantasy),
- super::MONOSPACE => Some(FontFamily::Monospace)
+ super::MONOSPACE => Some(FontFamily::Monospace),
_ => None
};
@@ -1797,7 +1781,7 @@ pub mod longhands {
SANS_SERIF => return Ok(FontFamily::SansSerif),
CURSIVE => return Ok(FontFamily::Cursive),
FANTASY => return Ok(FontFamily::Fantasy),
- MONOSPACE => return Ok(FontFamily::Monospace)
+ MONOSPACE => return Ok(FontFamily::Monospace),
_ => {}
}
let mut value = first_ident.into_owned();
@@ -1845,7 +1829,7 @@ pub mod longhands {
"bold" => Ok(SpecifiedValue::Weight700),
"normal" => Ok(SpecifiedValue::Weight400),
"bolder" => Ok(SpecifiedValue::Bolder),
- "lighter" => Ok(SpecifiedValue::Lighter)
+ "lighter" => Ok(SpecifiedValue::Lighter),
_ => Err(())
}
}).or_else(|()| {
@@ -2251,7 +2235,7 @@ pub mod longhands {
"line-through" => if result.line_through { return Err(()) }
else { empty = false; result.line_through = true },
"blink" => if blink { return Err(()) }
- else { empty = false; blink = true }
+ else { empty = false; blink = true },
_ => break
}
}
@@ -3549,7 +3533,7 @@ pub mod longhands {
"invert" => parse_factor(input).map(SpecifiedFilter::Invert),
"opacity" => parse_factor(input).map(SpecifiedFilter::Opacity),
"saturate" => parse_factor(input).map(SpecifiedFilter::Saturate),
- "sepia" => parse_factor(input).map(SpecifiedFilter::Sepia)
+ "sepia" => parse_factor(input).map(SpecifiedFilter::Sepia),
_ => Err(())
}
})));
@@ -3996,7 +3980,7 @@ pub mod longhands {
result.push(SpecifiedOperation::Perspective(d));
Ok(())
}))
- }
+ },
_ => return Err(())
}
}
@@ -4098,7 +4082,7 @@ pub mod longhands {
} else {
return Err(())
}
- }
+ },
_ => return Err(())
}
Ok(())
@@ -4335,7 +4319,7 @@ pub mod longhands {
"optimizespeed" => Ok(computed_value::T::Auto),
"optimizequality" => Ok(computed_value::T::Auto),
"crisp-edges" => Ok(computed_value::T::CrispEdges),
- "pixelated" => Ok(computed_value::T::Pixelated)
+ "pixelated" => Ok(computed_value::T::Pixelated),
_ => Err(())
}
}
@@ -4584,13 +4568,13 @@ pub mod longhands {
start_end = try!(match_ignore_ascii_case! {
try!(input.expect_ident()),
"start" => Ok(computed_value::StartEnd::Start),
- "end" => Ok(computed_value::StartEnd::End)
+ "end" => Ok(computed_value::StartEnd::End),
_ => Err(())
});
Ok(())
}));
Ok(TransitionTimingFunction::Steps(step_count as u32, start_end))
- }
+ },
_ => Err(())
}
}
@@ -4602,7 +4586,7 @@ pub mod longhands {
"ease-out" => Ok(EASE_OUT),
"ease-in-out" => Ok(EASE_IN_OUT),
"step-start" => Ok(STEP_START),
- "step-end" => Ok(STEP_END)
+ "step-end" => Ok(STEP_END),
_ => Err(())
}
}
@@ -4849,7 +4833,7 @@ pub mod longhands {
"visibility" => Ok(TransitionProperty::Visibility),
"width" => Ok(TransitionProperty::Width),
"word-spacing" => Ok(TransitionProperty::WordSpacing),
- "z-index" => Ok(TransitionProperty::ZIndex)
+ "z-index" => Ok(TransitionProperty::ZIndex),
_ => Err(())
}
}
@@ -5847,7 +5831,7 @@ impl CSSWideKeyword {
match_ignore_ascii_case! { try!(input.expect_ident()),
"initial" => Ok(CSSWideKeyword::InitialKeyword),
"inherit" => Ok(CSSWideKeyword::InheritKeyword),
- "unset" => Ok(CSSWideKeyword::UnsetKeyword)
+ "unset" => Ok(CSSWideKeyword::UnsetKeyword),
_ => Err(())
}
}
@@ -5863,12 +5847,9 @@ pub enum Shorthand {
impl Shorthand {
pub fn from_name(name: &str) -> Option<Shorthand> {
match_ignore_ascii_case! { name,
- % for property in SHORTHANDS[:-1]:
+ % for property in SHORTHANDS:
"${property.name}" => Some(Shorthand::${property.camel_case}),
% endfor
- % for property in SHORTHANDS[-1:]:
- "${property.name}" => Some(Shorthand::${property.camel_case})
- % endfor
_ => None
}
}
@@ -6128,9 +6109,6 @@ impl PropertyDeclaration {
},
% endfor
- // Hack to work around quirks of macro_rules parsing in match_ignore_ascii_case!
- "_nonexistent" => PropertyDeclarationParseResult::UnknownProperty
-
_ => PropertyDeclarationParseResult::UnknownProperty
}
}
@@ -7011,10 +6989,9 @@ pub fn modify_style_for_inline_absolute_hypothetical_fragment(style: &mut Arc<Co
pub fn is_supported_property(property: &str) -> bool {
match_ignore_ascii_case! { property,
- % for property in SHORTHANDS + LONGHANDS[:-1]:
+ % for property in SHORTHANDS + LONGHANDS:
"${property.name}" => true,
% endfor
- "${LONGHANDS[-1].name}" => true
_ => property.starts_with("--")
}
}
diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs
index cfe932fc505..d8121b2fa6c 100644
--- a/components/style/stylesheets.rs
+++ b/components/style/stylesheets.rs
@@ -392,7 +392,7 @@ impl<'a> AtRuleParser for TopLevelRuleParser<'a> {
} else {
return Err(()) // "@namespace must be before any rule but @charset and @import"
}
- }
+ },
_ => {}
}
@@ -450,7 +450,7 @@ impl<'a, 'b> AtRuleParser for NestedRuleParser<'a, 'b> {
} else {
Err(())
}
- }
+ },
_ => Err(())
}
}
diff --git a/components/style/values.rs b/components/style/values.rs
index 6827e0ea242..ac794e10fb3 100644
--- a/components/style/values.rs
+++ b/components/style/values.rs
@@ -50,7 +50,7 @@ macro_rules! define_numbered_css_keyword_enum {
impl $name {
pub fn parse(input: &mut ::cssparser::Parser) -> Result<$name, ()> {
match_ignore_ascii_case! { try!(input.expect_ident()),
- $( $css => Ok($name::$variant) ),+
+ $( $css => Ok($name::$variant), )+
_ => Err(())
}
}
@@ -332,7 +332,7 @@ pub mod specified {
// https://github.com/servo/servo/issues/3423#issuecomment-56321664
"smaller" => Length::FontRelative(FontRelativeLength::Em(0.85)),
- "larger" => Length::FontRelative(FontRelativeLength::Em(1.2))
+ "larger" => Length::FontRelative(FontRelativeLength::Em(1.2)),
_ => return None
})
}
@@ -373,7 +373,7 @@ pub mod specified {
"vw" => Ok(Length::ViewportPercentage(ViewportPercentageLength::Vw(value))),
"vh" => Ok(Length::ViewportPercentage(ViewportPercentageLength::Vh(value))),
"vmin" => Ok(Length::ViewportPercentage(ViewportPercentageLength::Vmin(value))),
- "vmax" => Ok(Length::ViewportPercentage(ViewportPercentageLength::Vmax(value)))
+ "vmax" => Ok(Length::ViewportPercentage(ViewportPercentageLength::Vmax(value))),
_ => Err(())
}
}
@@ -1106,7 +1106,7 @@ pub mod specified {
"left" => Ok(PositionComponent::Left),
"right" => Ok(PositionComponent::Right),
"top" => Ok(PositionComponent::Top),
- "bottom" => Ok(PositionComponent::Bottom)
+ "bottom" => Ok(PositionComponent::Bottom),
_ => Err(())
}
},
@@ -1166,7 +1166,7 @@ pub mod specified {
"deg" => Ok(Angle(value * RAD_PER_DEG)),
"grad" => Ok(Angle(value * RAD_PER_GRAD)),
"turn" => Ok(Angle(value * RAD_PER_TURN)),
- "rad" => Ok(Angle(value))
+ "rad" => Ok(Angle(value)),
_ => Err(())
}
}
@@ -1202,7 +1202,7 @@ pub mod specified {
"linear-gradient" => {
Ok(Image::LinearGradient(try!(
input.parse_nested_block(LinearGradient::parse_function))))
- }
+ },
_ => Err(())
}
}
@@ -1345,7 +1345,7 @@ pub mod specified {
LengthOrPercentage::Length(Length::from_px(3.)))),
"thick" =>
Ok(BorderRadiusSize::circle(
- LengthOrPercentage::Length(Length::from_px(5.))))
+ LengthOrPercentage::Length(Length::from_px(5.)))),
_ => Err(())
}
})
@@ -1356,7 +1356,7 @@ pub mod specified {
match_ignore_ascii_case! { try!(input.expect_ident()),
"thin" => Ok(Length::from_px(1.)),
"medium" => Ok(Length::from_px(3.)),
- "thick" => Ok(Length::from_px(5.))
+ "thick" => Ok(Length::from_px(5.)),
_ => Err(())
}
})
diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml
index 760bd97a844..0fca4738abe 100644
--- a/components/style_traits/Cargo.toml
+++ b/components/style_traits/Cargo.toml
@@ -14,7 +14,7 @@ path = "../util"
path = "../plugins"
[dependencies]
-cssparser = { version = "0.4", features = [ "serde-serialization" ] }
+cssparser = { version = "0.5", features = [ "serde-serialization" ] }
euclid = {version = "0.4", features = ["plugins"]}
log = "0.3"
lazy_static = "0.1.10"
diff --git a/components/style_traits/values.rs b/components/style_traits/values.rs
index 6bca2601502..5b9226f324e 100644
--- a/components/style_traits/values.rs
+++ b/components/style_traits/values.rs
@@ -18,7 +18,7 @@ macro_rules! define_css_keyword_enum {
impl $name {
pub fn parse(input: &mut ::cssparser::Parser) -> Result<$name, ()> {
match_ignore_ascii_case! { try!(input.expect_ident()),
- $( $css => Ok($name::$variant) ),+
+ $( $css => Ok($name::$variant), )+
_ => Err(())
}
}
diff --git a/components/util/Cargo.toml b/components/util/Cargo.toml
index 4dbe032de5b..3c6dfc3a26a 100644
--- a/components/util/Cargo.toml
+++ b/components/util/Cargo.toml
@@ -46,7 +46,7 @@ git = "https://github.com/servo/ipc-channel"
[dependencies]
app_units = {version = "0.1", features = ["plugins"]}
-cssparser = { version = "0.4", features = [ "serde-serialization" ] }
+cssparser = { version = "0.5", features = [ "serde-serialization" ] }
log = "0.3"
bitflags = "0.3"
html5ever = { version = "0.2.1", features = ["unstable"], optional = true }
@@ -57,7 +57,7 @@ smallvec = "0.1"
num_cpus = "0.2.2"
num = "0.1.24"
euclid = {version = "0.4", features = ["plugins"]}
-selectors = "0.2"
+selectors = "0.2.3"
serde = "0.6"
serde_macros = "0.6"
string_cache = "0.2"
diff --git a/components/util/cursor.rs b/components/util/cursor.rs
index bda254861e2..fa7ceb413c6 100644
--- a/components/util/cursor.rs
+++ b/components/util/cursor.rs
@@ -18,7 +18,7 @@ macro_rules! define_cursor {
impl Cursor {
pub fn from_css_keyword(keyword: &str) -> Result<Cursor, ()> {
match_ignore_ascii_case! { keyword,
- $( concat!($css) => Ok(Cursor::$variant) ),+
+ $( concat!($css) => Ok(Cursor::$variant), )+
_ => Err(())
}
}