servo: Merge #15518 - style: Unbox a bunch of color properties (from emilio:color); r=SimonSapin
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 14 Feb 2017 11:43:16 -0800
changeset 343358 b7a288e4586f396e7bab629763ca8aa9877a535e
parent 343357 54654348e033770a291ed3c60fa028abbb376b01
child 343359 e079e2e9b87d362ea0d3f078ffc127bb7f20ee9b
push id31377
push usercbook@mozilla.com
push dateFri, 17 Feb 2017 11:41:48 +0000
treeherdermozilla-central@975ce5d8f7d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersSimonSapin
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #15518 - style: Unbox a bunch of color properties (from emilio:color); r=SimonSapin This builds on https://github.com/servo/rust-cssparser/pull/118. Source-Repo: https://github.com/servo/servo Source-Revision: 357bf3b85a1b548ba012f95a97853b34035c89ab
servo/Cargo.lock
servo/components/canvas/Cargo.toml
servo/components/canvas/canvas_paint_thread.rs
servo/components/canvas_traits/Cargo.toml
servo/components/layout/Cargo.toml
servo/components/layout/display_list_builder.rs
servo/components/layout/table_row.rs
servo/components/msg/Cargo.toml
servo/components/script/Cargo.toml
servo/components/script/dom/canvasgradient.rs
servo/components/script/dom/canvasrenderingcontext2d.rs
servo/components/script/dom/element.rs
servo/components/script_layout_interface/Cargo.toml
servo/components/selectors/Cargo.toml
servo/components/style/Cargo.toml
servo/components/style/attr.rs
servo/components/style/gecko/values.rs
servo/components/style/properties/helpers/animated_properties.mako.rs
servo/components/style/properties/longhand/background.mako.rs
servo/components/style/properties/longhand/border.mako.rs
servo/components/style/properties/longhand/color.mako.rs
servo/components/style/properties/longhand/column.mako.rs
servo/components/style/properties/longhand/inherited_text.mako.rs
servo/components/style/properties/longhand/outline.mako.rs
servo/components/style/properties/longhand/svg.mako.rs
servo/components/style/properties/longhand/text.mako.rs
servo/components/style/properties/shorthand/serialize.mako.rs
servo/components/style/values/specified/mod.rs
servo/components/style_traits/Cargo.toml
servo/ports/geckolib/Cargo.toml
servo/ports/geckolib/glue.rs
servo/tests/unit/style/Cargo.toml
servo/tests/unit/style/animated_properties.rs
servo/tests/unit/style/properties/serialization.rs
servo/tests/unit/style/size_of.rs
servo/tests/unit/style/stylesheets.rs
servo/tests/unit/stylo/Cargo.toml
--- a/servo/Cargo.lock
+++ b/servo/Cargo.lock
@@ -280,33 +280,33 @@ version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "canvas"
 version = "0.0.1"
 dependencies = [
  "azure 0.11.0 (git+https://github.com/servo/rust-azure)",
  "canvas_traits 0.0.1",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
  "offscreen_gl_context 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "servo_config 0.0.1",
  "webrender_traits 0.14.0 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "canvas_traits"
 version = "0.0.1"
 dependencies = [
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender_traits 0.14.0 (git+https://github.com/servo/webrender)",
@@ -538,17 +538,17 @@ source = "registry+https://github.com/ru
 dependencies = [
  "core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "cssparser"
-version = "0.7.4"
+version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "quote 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "syn 0.10.7 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -929,17 +929,17 @@ dependencies = [
 ]
 
 [[package]]
 name = "geckoservo"
 version = "0.0.1"
 dependencies = [
  "app_units 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.18.0",
@@ -1338,17 +1338,17 @@ source = "registry+https://github.com/ru
 [[package]]
 name = "layout"
 version = "0.0.1"
 dependencies = [
  "app_units 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx 0.0.1",
  "gfx_traits 0.0.1",
  "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "html5ever-atoms 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1655,17 +1655,17 @@ dependencies = [
  "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "msg"
 version = "0.0.1"
 dependencies = [
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "plugins 0.0.1",
  "serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender_traits 0.14.0 (git+https://github.com/servo/webrender)",
 ]
 
@@ -2256,17 +2256,17 @@ dependencies = [
  "audio-video-metadata 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bluetooth_traits 0.0.1",
  "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
  "caseless 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "cmake 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "devtools_traits 0.0.1",
  "domobject_derive 0.0.1",
  "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2324,17 +2324,17 @@ dependencies = [
 
 [[package]]
 name = "script_layout_interface"
 version = "0.0.1"
 dependencies = [
  "app_units 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "canvas_traits 0.0.1",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "gfx_traits 0.0.1",
  "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "html5ever-atoms 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2392,17 +2392,17 @@ dependencies = [
  "webvr_traits 0.0.1",
 ]
 
 [[package]]
 name = "selectors"
 version = "0.18.0"
 dependencies = [
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "semver"
 version = "0.1.20"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2745,17 +2745,17 @@ source = "registry+https://github.com/ru
 name = "style"
 version = "0.0.1"
 dependencies = [
  "app_units 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bindgen 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "html5ever-atoms 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -2787,17 +2787,17 @@ dependencies = [
  "walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "style_tests"
 version = "0.0.1"
 dependencies = [
  "app_units 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "html5ever-atoms 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "owning_ref 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "selectors 0.18.0",
@@ -2808,32 +2808,32 @@ dependencies = [
  "style_traits 0.0.1",
 ]
 
 [[package]]
 name = "style_traits"
 version = "0.0.1"
 dependencies = [
  "app_units 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "serde_derive 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "stylo_tests"
 version = "0.0.1"
 dependencies = [
  "app_units 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.10.5 (registry+https://github.com/rust-lang/crates.io-index)",
  "geckoservo 0.0.1",
  "lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "libc 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "parking_lot 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3388,17 +3388,17 @@ dependencies = [
 "checksum color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a475fc4af42d83d28adf72968d9bcfaf035a1a9381642d8e85d8a04957767b0d"
 "checksum compiletest_rs 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f3f344389765ad7bec166f64c1b39ed6dd2b54d81c4c5dd8af789169351d380c"
 "checksum content-blocker 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5893d533bce3cea1f59dd239ae577d4f88e4eccb4bed3b1d9cd51a33b187f7f6"
 "checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626"
 "checksum core-foundation 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f51ce3b8ebe311c56de14231eb57572c15abebd2d32b3bcb99bcdb9c101f5ac3"
 "checksum core-foundation-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "41115a6aa5d3e1e5ef98148373f25971d1fad53818553f216495f9e67e90a624"
 "checksum core-graphics 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b205856aba54bfd36e69a1058f45fbe0d3c37be7375309dcff4a22a2a631fea"
 "checksum core-text 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9703f459a41e622b15ca612dbc5fa4b30b6545a32864a83e0fdc538cfa08969c"
-"checksum cssparser 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d8e562cb0d6ee9d8c367d3801d4dbaa0a0a94807745f710803b4ec4cf723ddd4"
+"checksum cssparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "03414777f8f1b026d920f7f96e4a19d0237456a0485fb6135847b7699c258ec2"
 "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850"
 "checksum dbus 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "94d266a872aaf68b50d02083c429a3686935ab6ab54824290509cdc422673eaf"
 "checksum debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a032eac705ca39214d169f83e3d3da290af06d8d1d344d1baad2fd002dca4b3"
 "checksum deflate 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "24c5f3de3a8e183ab9a169654b652407e5e80bed40986bcca92c2b088b9bfa80"
 "checksum deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1614659040e711785ed8ea24219140654da1729f3ec8a47a9719d041112fe7bf"
 "checksum device 0.0.1 (git+https://github.com/servo/devices)" = "<none>"
 "checksum dtoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0dd841b58510c9618291ffa448da2e4e0f699d984d436122372f446dae62263d"
 "checksum dwmapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07c4c7cc7b396419bc0a4d90371d0cee16cb5053b53647d287c0b728000c41fe"
--- a/servo/components/canvas/Cargo.toml
+++ b/servo/components/canvas/Cargo.toml
@@ -7,17 +7,17 @@ publish = false
 
 [lib]
 name = "canvas"
 path = "lib.rs"
 
 [dependencies]
 azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
 canvas_traits = {path = "../canvas_traits"}
-cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]}
+cssparser = {version = "0.8", features = ["heap_size", "serde-serialization"]}
 euclid = "0.10.1"
 gleam = "0.2.8"
 ipc-channel = "0.5"
 log = "0.3.5"
 num-traits = "0.1.32"
 offscreen_gl_context = "0.5.0"
 plugins = {path = "../plugins"}
 servo_config = {path = "../config"}
--- a/servo/components/canvas/canvas_paint_thread.rs
+++ b/servo/components/canvas/canvas_paint_thread.rs
@@ -1011,14 +1011,14 @@ impl ToAzurePattern for FillOrStrokeStyl
         }
     }
 }
 
 impl ToAzureStyle for RGBA {
     type Target = Color;
 
     fn to_azure_style(self) -> Color {
-        Color::rgba(self.red as AzFloat,
-                    self.green as AzFloat,
-                    self.blue as AzFloat,
-                    self.alpha as AzFloat)
+        Color::rgba(self.red_f32() as AzFloat,
+                    self.green_f32() as AzFloat,
+                    self.blue_f32() as AzFloat,
+                    self.alpha_f32() as AzFloat)
     }
 }
--- a/servo/components/canvas_traits/Cargo.toml
+++ b/servo/components/canvas_traits/Cargo.toml
@@ -5,17 +5,17 @@ authors = ["The Servo Project Developers
 license = "MPL-2.0"
 publish = false
 
 [lib]
 name = "canvas_traits"
 path = "lib.rs"
 
 [dependencies]
-cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]}
+cssparser = {version = "0.8", features = ["heap_size", "serde-serialization"]}
 euclid = "0.10.1"
 heapsize = "0.3.0"
 heapsize_derive = "0.1"
 ipc-channel = "0.5"
 plugins = {path = "../plugins"}
 serde = {version = "0.8", features = ["unstable"]}
 serde_derive = "0.8"
 
--- a/servo/components/layout/Cargo.toml
+++ b/servo/components/layout/Cargo.toml
@@ -9,17 +9,17 @@ publish = false
 name = "layout"
 path = "lib.rs"
 
 [dependencies]
 app_units = "0.3"
 atomic_refcell = "0.1"
 bitflags = "0.7"
 canvas_traits = {path = "../canvas_traits"}
-cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]}
+cssparser = {version = "0.8", features = ["heap_size", "serde-serialization"]}
 euclid = "0.10.1"
 fnv = "1.0"
 gfx = {path = "../gfx"}
 gfx_traits = {path = "../gfx_traits"}
 heapsize = "0.3.0"
 html5ever-atoms = "0.1"
 ipc-channel = "0.5"
 libc = "0.2"
--- a/servo/components/layout/display_list_builder.rs
+++ b/servo/components/layout/display_list_builder.rs
@@ -2183,17 +2183,17 @@ fn shadow_bounds(content_rect: &Rect<Au>
 /// Allows a CSS color to be converted into a graphics color.
 pub trait ToGfxColor {
     /// Converts a CSS color to a graphics color.
     fn to_gfx_color(&self) -> ColorF;
 }
 
 impl ToGfxColor for RGBA {
     fn to_gfx_color(&self) -> ColorF {
-        ColorF::new(self.red, self.green, self.blue, self.alpha)
+        ColorF::new(self.red_f32(), self.green_f32(), self.blue_f32(), self.alpha_f32())
     }
 }
 
 /// Describes how to paint the borders.
 #[derive(Copy, Clone)]
 pub enum BorderPaintingMode<'a> {
     /// Paint borders separately (`border-collapse: separate`).
     Separate,
--- a/servo/components/layout/table_row.rs
+++ b/servo/components/layout/table_row.rs
@@ -602,22 +602,17 @@ pub enum CollapsedBorderProvenance {
 }
 
 impl CollapsedBorder {
     /// Creates a collapsible border style for no border.
     pub fn new() -> CollapsedBorder {
         CollapsedBorder {
             style: border_top_style::T::none,
             width: Au(0),
-            color: Color::RGBA(RGBA {
-                red: 0.0,
-                green: 0.0,
-                blue: 0.0,
-                alpha: 0.0,
-            }),
+            color: Color::RGBA(RGBA::transparent()),
             provenance: CollapsedBorderProvenance::FromTable,
         }
     }
 
     /// Creates a collapsed border from the block-start border described in the given CSS style
     /// object.
     fn top(css_style: &ServoComputedValues, provenance: CollapsedBorderProvenance)
            -> CollapsedBorder {
--- a/servo/components/msg/Cargo.toml
+++ b/servo/components/msg/Cargo.toml
@@ -6,17 +6,17 @@ license = "MPL-2.0"
 publish = false
 
 [lib]
 name = "msg"
 path = "lib.rs"
 
 [dependencies]
 bitflags = "0.7"
-cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]}
+cssparser = {version = "0.8", features = ["heap_size", "serde-serialization"]}
 heapsize = "0.3.0"
 heapsize_derive = "0.1"
 plugins = {path = "../plugins"}
 serde = "0.8"
 serde_derive = "0.8"
 
 [dependencies.webrender_traits]
 git = "https://github.com/servo/webrender"
--- a/servo/components/script/Cargo.toml
+++ b/servo/components/script/Cargo.toml
@@ -29,17 +29,17 @@ app_units = "0.3"
 audio-video-metadata = "0.1.2"
 atomic_refcell = "0.1"
 bitflags = "0.7"
 bluetooth_traits = {path = "../bluetooth_traits"}
 byteorder = "1.0"
 canvas_traits = {path = "../canvas_traits"}
 caseless = "0.1.0"
 cookie = {version = "0.2.5", features = ["serialize-rustc"]}
-cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]}
+cssparser = {version = "0.8", features = ["heap_size", "serde-serialization"]}
 devtools_traits = {path = "../devtools_traits"}
 domobject_derive = {path = "../domobject_derive"}
 encoding = "0.2"
 euclid = "0.10.1"
 fnv = "1.0"
 gfx_traits = {path = "../gfx_traits"}
 heapsize = "0.3.6"
 heapsize_derive = "0.1"
--- a/servo/components/script/dom/canvasgradient.rs
+++ b/servo/components/script/dom/canvasgradient.rs
@@ -52,17 +52,17 @@ impl CanvasGradientMethods for CanvasGra
             return Err(Error::IndexSize);
         }
 
         let mut parser = Parser::new(&color);
         let color = CSSColor::parse(&mut parser);
         let color = if parser.is_exhausted() {
             match color {
                 Ok(CSSColor::RGBA(rgba)) => rgba,
-                Ok(CSSColor::CurrentColor) => RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 },
+                Ok(CSSColor::CurrentColor) => RGBA::new(0, 0, 0, 255),
                 _ => return Err(Error::Syntax)
             }
         } else {
             return Err(Error::Syntax)
         };
 
         self.stops.borrow_mut().push(CanvasGradientStop {
             offset: (*offset) as f64,
--- a/servo/components/script/dom/canvasrenderingcontext2d.rs
+++ b/servo/components/script/dom/canvasrenderingcontext2d.rs
@@ -85,37 +85,32 @@ struct CanvasContextState {
     shadow_offset_x: f64,
     shadow_offset_y: f64,
     shadow_blur: f64,
     shadow_color: RGBA,
 }
 
 impl CanvasContextState {
     fn new() -> CanvasContextState {
-        let black = RGBA {
-            red: 0.0,
-            green: 0.0,
-            blue: 0.0,
-            alpha: 1.0,
-        };
+        let black = RGBA::new(0, 0, 0, 255);
         CanvasContextState {
             global_alpha: 1.0,
             global_composition: CompositionOrBlending::default(),
             image_smoothing_enabled: true,
             fill_style: CanvasFillOrStrokeStyle::Color(black),
             stroke_style: CanvasFillOrStrokeStyle::Color(black),
             line_width: 1.0,
             line_cap: LineCapStyle::Butt,
             line_join: LineJoinStyle::Miter,
             miter_limit: 10.0,
             transform: Matrix2D::identity(),
             shadow_offset_x: 0.0,
             shadow_offset_y: 0.0,
             shadow_blur: 0.0,
-            shadow_color: RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0 }, // transparent black
+            shadow_color: RGBA::transparent(),
         }
     }
 }
 
 impl CanvasRenderingContext2D {
     fn new_inherited(global: &GlobalScope,
                      canvas: &HTMLCanvasElement,
                      size: Size2D<i32>)
@@ -485,22 +480,17 @@ impl CanvasRenderingContext2D {
 
                     let style = window.GetComputedStyle(&*self.canvas.upcast(), None);
 
                     let element_not_rendered =
                         !self.canvas.upcast::<Node>().is_in_doc() ||
                         style.GetPropertyValue(DOMString::from("display")) == "none";
 
                     if element_not_rendered {
-                        Ok(RGBA {
-                            red: 0.0,
-                            green: 0.0,
-                            blue: 0.0,
-                            alpha: 1.0,
-                        })
+                        Ok(RGBA::new(0, 0, 0, 255))
                     } else {
                         self.parse_color(&style.GetPropertyValue(DOMString::from("color")))
                     }
                 },
                 _ => Err(())
             }
         } else {
             Err(())
@@ -1344,25 +1334,25 @@ pub fn parse_color(string: &str) -> Resu
 fn is_rect_valid(rect: Rect<f64>) -> bool {
     rect.size.width > 0.0 && rect.size.height > 0.0
 }
 
 // https://html.spec.whatwg.org/multipage/#serialisation-of-a-colour
 fn serialize<W>(color: &RGBA, dest: &mut W) -> fmt::Result
     where W: fmt::Write
 {
-    let red = (color.red * 255.).round() as u8;
-    let green = (color.green * 255.).round() as u8;
-    let blue = (color.blue * 255.).round() as u8;
+    let red = color.red;
+    let green = color.green;
+    let blue = color.blue;
 
-    if color.alpha == 1f32 {
+    if color.alpha == 255 {
         write!(dest,
                "#{:x}{:x}{:x}{:x}{:x}{:x}",
                red >> 4,
                red & 0xF,
                green >> 4,
                green & 0xF,
                blue >> 4,
                blue & 0xF)
     } else {
-        write!(dest, "rgba({}, {}, {}, {})", red, green, blue, color.alpha)
+        write!(dest, "rgba({}, {}, {}, {})", red, green, blue, color.alpha_f32())
     }
 }
--- a/servo/components/script/dom/element.rs
+++ b/servo/components/script/dom/element.rs
@@ -402,17 +402,17 @@ impl LayoutElementHelpers for LayoutJS<E
             this.get_background_color()
         } else {
             None
         };
 
         if let Some(color) = bgcolor {
             hints.push(from_declaration(
                 PropertyDeclaration::BackgroundColor(DeclaredValue::Value(
-                    Box::new(CSSColor { parsed: Color::RGBA(color), authored: None })))));
+                    CSSColor { parsed: Color::RGBA(color), authored: None }))));
         }
 
         let background = if let Some(this) = self.downcast::<HTMLBodyElement>() {
             this.get_background()
         } else {
             None
         };
 
@@ -435,20 +435,20 @@ impl LayoutElementHelpers for LayoutJS<E
             // https://html.spec.whatwg.org/multipage/#the-hr-element-2:presentational-hints-5
             this.get_color()
         } else {
             None
         };
 
         if let Some(color) = color {
             hints.push(from_declaration(
-                PropertyDeclaration::Color(DeclaredValue::Value(Box::new(CSSRGBA {
+                PropertyDeclaration::Color(DeclaredValue::Value(CSSRGBA {
                     parsed: color,
                     authored: None,
-                })))));
+                }))));
         }
 
         let font_family = if let Some(this) = self.downcast::<HTMLFontElement>() {
             this.get_face()
         } else {
             None
         };
 
