mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
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:
parent
52fc01ad37
commit
ffa62c9688
9 changed files with 31 additions and 16 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue