mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #17089 - hiikezoe:current-color-for-fill-and-stroke, r=xidorn.
Support currentColor for fill and stroke. <!-- Please describe your changes on the following line: --> This is a PR for https://bugzilla.mozilla.org/show_bug.cgi?id=1368376 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because it's for stylo
This commit is contained in:
commit
9e89b0a229
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