--- a/servo/components/script_layout_interface/Cargo.toml
+++ b/servo/components/script_layout_interface/Cargo.toml
@@ -8,17 +8,17 @@ publish = false
 [lib]
 name = "script_layout_interface"
 path = "lib.rs"
 
 [dependencies]
 app_units = "0.3"
 atomic_refcell = "0.1"
 canvas_traits = {path = "../canvas_traits"}
-cssparser = {version = "0.7", features = ["heap_size", "serde-serialization"]}
+cssparser = {version = "0.8", features = ["heap_size", "serde-serialization"]}
 euclid = "0.10.1"
 gfx_traits = {path = "../gfx_traits"}
 heapsize = "0.3.0"
 heapsize_derive = "0.1"
 html5ever-atoms = "0.1"
 ipc-channel = "0.5"
 libc = "0.2"
 log = "0.3.5"
--- a/servo/components/selectors/Cargo.toml
+++ b/servo/components/selectors/Cargo.toml
@@ -13,10 +13,10 @@ license = "MPL-2.0"
 
 [lib]
 name = "selectors"
 path = "lib.rs"
 
 [dependencies]
 bitflags = "0.7"
 matches = "0.1"
-cssparser = ">=0.6, <0.8"
+cssparser = ">=0.6, <0.9"
 fnv = "1.0"
