mirror of
https://github.com/servo/servo.git
synced 2025-07-29 18:20:24 +01:00
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 -->
This commit is contained in:
commit
24e944ad94
40 changed files with 828 additions and 700 deletions
|
@ -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())
|
||||
)
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue