aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout
diff options
context:
space:
mode:
authorAdenilson Cavalcanti <cavalcantii@gmail.com>2015-02-12 10:22:40 -0800
committerAdenilson Cavalcanti <cavalcantii@gmail.com>2015-02-13 14:49:28 -0800
commitffa62c9688ebf372360e831fae5df1b5f2578b07 (patch)
treed447e0d07fc3c07ce07cb9962bf0b6337b38ce24 /components/layout
parent52fc01ad37e5e06de997862f480e8bb679ad8a89 (diff)
downloadservo-ffa62c9688ebf372360e831fae5df1b5f2578b07.tar.gz
servo-ffa62c9688ebf372360e831fae5df1b5f2578b07.zip
Companion single Color patch.
This will also update the rust-azure dependency to point to the hash where we have a single Color type. Just executed ref-tests and no regressions found.
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)
}
}