mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Support currentColor for fill and stroke.
This commit is contained in:
parent
aa4aef379d
commit
33e16fe630
1 changed files with 5 additions and 1 deletions
|
@ -1177,7 +1177,11 @@ impl ToComputedValue for SVGPaintKind {
|
|||
SVGPaintKind::ContextStroke => super::computed::SVGPaintKind::ContextStroke,
|
||||
SVGPaintKind::ContextFill => super::computed::SVGPaintKind::ContextFill,
|
||||
SVGPaintKind::Color(ref color) => {
|
||||
super::computed::SVGPaintKind::Color(color.to_computed_value(context))
|
||||
let color = match color.parsed {
|
||||
Color::CurrentColor => cssparser::Color::RGBA(context.style().get_color().clone_color()),
|
||||
_ => color.to_computed_value(context),
|
||||
};
|
||||
super::computed::SVGPaintKind::Color(color)
|
||||
}
|
||||
SVGPaintKind::PaintServer(ref server) => {
|
||||
super::computed::SVGPaintKind::PaintServer(server.to_computed_value(context))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue