aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout')
-rw-r--r--components/layout/Cargo.toml3
-rw-r--r--components/layout/lib.rs3
-rw-r--r--components/layout/util.rs5
3 files changed, 8 insertions, 3 deletions
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml
index d20ca50ab09..3445e214a21 100644
--- a/components/layout/Cargo.toml
+++ b/components/layout/Cargo.toml
@@ -7,6 +7,9 @@ authors = ["The Servo Project Developers"]
name = "layout"
path = "lib.rs"
+[dependencies.azure]
+git = "https://github.com/servo/rust-azure"
+
[dependencies.canvas]
path = "../canvas"
diff --git a/components/layout/lib.rs b/components/layout/lib.rs
index a73ea6a7a0f..30057310032 100644
--- a/components/layout/lib.rs
+++ b/components/layout/lib.rs
@@ -25,7 +25,8 @@
#[macro_use]
extern crate log;
-#[macro_use] extern crate bitflags;
+#[macro_use]extern crate bitflags;
+extern crate azure;
extern crate cssparser;
extern crate canvas;
extern crate geom;
diff --git a/components/layout/util.rs b/components/layout/util.rs
index a5e8328118f..481adb895c7 100644
--- a/components/layout/util.rs
+++ b/components/layout/util.rs
@@ -9,6 +9,7 @@ use incremental::RestyleDamage;
use parallel::DomParallelInfo;
use wrapper::{LayoutNode, TLayoutNode, ThreadSafeLayoutNode};
+use azure::azure_hl::{Color};
use gfx::display_list::OpaqueNode;
use gfx;
use libc::{c_void, uintptr_t};
@@ -169,11 +170,11 @@ impl OpaqueNodeMethods for OpaqueNode {
/// 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) -> gfx::color::Color;
+ fn to_gfx_color(&self) -> Color;
}
impl ToGfxColor for style::values::RGBA {
- fn to_gfx_color(&self) -> gfx::color::Color {
+ fn to_gfx_color(&self) -> Color {
gfx::color::rgba(self.red, self.green, self.blue, self.alpha)
}
}