aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorXidorn Quan <me@upsuper.org>2017-06-08 10:42:27 +1000
committerXidorn Quan <me@upsuper.org>2017-06-08 12:59:22 +1000
commit7568a196885ed1f1ed2a38aa30d733e66a8e866e (patch)
tree730929c05ec3141b49ceab59f3e8dfe14b2a5127 /components/script
parentbf77f81ed639af0e9b305f6672db696f8a144ff4 (diff)
downloadservo-7568a196885ed1f1ed2a38aa30d733e66a8e866e.tar.gz
servo-7568a196885ed1f1ed2a38aa30d733e66a8e866e.zip
Merge CSSColor into Color.
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/element.rs11
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())
)
));
}