--- a/servo/components/style/Cargo.toml
+++ b/servo/components/style/Cargo.toml
@@ -21,17 +21,17 @@ servo = ["serde/unstable", "serde", "ser
          "rayon/unstable", "servo_url/servo"]
 testing = []
 
 [dependencies]
 app_units = "0.3"
 atomic_refcell = "0.1"
 bitflags = "0.7"
 cfg-if = "0.1.0"
-cssparser = "0.7.3"
+cssparser = "0.8"
 encoding = "0.2"
 euclid = "0.10.1"
 fnv = "1.0"
 heapsize = "0.3.0"
 heapsize_derive = {version = "0.1", optional = true}
 html5ever-atoms = {version = "0.1", optional = true}
 lazy_static = "0.2"
 log = "0.3.5"
--- a/servo/components/style/attr.rs
+++ b/servo/components/style/attr.rs
@@ -389,22 +389,17 @@ pub fn parse_legacy_color(mut input: &st
 
     // Step 6.
     if input.len() == 4 {
         if let (b'#', Ok(r), Ok(g), Ok(b)) =
                 (input.as_bytes()[0],
                 hex(input.as_bytes()[1] as char),
                 hex(input.as_bytes()[2] as char),
                 hex(input.as_bytes()[3] as char)) {
-            return Ok(RGBA {
-                red: (r as f32) * 17.0 / 255.0,
-                green: (g as f32) * 17.0 / 255.0,
-                blue: (b as f32) * 17.0 / 255.0,
-                alpha: 1.0,
-            })
+            return Ok(RGBA::new(r * 17, g * 17, b * 17, 255))
         }
     }
 
     // Step 7.
     let mut new_input = String::new();
     for ch in input.chars() {
         if ch as u32 > 0xffff {
             new_input.push_str("00")
@@ -461,22 +456,20 @@ pub fn parse_legacy_color(mut input: &st
     while length > 2 && red[0] == b'0' && green[0] == b'0' && blue[0] == b'0' {
         red = &red[1..];
         green = &green[1..];
         blue = &blue[1..];
         length -= 1
     }
 
     // Steps 15-20.
-    return Ok(RGBA {
-        red: hex_string(red).unwrap() as f32 / 255.0,
-        green: hex_string(green).unwrap() as f32 / 255.0,
-        blue: hex_string(blue).unwrap() as f32 / 255.0,
-        alpha: 1.0,
-    });
+    return Ok(RGBA::new(hex_string(red).unwrap(),
+                        hex_string(green).unwrap(),
+                        hex_string(blue).unwrap(),
+                        255));
 
     fn hex(ch: char) -> Result<u8, ()> {
         match ch {
             '0'...'9' => Ok((ch as u8) - b'0'),
             'a'...'f' => Ok((ch as u8) - b'a' + 10),
             'A'...'F' => Ok((ch as u8) - b'A' + 10),
             _ => Err(()),
         }
--- a/servo/components/style/gecko/values.rs
+++ b/servo/components/style/gecko/values.rs
@@ -220,30 +220,28 @@ impl GeckoStyleCoordConvertible for None
         } else {
             None
         }
     }
 }
 
 /// Convert a given RGBA value to `nscolor`.
 pub fn convert_rgba_to_nscolor(rgba: &RGBA) -> u32 {
-    (((rgba.alpha * 255.0).round() as u32) << 24) |
-    (((rgba.blue  * 255.0).round() as u32) << 16) |
-    (((rgba.green * 255.0).round() as u32) << 8) |
-     ((rgba.red   * 255.0).round() as u32)
+    ((rgba.alpha as u32) << 24) |
+    ((rgba.blue as u32) << 16) |
+    ((rgba.green as u32) << 8) |
+    (rgba.red as u32)
 }
 
 /// Convert a given `nscolor` to a Servo RGBA value.
 pub fn convert_nscolor_to_rgba(color: u32) -> RGBA {
-    RGBA {
-        red:    ((color        & 0xff) as f32) / 255.0,
-        green: (((color >>  8) & 0xff) as f32) / 255.0,
-        blue:  (((color >> 16) & 0xff) as f32) / 255.0,
-        alpha: (((color >> 24) & 0xff) as f32) / 255.0,
-    }
+    RGBA::new((color & 0xff) as u8,
+              (color >> 8 & 0xff) as u8,
+              (color >> 16 & 0xff) as u8,
+              (color >> 24 & 0xff) as u8)
 }
 
 /// Round `width` down to the nearest device pixel, but any non-zero value that
 /// would round down to zero is clamped to 1 device pixel.  Used for storing
 /// computed values of border-*-width and outline-width.
 #[inline]
 pub fn round_border_to_device_pixels(width: Au, au_per_device_px: Au) -> Au {
     if width == Au(0) {
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -505,28 +505,31 @@ impl Interpolate for BackgroundSize {
 /// https://drafts.csswg.org/css-transitions/#animtype-color
 impl Interpolate for RGBA {
     #[inline]
     fn interpolate(&self, other: &RGBA, progress: f64) -> Result<Self, ()> {
         fn clamp(val: f32) -> f32 {
             val.max(0.).min(1.)
         }
 
-        let alpha = clamp(try!(self.alpha.interpolate(&other.alpha, progress)));
+        let alpha = clamp(try!(self.alpha_f32().interpolate(&other.alpha_f32(), progress)));
         if alpha == 0. {
-            Ok(RGBA { red: 0., green: 0., blue: 0., alpha: 0. })
+            Ok(RGBA::transparent())
         } else {
-            Ok(RGBA { red: clamp(try!((self.red * self.alpha).interpolate(&(other.red * other.alpha), progress))
-                                 * 1. / alpha),
-                      green: clamp(try!((self.green * self.alpha).interpolate(&(other.green * other.alpha), progress))
-                                   * 1. / alpha),
-                      blue: clamp(try!((self.blue * self.alpha).interpolate(&(other.blue * other.alpha), progress))
-                                  * 1. / alpha),
-                      alpha: alpha
-            })
+            // NB: We rely on RGBA::from_floats clamping already.
+            let red = try!((self.red_f32() * self.alpha_f32())
+                            .interpolate(&(other.red_f32() * other.alpha_f32()), progress))
+                            * 1. / alpha;
+            let green = try!((self.green_f32() * self.alpha_f32())
+                             .interpolate(&(other.green_f32() * other.alpha_f32()), progress))
+                             * 1. / alpha;
+            let blue = try!((self.blue_f32() * self.alpha_f32())
+                             .interpolate(&(other.blue_f32() * other.alpha_f32()), progress))
+                             * 1. / alpha;
+            Ok(RGBA::from_floats(red, green, blue, alpha))
         }
     }
 }
 
 /// https://drafts.csswg.org/css-transitions/#animtype-color
 impl Interpolate for CSSParserColor {
     #[inline]
     fn interpolate(&self, other: &Self, progress: f64) -> Result<Self, ()> {
@@ -751,19 +754,17 @@ impl Interpolate for TextShadow {
 /// https://drafts.csswg.org/css-transitions/#animtype-shadow-list
 impl Interpolate for TextShadowList {
     #[inline]
     fn interpolate(&self, other: &Self, progress: f64) -> Result<Self, ()> {
         let zero = TextShadow {
             offset_x: Au(0),
             offset_y: Au(0),
             blur_radius: Au(0),
-            color: CSSParserColor::RGBA(RGBA {
-                red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0
-            })
+            color: CSSParserColor::RGBA(RGBA::transparent()),
         };
 
         let max_len = cmp::max(self.0.len(), other.0.len());
         let mut result = Vec::with_capacity(max_len);
 
         for i in 0..max_len {
             let shadow = match (self.0.get(i), other.0.get(i)) {
                 (Some(shadow), Some(other))
@@ -788,19 +789,17 @@ impl Interpolate for BoxShadowList {
     #[inline]
     fn interpolate(&self, other: &Self, progress: f64) -> Result<Self, ()> {
         // The inset value must change
         let mut zero = BoxShadow {
             offset_x: Au(0),
             offset_y: Au(0),
             spread_radius: Au(0),
             blur_radius: Au(0),
-            color: CSSParserColor::RGBA(RGBA {
-                red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0
-            }),
+            color: CSSParserColor::RGBA(RGBA::transparent()),
             inset: false,
         };
 
         let max_len = cmp::max(self.0.len(), other.0.len());
         let mut result = Vec::with_capacity(max_len);
 
         for i in 0..max_len {
             let shadow = match (self.0.get(i), other.0.get(i)) {
--- a/servo/components/style/properties/longhand/background.mako.rs
+++ b/servo/components/style/properties/longhand/background.mako.rs
@@ -2,19 +2,19 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <% data.new_style_struct("Background", inherited=False) %>
 
 ${helpers.predefined_type("background-color", "CSSColor",
-    "::cssparser::Color::RGBA(::cssparser::RGBA { red: 0., green: 0., blue: 0., alpha: 0. }) /* transparent */",
+    "::cssparser::Color::RGBA(::cssparser::RGBA::transparent())",
     spec="https://drafts.csswg.org/css-backgrounds/#background-color",
-    animatable=True, complex_color=True, boxed=True)}
+    animatable=True, complex_color=True)}
 
 <%helpers:vector_longhand name="background-image" animatable="False"
                           spec="https://drafts.csswg.org/css-backgrounds/#the-background-image"
                           has_uncacheable_values="${product == 'gecko'}">
     use std::fmt;
     use style_traits::ToCss;
     use values::HasViewportPercentage;
     use values::specified::Image;
--- a/servo/components/style/properties/longhand/border.mako.rs
+++ b/servo/components/style/properties/longhand/border.mako.rs
@@ -15,17 +15,17 @@
         else:
             return "https://drafts.csswg.org/css-backgrounds/#border-%s-%s" % (side[0], kind)
 %>
 % for side in ALL_SIDES:
     ${helpers.predefined_type("border-%s-color" % side[0], "CSSColor",
                               "::cssparser::Color::CurrentColor",
                               alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-color"),
                               spec=maybe_logical_spec(side, "color"),
-                              animatable=True, logical = side[1], boxed=True)}
+                              animatable=True, logical = side[1])}
 % endfor
 
 % for side in ALL_SIDES:
     ${helpers.predefined_type("border-%s-style" % side[0], "BorderStyle",
                               "specified::BorderStyle::none",
                               need_clone=True,
                               alias=maybe_moz_logical_alias(product, side, "-moz-border-%s-style"),
                               spec=maybe_logical_spec(side, "style"),
--- a/servo/components/style/properties/longhand/color.mako.rs
+++ b/servo/components/style/properties/longhand/color.mako.rs
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 <%namespace name="helpers" file="/helpers.mako.rs" />
 
 <% data.new_style_struct("Color", inherited=True) %>
 
-<%helpers:raw_longhand name="color" need_clone="True" animatable="True" boxed="True"
+<%helpers:raw_longhand name="color" need_clone="True" animatable="True"
                        spec="https://drafts.csswg.org/css-color/#color">
     use cssparser::Color as CSSParserColor;
     use cssparser::RGBA;
     use values::specified::{CSSColor, CSSRGBA};
 
     impl ToComputedValue for SpecifiedValue {
         type ComputedValue = computed_value::T;
 
@@ -31,23 +31,23 @@
 
     pub type SpecifiedValue = CSSRGBA;
     pub mod computed_value {
         use cssparser;
         pub type T = cssparser::RGBA;
     }
     #[inline]
     pub fn get_initial_value() -> computed_value::T {
-        RGBA { red: 0., green: 0., blue: 0., alpha: 1. }  /* black */
+        RGBA::new(0, 0, 0, 255) // black
     }
     pub fn parse_specified(context: &ParserContext, input: &mut Parser)
-                           -> Result<DeclaredValue<Box<SpecifiedValue>>, ()> {
+                           -> Result<DeclaredValue<SpecifiedValue>, ()> {
         let value = try!(CSSColor::parse(context, input));
         let rgba = match value.parsed {
             CSSParserColor::RGBA(rgba) => rgba,
             CSSParserColor::CurrentColor => return Ok(DeclaredValue::Inherit)
         };
-        Ok(DeclaredValue::Value(Box::new(CSSRGBA {
+        Ok(DeclaredValue::Value(CSSRGBA {
             parsed: rgba,
             authored: value.authored,
-        })))
+        }))
     }
 </%helpers:raw_longhand>
--- a/servo/components/style/properties/longhand/column.mako.rs
+++ b/servo/components/style/properties/longhand/column.mako.rs
@@ -142,17 +142,17 @@
         BorderWidth::parse(context, input)
     }
 </%helpers:longhand>
 
 // https://drafts.csswg.org/css-multicol-1/#crc
 ${helpers.predefined_type("column-rule-color", "CSSColor",
                           "::cssparser::Color::CurrentColor",
                           products="gecko", animatable=True, extra_prefixes="moz",
-                          complex_color=True, need_clone=True, boxed=True,
+                          complex_color=True, need_clone=True,
                           spec="https://drafts.csswg.org/css-multicol/#propdef-column-rule-color")}
 
 // It's not implemented in servo or gecko yet.
 ${helpers.single_keyword("column-span", "none all",
                          products="none", animatable=False,
                          spec="https://drafts.csswg.org/css-multicol/#propdef-column-span")}
 
 ${helpers.single_keyword("column-rule-style",
--- a/servo/components/style/properties/longhand/inherited_text.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_text.mako.rs
@@ -424,17 +424,17 @@
                                           .map(SpecifiedValue::Specified)
         }
     }
 </%helpers:longhand>
 
 <%helpers:longhand name="-servo-text-decorations-in-effect"
                    derived_from="display text-decoration"
                    need_clone="True" products="servo"
-                   animatable="False" boxed="True"
+                   animatable="False"
                    spec="Nonstandard (Internal property used by Servo)">
     use cssparser::RGBA;
     use std::fmt;
     use style_traits::ToCss;
     use values::HasViewportPercentage;
     use values::computed::ComputedValueAsSpecified;
 
     impl ComputedValueAsSpecified for SpecifiedValue {}
@@ -1020,19 +1020,18 @@
             try!(dest.write_char(' '));
             vertical.to_css(dest)
         }
     }
 </%helpers:longhand>
 
 ${helpers.predefined_type("text-emphasis-color", "CSSColor",
                           "::cssparser::Color::CurrentColor",
-                          products="gecko",animatable=True,
+                          products="gecko", animatable=True,
                           complex_color=True, need_clone=True,
-                          boxed=True,
                           spec="https://drafts.csswg.org/css-text-decor/#propdef-text-emphasis-color")}
 
 
 ${helpers.predefined_type(
     "-moz-tab-size", "LengthOrNumber",
     "::values::Either::Second(8.0)",
     "parse_non_negative",
     products="gecko", animatable=False,
@@ -1040,24 +1039,24 @@
 
 
 // CSS Compatibility
 // https://compat.spec.whatwg.org
 ${helpers.predefined_type(
     "-webkit-text-fill-color", "CSSColor",
     "CSSParserColor::CurrentColor",
     products="gecko", animatable=True,
-    complex_color=True, need_clone=True, boxed=True,
+    complex_color=True, need_clone=True,
     spec="https://compat.spec.whatwg.org/#the-webkit-text-fill-color")}
 
 ${helpers.predefined_type(
     "-webkit-text-stroke-color", "CSSColor",
     "CSSParserColor::CurrentColor",
     products="gecko", animatable=True,
-    complex_color=True, need_clone=True, boxed=True,
+    complex_color=True, need_clone=True,
     spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-color")}
 
 <%helpers:longhand products="gecko" name="-webkit-text-stroke-width" animatable="False"
                    spec="https://compat.spec.whatwg.org/#the-webkit-text-stroke-width">
     use app_units::Au;
     use std::fmt;
     use style_traits::ToCss;
     use values::HasViewportPercentage;
--- a/servo/components/style/properties/longhand/outline.mako.rs
+++ b/servo/components/style/properties/longhand/outline.mako.rs
@@ -6,17 +6,17 @@
 <% from data import Method %>
 
 <% data.new_style_struct("Outline",
                          inherited=False,
                          additional_methods=[Method("outline_has_nonzero_width", "bool")]) %>
 
 // TODO(pcwalton): `invert`
 ${helpers.predefined_type("outline-color", "CSSColor", "::cssparser::Color::CurrentColor",
-                          animatable=True, complex_color=True, need_clone=True, boxed=True,
+                          animatable=True, complex_color=True, need_clone=True,
                           spec="https://drafts.csswg.org/css-ui/#propdef-outline-color")}
 
 <%helpers:longhand name="outline-style" need_clone="True" animatable="False"
                    spec="https://drafts.csswg.org/css-ui/#propdef-outline-style">
 
     use std::fmt;
     use style_traits::ToCss;
     use values::specified::BorderStyle;
--- a/servo/components/style/properties/longhand/svg.mako.rs
+++ b/servo/components/style/properties/longhand/svg.mako.rs
@@ -17,47 +17,44 @@
 ${helpers.single_keyword("vector-effect", "none non-scaling-stroke",
                          products="gecko", animatable=False,
                          spec="https://www.w3.org/TR/SVGTiny12/painting.html#VectorEffectProperty")}
 
 // Section 13 - Gradients and Patterns
 
 ${helpers.predefined_type(
     "stop-color", "CSSColor",
-    "CSSParserColor::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 })",
+    "CSSParserColor::RGBA(RGBA::new(0, 0, 0, 255))",
     products="gecko",
     animatable=False,
-    boxed=True,
     spec="https://www.w3.org/TR/SVGTiny12/painting.html#StopColorProperty")}
 
 ${helpers.predefined_type("stop-opacity", "Opacity", "1.0",
                           products="gecko",
                           animatable=False,
                           spec="https://www.w3.org/TR/SVGTiny12/painting.html#propdef-stop-opacity")}
 
 // Section 15 - Filter Effects
 
 ${helpers.predefined_type(
     "flood-color", "CSSColor",
-    "CSSParserColor::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 })",
+    "CSSParserColor::RGBA(RGBA::new(0, 0, 0, 255))",
     products="gecko",
     animatable=False,
-    boxed=True,
     spec="https://www.w3.org/TR/SVG/filters.html#FloodColorProperty")}
 
 ${helpers.predefined_type("flood-opacity", "Opacity",
                           "1.0", products="gecko", animatable=False,
                           spec="https://www.w3.org/TR/SVG/filters.html#FloodOpacityProperty")}
 
 ${helpers.predefined_type(
     "lighting-color", "CSSColor",
-    "CSSParserColor::RGBA(RGBA { red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0 })",
+    "CSSParserColor::RGBA(RGBA::new(255, 255, 255, 255))",
     products="gecko",
     animatable=False,
-    boxed=True,
     spec="https://www.w3.org/TR/SVG/filters.html#LightingColorProperty")}
 
 // CSS Masking Module Level 1
 // https://drafts.fxtf.org/css-masking
 ${helpers.single_keyword("mask-type", "luminance alpha",
                          products="gecko", animatable=False,
                          spec="https://drafts.fxtf.org/css-masking/#propdef-mask-type")}
 
--- a/servo/components/style/properties/longhand/text.mako.rs
+++ b/servo/components/style/properties/longhand/text.mako.rs
@@ -23,17 +23,17 @@
     impl ComputedValueAsSpecified for SpecifiedValue {}
     no_viewport_percentage!(SpecifiedValue);
 
     #[derive(PartialEq, Eq, Clone, Debug)]
     #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
     pub enum Side {
         Clip,
         Ellipsis,
-        String(String),
+        String(Box<str>),
     }
 
     #[derive(PartialEq, Eq, Clone, Debug)]
     #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
     pub struct SpecifiedValue {
         pub first: Side,
         pub second: Option<Side>
     }
@@ -61,17 +61,17 @@
         fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Side, ()> {
             if let Ok(ident) = input.try(|input| input.expect_ident()) {
                 match_ignore_ascii_case! { ident,
                     "clip" => Ok(Side::Clip),
                     "ellipsis" => Ok(Side::Ellipsis),
                     _ => Err(())
                 }
             } else {
-                Ok(Side::String(try!(input.expect_string()).into_owned()))
+                Ok(Side::String(try!(input.expect_string()).into_owned().into_boxed_str()))
             }
         }
     }
 
     impl ToCss for Side {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             match *self {
                 Side::Clip => dest.write_str("clip"),
@@ -205,14 +205,13 @@
 ${helpers.single_keyword("text-decoration-style",
                          "solid double dotted dashed wavy -moz-none",
                          products="gecko",
                          animatable=False,
                          spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-style")}
 
 ${helpers.predefined_type(
     "text-decoration-color", "CSSColor",
-    "CSSParserColor::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 })",
+    "CSSParserColor::RGBA(RGBA::new(0, 0, 0, 255))",
     complex_color=True,
     products="gecko",
     animatable=True,
-    boxed=True,
     spec="https://drafts.csswg.org/css-text-decor/#propdef-text-decoration-color")}
--- a/servo/components/style/properties/shorthand/serialize.mako.rs
+++ b/servo/components/style/properties/shorthand/serialize.mako.rs
@@ -56,17 +56,17 @@ pub fn serialize_four_sides<W, I>(dest: 
     }
 
     Ok(())
 }
 
 fn serialize_directional_border<W, I,>(dest: &mut W,
                                                 width: &DeclaredValue<I>,
                                                 style: &DeclaredValue<BorderStyle>,
-                                                color: &DeclaredValue<Box<CSSColor>>)
+                                                color: &DeclaredValue<CSSColor>)
                                                 -> fmt::Result where W: fmt::Write, I: ToCss {
     match *width {
         DeclaredValue::Value(ref width) => {
             try!(width.to_css(dest));
         },
         _ => {
             try!(write!(dest, "medium"));
         }
--- a/servo/components/style/values/specified/mod.rs
+++ b/servo/components/style/values/specified/mod.rs
@@ -42,24 +42,24 @@ pub mod url;
 
 no_viewport_percentage!(i32);  // For PropertyDeclaration::Order
 
 #[derive(Clone, PartialEq, Debug)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[allow(missing_docs)]
 pub struct CSSColor {
     pub parsed: cssparser::Color,
-    pub authored: Option<String>,
+    pub authored: Option<Box<str>>,
 }
 
 impl Parse for CSSColor {
     fn parse(_context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
         let start_position = input.position();
         let authored = match input.next() {
-            Ok(Token::Ident(s)) => Some(s.into_owned()),
+            Ok(Token::Ident(s)) => Some(s.into_owned().into_boxed_str()),
             _ => None,
         };
         input.reset(start_position);
         Ok(CSSColor {
             parsed: try!(cssparser::Color::parse(input)),
             authored: authored,
         })
     }
@@ -76,17 +76,17 @@ impl ToCss for CSSColor {
     }
 }
 
 #[derive(Clone, PartialEq, Debug)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 #[allow(missing_docs)]
 pub struct CSSRGBA {
     pub parsed: cssparser::RGBA,
-    pub authored: Option<String>,
+    pub authored: Option<Box<str>>,
 }
 
 no_viewport_percentage!(CSSRGBA);
 
 impl ToCss for CSSRGBA {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
         match self.authored {
             Some(ref s) => dest.write_str(s),
--- a/servo/components/style_traits/Cargo.toml
+++ b/servo/components/style_traits/Cargo.toml
@@ -10,15 +10,15 @@ name = "style_traits"
 path = "lib.rs"
 
 [features]
 servo = ["heapsize", "heapsize_derive", "serde", "serde_derive",
          "cssparser/heap_size", "cssparser/serde-serialization"]
 
 [dependencies]
 app_units = "0.3"
-cssparser = "0.7"
+cssparser = "0.8"
 euclid = "0.10.1"
 heapsize = {version = "0.3.0", optional = true}
 heapsize_derive = {version = "0.1", optional = true}
 rustc-serialize = "0.3"
 serde = {version = "0.8", optional = true}
 serde_derive = {version = "0.8", optional = true}
--- a/servo/ports/geckolib/Cargo.toml
+++ b/servo/ports/geckolib/Cargo.toml
@@ -10,17 +10,17 @@ path = "lib.rs"
 crate-type = ["staticlib", "rlib"]
 
 [features]
 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"
 libc = "0.2"
 log = {version = "0.3.5", features = ["release_max_level_info"]}
 num_cpus = "1.1.0"
 parking_lot = "0.3"
 selectors = {path = "../../components/selectors"}
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -978,22 +978,22 @@ pub extern "C" fn Servo_DeclarationBlock
                 ))
             } else {
                 error!("stylo: got unexpected non-integer value for font-size presentation attribute");
                 return
             }
         }
         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
             }
         }
         _ => {
             error!("stylo: cannot handle longhand {:?} from presentation attribute", long);
             return
--- a/servo/tests/unit/style/Cargo.toml
+++ b/servo/tests/unit/style/Cargo.toml
@@ -9,17 +9,17 @@ name = "style_tests"
 path = "lib.rs"
 doctest = false
 
 [features]
 testing = ["style/testing"]
 
 [dependencies]
 app_units = "0.3"
-cssparser = {version = "0.7", features = ["heap_size"]}
+cssparser = {version = "0.8", features = ["heap_size"]}
 euclid = "0.10.1"
 html5ever-atoms = "0.1"
 matches = "0.1"
 owning_ref = "0.2.2"
 parking_lot = "0.3"
 rayon = "0.6"
 rustc-serialize = "0.3"
 selectors = {path = "../../../components/selectors"}
--- a/servo/tests/unit/style/animated_properties.rs
+++ b/servo/tests/unit/style/animated_properties.rs
@@ -1,36 +1,50 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 use cssparser::{Color, RGBA};
 use style::properties::animated_properties::Interpolate;
 
 #[test]
-fn test_rgba_color_interepolation() {
-    assert_eq!(Color::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0 }).interpolate(
-              &Color::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0 }), 1.0).unwrap(),
-               Color::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0 }));
+fn test_rgba_color_interepolation_preserves_transparent() {
+    assert_eq!(Color::RGBA(RGBA::transparent())
+                .interpolate(&Color::RGBA(RGBA::transparent()), 0.5).unwrap(),
+               Color::RGBA(RGBA::transparent()));
+}
 
-    assert_eq!(Color::RGBA(RGBA { red: 1.0, green: 0.0, blue: 0.0, alpha: 0.6 }).interpolate(
-              &Color::RGBA(RGBA { red: 0.0, green: 1.0, blue: 0.0, alpha: 0.4 }), 0.5).unwrap(),
-               Color::RGBA(RGBA { red: 0.6, green: 0.4, blue: 0.0, alpha: 0.5 }));
+#[test]
+fn test_rgba_color_interepolation_alpha() {
+    assert_eq!(Color::RGBA(RGBA::new(200, 0, 0, 100))
+                .interpolate(&Color::RGBA(RGBA::new(0, 200, 0, 200)), 0.5).unwrap(),
+               Color::RGBA(RGBA::new(66, 133, 0, 150)));
+}
 
+#[test]
+fn test_rgba_color_interepolation_out_of_range_1() {
     // Some cubic-bezier functions produce values that are out of range [0, 1].
     // Unclamped cases.
-    assert_eq!(Color::RGBA(RGBA { red: 0.3, green: 0.0, blue: 0.0, alpha: 0.4 }).interpolate(
-              &Color::RGBA(RGBA { red: 0.0, green: 1.0, blue: 0.0, alpha: 0.6 }), -0.5).unwrap(),
-               Color::RGBA(RGBA { red: 0.6, green: 0.0, blue: 0.0, alpha: 0.3 }));
+    assert_eq!(Color::RGBA(RGBA::from_floats(0.3, 0.0, 0.0, 0.4)).interpolate(
+              &Color::RGBA(RGBA::from_floats(0.0, 1.0, 0.0, 0.6)), -0.5).unwrap(),
+               Color::RGBA(RGBA::new(152, 0, 0, 76)));
+}
 
-    assert_eq!(Color::RGBA(RGBA { red: 1.0, green: 0.0, blue: 0.0, alpha: 0.6 }).interpolate(
-              &Color::RGBA(RGBA { red: 0.0, green: 0.3, blue: 0.0, alpha: 0.4 }), 1.5).unwrap(),
-               Color::RGBA(RGBA { red: 0.0, green: 0.6, blue: 0.0, alpha: 0.3 }));
+#[test]
+fn test_rgba_color_interepolation_out_of_range_2() {
+    assert_eq!(Color::RGBA(RGBA::from_floats(1.0, 0.0, 0.0, 0.6)).interpolate(
+              &Color::RGBA(RGBA::from_floats(0.0, 0.3, 0.0, 0.4)), 1.5).unwrap(),
+               Color::RGBA(RGBA::new(0, 152, 0, 76)));
+}
 
-    // Clamped cases.
-    assert_eq!(Color::RGBA(RGBA { red: 1.0, green: 0.0, blue: 0.0, alpha: 0.8 }).interpolate(
-              &Color::RGBA(RGBA { red: 0.0, green: 1.0, blue: 0.0, alpha: 0.2 }), -0.5).unwrap(),
-               Color::RGBA(RGBA { red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0 }));
+#[test]
+fn test_rgba_color_interepolation_out_of_range_clamped_1() {
+    assert_eq!(Color::RGBA(RGBA::from_floats(1.0, 0.0, 0.0, 0.8)).interpolate(
+              &Color::RGBA(RGBA::from_floats(0.0, 1.0, 0.0, 0.2)), -0.5).unwrap(),
+               Color::RGBA(RGBA::from_floats(1.0, 0.0, 0.0, 1.0)));
+}
 
-    assert_eq!(Color::RGBA(RGBA { red: 1.0, green: 0.0, blue: 0.0, alpha: 0.8 }).interpolate(
-              &Color::RGBA(RGBA { red: 0.0, green: 1.0, blue: 0.0, alpha: 0.2 }), 1.5).unwrap(),
-               Color::RGBA(RGBA { red: 0.0, green: 0.0, blue: 0.0, alpha: 0.0 }));
+#[test]
+fn test_rgba_color_interepolation_out_of_range_clamped_2() {
+    assert_eq!(Color::RGBA(RGBA::from_floats(1.0, 0.0, 0.0, 0.8)).interpolate(
+              &Color::RGBA(RGBA::from_floats(0.0, 1.0, 0.0, 0.2)), 1.5).unwrap(),
+               Color::RGBA(RGBA::from_floats(0.0, 0.0, 0.0, 0.0)));
 }
--- a/servo/tests/unit/style/properties/serialization.rs
+++ b/servo/tests/unit/style/properties/serialization.rs
@@ -226,25 +226,25 @@ mod shorthand_serialization {
             let serialization = shorthand_properties_to_string(properties);
             assert_eq!(serialization, "border-width: thin medium thick 15px;");
         }
 
         #[test]
         fn border_color_should_serialize_correctly() {
             let mut properties = Vec::new();
 
-            let red = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 1f32, green: 0f32, blue: 0f32, alpha: 1f32 }),
+            let red = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(255, 0, 0, 255)),
                 authored: None
-            }));
+            });
 
-            let blue = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 0f32, green: 0f32, blue: 1f32, alpha: 1f32 }),
+            let blue = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(0, 0, 255, 255)),
                 authored: None
-            }));
+            });
 
             properties.push(PropertyDeclaration::BorderTopColor(blue.clone()));
             properties.push(PropertyDeclaration::BorderRightColor(red.clone()));
             properties.push(PropertyDeclaration::BorderBottomColor(blue));
             properties.push(PropertyDeclaration::BorderLeftColor(red));
 
             let serialization = shorthand_properties_to_string(properties);
 
