Commit 242d05ee authored by Hiroyuki Ikezoe's avatar Hiroyuki Ikezoe
Browse files

servo: Merge #17089 - Support currentColor for fill and stroke (from...

servo: Merge #17089 - Support currentColor for fill and stroke (from hiikezoe:current-color-for-fill-and-stroke); r=xidorn.

<!-- 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

Source-Repo: https://github.com/servo/servo
Source-Revision: 9e89b0a2293596f970b60307fff42f955083ca84

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 03cac1d3213fc608183a2090a45446f46d01c25c
parent 1cfee54d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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))