Further changes required by Servo

This commit is contained in:
Oriol Brufau 2023-11-15 21:32:34 +01:00 committed by Martin Robinson
parent 8c1c4073e2
commit b6db94bdf5
9 changed files with 94 additions and 66 deletions

View file

@ -702,9 +702,13 @@ impl<'dom> LayoutElementHelpers<'dom> for LayoutDom<'dom, Element> {
};
if let Some(color) = bgcolor {
use cssparser::FromParsedColor;
hints.push(from_declaration(
shared_lock,
PropertyDeclaration::BackgroundColor(color.into()),
PropertyDeclaration::BackgroundColor(
specified::Color::from_rgba(color.red, color.green, color.blue, color.alpha)
.into(),
),
));
}
@ -736,9 +740,13 @@ impl<'dom> LayoutElementHelpers<'dom> for LayoutDom<'dom, Element> {
};
if let Some(color) = color {
use cssparser::FromParsedColor;
hints.push(from_declaration(
shared_lock,
PropertyDeclaration::Color(longhands::color::SpecifiedValue(color.into())),
PropertyDeclaration::Color(longhands::color::SpecifiedValue(
specified::Color::from_rgba(color.red, color.green, color.blue, color.alpha)
.into(),
)),
));
}