@@ -276,39 +276,39 @@ mod shorthand_serialization {
         // but afterwards, we only need to to one test per "directional border shorthand"
 
         #[test]
         fn directional_border_should_show_all_properties_when_values_are_set() {
             let mut properties = Vec::new();
 
             let width = DeclaredValue::Value(BorderWidth::from_length(Length::from_px(4f32)));
             let style = DeclaredValue::Value(BorderStyle::solid);
-            let color = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 1f32, green: 0f32, blue: 0f32, alpha: 1f32 }),
+            let color = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(255, 0, 0, 255)),
                 authored: None
-            }));
+            });
 
             properties.push(PropertyDeclaration::BorderTopWidth(width));
             properties.push(PropertyDeclaration::BorderTopStyle(style));
             properties.push(PropertyDeclaration::BorderTopColor(color));
 
             let serialization = shorthand_properties_to_string(properties);
             assert_eq!(serialization, "border-top: 4px solid rgb(255, 0, 0);");
         }
 
         #[test]
         fn directional_border_with_no_specified_style_will_show_style_as_none() {
             let mut properties = Vec::new();
 
             let width = DeclaredValue::Value(BorderWidth::from_length(Length::from_px(4f32)));
             let style = DeclaredValue::Initial;
-            let color = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 1f32, green: 0f32, blue: 0f32, alpha: 1f32 }),
+            let color = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(255, 0, 0, 255)),
                 authored: None
