style: Unbox a bunch of color properties.

This builds on https://github.com/servo/rust-cssparser/pull/118.
This commit is contained in:
Emilio Cobos Álvarez 2017-02-12 15:17:45 +01:00
parent e394334739
commit 0c102e2350
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
37 changed files with 185 additions and 195 deletions

View file

@ -15,7 +15,7 @@ bindgen = ["style/use_bindgen"]
[dependencies]
app_units = "0.3"
atomic_refcell = "0.1"
cssparser = {version = "0.7"}
cssparser = {version = "0.8"}
env_logger = {version = "0.4", default-features = false} # disable `regex` to reduce code size
euclid = "0.10.1"
lazy_static = "0.2"

View file

@ -980,12 +980,12 @@ pub extern "C" fn Servo_DeclarationBlock_AddPresValue(declarations: RawServoDecl
}
LonghandId::Color => {
if let Some(color) = css_value.color_value() {
PropertyDeclaration::Color(DeclaredValue::Value(Box::new(
PropertyDeclaration::Color(DeclaredValue::Value(
specified::CSSRGBA {
parsed: convert_nscolor_to_rgba(color),
authored: None
}
)))
))
} else {
error!("stylo: got unexpected non-integer value for color presentation attribute");
return