diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-06-07 21:03:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-07 21:03:52 -0700 |
commit | 24e944ad94816e607e833e34095c4f8b8136df4c (patch) | |
tree | aa3f07d3a7c66a4cb065f9030b29fc3fd5f71e39 /components/script/dom/element.rs | |
parent | c0f3ec87806a0d718d7f9ef1ccb912c78fc482d2 (diff) | |
parent | 5c643adb9831ef9c59b96da2eb6349554afa2441 (diff) | |
download | servo-24e944ad94816e607e833e34095c4f8b8136df4c.tar.gz servo-24e944ad94816e607e833e34095c4f8b8136df4c.zip |
Auto merge of #17219 - upsuper:currentcolor, r=Manishearth,birtles
Support interpolation between currentcolor and numeric color
This is the Servo side change of [bug 1345709](https://bugzilla.mozilla.org/show_bug.cgi?id=1345709).
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17219)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r-- | components/script/dom/element.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index cb882f53463..189410ce77a 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -4,7 +4,6 @@ //! Element nodes. -use cssparser::Color; use devtools_traits::AttrInfo; use dom::activation::Activatable; use dom::attr::{Attr, AttrHelpersForLayout}; @@ -113,7 +112,7 @@ use style::stylearc::Arc; use style::stylist::ApplicableDeclarationBlock; use style::thread_state; use style::values::{CSSFloat, Either}; -use style::values::specified::{self, CSSColor}; +use style::values::specified; use stylesheet_loader::StylesheetOwner; // TODO: Update focus state when the top-level browsing context gains or loses system focus, @@ -422,8 +421,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>() { @@ -457,10 +456,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()) ) )); } |