-            }));
+            });
 
             properties.push(PropertyDeclaration::BorderTopWidth(width));
             properties.push(PropertyDeclaration::BorderTopStyle(style));
             properties.push(PropertyDeclaration::BorderTopColor(color));
 
             let serialization = shorthand_properties_to_string(properties);
             assert_eq!(serialization, "border-top: 4px none rgb(255, 0, 0);");
         }
@@ -464,20 +464,20 @@ mod shorthand_serialization {
         use super::*;
 
         #[test]
         fn outline_should_show_all_properties_when_set() {
             let mut properties = Vec::new();
 
             let width = DeclaredValue::Value(WidthContainer(Length::from_px(4f32)));
             let style = DeclaredValue::Value(Either::Second(BorderStyle::solid));
-            let color = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 1f32, green: 0f32, blue: 0f32, alpha: 1f32 }),
+            let color = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(255, 0, 0, 255)),
                 authored: None
-            }));
+            });
 
             properties.push(PropertyDeclaration::OutlineWidth(width));
             properties.push(PropertyDeclaration::OutlineStyle(style));
             properties.push(PropertyDeclaration::OutlineColor(color));
 
             let serialization = shorthand_properties_to_string(properties);
             assert_eq!(serialization, "outline: 4px solid rgb(255, 0, 0);");
         }
