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.
This commit is contained in:
Adenilson Cavalcanti 2015-02-12 10:22:40 -08:00
parent 52fc01ad37
commit ffa62c9688
9 changed files with 31 additions and 16 deletions

View file

@ -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)
}
}