diff options
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r-- | components/script/dom/element.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 5353fd7e9ab..58a1200b915 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -111,7 +111,7 @@ use style::stylearc::Arc; use style::stylist::ApplicableDeclarationBlock; use style::thread_state; use style::values::{CSSFloat, Either}; -use style::values::specified::{self, CSSColor, Color}; +use style::values::specified; use stylesheet_loader::StylesheetOwner; // TODO: Update focus state when the top-level browsing context gains or loses system focus, @@ -420,8 +420,8 @@ impl LayoutElementHelpers for LayoutJS<Element> { if let Some(color) = bgcolor { hints.push(from_declaration( shared_lock, - PropertyDeclaration::BackgroundColor( - CSSColor { parsed: Color::RGBA(color), authored: None }))); + PropertyDeclaration::BackgroundColor(color.into()) + )); } let background = if let Some(this) = self.downcast::<HTMLBodyElement>() { @@ -455,10 +455,7 @@ impl LayoutElementHelpers for LayoutJS<Element> { hints.push(from_declaration( shared_lock, PropertyDeclaration::Color( - longhands::color::SpecifiedValue(CSSColor { - parsed: Color::RGBA(color), - authored: None, - }) + longhands::color::SpecifiedValue(color.into()) ) )); } |