@@ -499,38 +499,38 @@ mod shorthand_serialization {
         }
 
         #[test]
         fn outline_should_serialize_correctly_when_style_is_not_set() {
             let mut properties = Vec::new();
 
             let width = DeclaredValue::Value(WidthContainer(Length::from_px(4f32)));
             let style = DeclaredValue::Initial;
-            let color = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 1f32, green: 0f32, blue: 0f32, alpha: 1f32 }),
+            let color = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(255, 0, 0, 255)),
                 authored: None
-            }));
+            });
             properties.push(PropertyDeclaration::OutlineWidth(width));
             properties.push(PropertyDeclaration::OutlineStyle(style));
             properties.push(PropertyDeclaration::OutlineColor(color));
 
             let serialization = shorthand_properties_to_string(properties);
             assert_eq!(serialization, "outline: 4px none rgb(255, 0, 0);");
         }
 
         #[test]
         fn outline_should_serialize_correctly_when_style_is_auto() {
             let mut properties = Vec::new();
 
             let width = DeclaredValue::Value(WidthContainer(Length::from_px(4f32)));
             let style = DeclaredValue::Value(Either::First(Auto));
-            let color = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 1f32, green: 0f32, blue: 0f32, alpha: 1f32 }),
+            let color = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(255, 0, 0, 255)),
                 authored: None
-            }));
+            });
             properties.push(PropertyDeclaration::OutlineWidth(width));
             properties.push(PropertyDeclaration::OutlineStyle(style));
             properties.push(PropertyDeclaration::OutlineColor(color));
 
             let serialization = shorthand_properties_to_string(properties);
             assert_eq!(serialization, "outline: 4px auto rgb(255, 0, 0);");
         }
     }
@@ -725,20 +725,20 @@ mod shorthand_serialization {
                         vec![$variant]
                 ))
             };
         }
         #[test]
         fn background_should_serialize_all_available_properties_when_specified() {
             let mut properties = Vec::new();
 
-            let color = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 1f32, green: 0f32, blue: 0f32, alpha: 1f32 }),
+            let color = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(255, 0, 0, 255)),
                 authored: None
-            }));
+            });
 
             let position_x = single_vec_value_typedef!(position_x,
                 HorizontalPosition {
                     keyword: None,
                     position: Some(LengthOrPercentage::Length(NoCalcLength::from_px(7f32))),
                 }
             );
 
@@ -785,20 +785,20 @@ mod shorthand_serialization {
                 scroll 7px 4px / 70px 50px border-box padding-box;"
             );
         }
 
         #[test]
         fn background_should_combine_origin_and_clip_properties_when_equal() {
             let mut properties = Vec::new();
 
-            let color = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 1f32, green: 0f32, blue: 0f32, alpha: 1f32 }),
+            let color = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(255, 0, 0, 255)),
                 authored: None
-            }));
+            });
 
             let position_x = single_vec_value_typedef!(position_x,
                 HorizontalPosition {
                     keyword: None,
                     position: Some(LengthOrPercentage::Length(NoCalcLength::from_px(7f32))),
                 }
             );
 
@@ -844,20 +844,20 @@ mod shorthand_serialization {
                 scroll 7px 4px / 70px 50px padding-box;"
             );
         }
 
         #[test]
         fn background_should_always_print_color_and_url_and_repeat_and_attachment_and_position() {
             let mut properties = Vec::new();
 
-            let color = DeclaredValue::Value(Box::new(CSSColor {
-                parsed: ComputedColor::RGBA(RGBA { red: 1f32, green: 0f32, blue: 0f32, alpha: 1f32 }),
+            let color = DeclaredValue::Value(CSSColor {
+                parsed: ComputedColor::RGBA(RGBA::new(255, 0, 0, 255)),
                 authored: None
-            }));
+            });
 
             let position_x = single_vec_value_typedef!(position_x,
                 HorizontalPosition {
                     keyword: None,
                     position: Some(LengthOrPercentage::Length(NoCalcLength::from_px(0f32))),
                 }
             );
 
--- a/servo/tests/unit/style/size_of.rs
+++ b/servo/tests/unit/style/size_of.rs
@@ -23,22 +23,30 @@ fn size_of_property_declaration() {
     }
 }
 
 #[test]
 fn size_of_specified_values() {
     let threshold = 40;
     let longhands = specified_value_sizes();
 
+    let mut failing_messages = vec![];
+
     for specified_value in longhands {
         if specified_value.1 >= threshold && !specified_value.2 {
-            panic!("Your changes have increased the size of {} SpecifiedValue to {}. The threshold is \
-                    currently {}. SpecifiedValues are affect size of PropertyDeclaration enum and \
-                    increasing the size may dramatically affect our memory footprint. Please consider \
-                    using `boxed=\"True\"` in this longhand.",
-                    specified_value.0, specified_value.1, threshold)
+            failing_messages.push(
+                format!("Your changes have increased the size of {} SpecifiedValue to {}. The threshold is \
+                        currently {}. SpecifiedValues are affect size of PropertyDeclaration enum and \
+                        increasing the size may dramatically affect our memory footprint. Please consider \
+                        using `boxed=\"True\"` in this longhand.",
+                        specified_value.0, specified_value.1, threshold));
         } else if specified_value.1 < threshold && specified_value.2 {
-            panic!("Your changes have decreased the size of {} SpecifiedValue to {}. Good work! \
-                    The threshold is currently {}. Please consider removing `boxed=\"True\"` from this longhand.",
-                    specified_value.0, specified_value.1, threshold)
+            failing_messages.push(
+                format!("Your changes have decreased the size of {} SpecifiedValue to {}. Good work! \
+                        The threshold is currently {}. Please consider removing `boxed=\"True\"` from this longhand.",
+                        specified_value.0, specified_value.1, threshold));
         }
     }
+
+    if !failing_messages.is_empty() {
+        panic!("{}", failing_messages.join("\n\n"));
+    }
 }
--- a/servo/tests/unit/style/stylesheets.rs
+++ b/servo/tests/unit/style/stylesheets.rs
@@ -178,22 +178,20 @@ fn test_parse_stylesheet() {
                         }),
                         pseudo_element: None,
                         specificity: (1 << 20) + (1 << 10) + (0 << 0),
                     },
                 ]),
                 block: Arc::new(RwLock::new(PropertyDeclarationBlock {
                     declarations: vec![
                         (PropertyDeclaration::BackgroundColor(DeclaredValue::Value(
-                            Box::new(longhands::background_color::SpecifiedValue {
-                                authored: Some("blue".to_owned()),
-                                parsed: cssparser::Color::RGBA(cssparser::RGBA {
-                                    red: 0., green: 0., blue: 1., alpha: 1.
-                                }),
-                            })
+                            longhands::background_color::SpecifiedValue {
+                                authored: Some("blue".to_owned().into_boxed_str()),
+                                parsed: cssparser::Color::RGBA(cssparser::RGBA::new(0, 0, 255, 255)),
+                            }
                          )),
                          Importance::Normal),
                         (PropertyDeclaration::BackgroundPositionX(DeclaredValue::Value(
                             longhands::background_position_x::SpecifiedValue(
                             vec![longhands::background_position_x::single_value
                                                        ::get_initial_position_value()]))),
                         Importance::Normal),
                         (PropertyDeclaration::BackgroundPositionY(DeclaredValue::Value(
--- a/servo/tests/unit/stylo/Cargo.toml
+++ b/servo/tests/unit/stylo/Cargo.toml
@@ -9,17 +9,17 @@ build = "build.rs"
 [lib]
 name = "stylo_tests"
 path = "lib.rs"
 doctest = false
 
 [dependencies]
 app_units = "0.3"
 atomic_refcell = "0.1"
-cssparser = {version = "0.7"}
+cssparser = {version = "0.8"}
 env_logger = "0.4"
 euclid = "0.10.1"
 lazy_static = "0.2"
 libc = "0.2"
 log = {version = "0.3.5", features = ["release_max_level_info"]}
 num_cpus = "1.1.0"
 parking_lot = "0.3"
 selectors = {path = "../../../components/selectors"}