diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2017-08-17 20:27:14 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-12 08:39:15 +0100 |
commit | b736f53a13af48de08026b7c7e64275122af66e2 (patch) | |
tree | 54c20be9b96d7085973469c12332f43839d82f88 /layout/svg/nsSVGGradientFrame.cpp | |
parent | 4577efd50f8361ffa787d7fcba5f5894438f826c (diff) | |
download | UXP-b736f53a13af48de08026b7c7e64275122af66e2.tar UXP-b736f53a13af48de08026b7c7e64275122af66e2.tar.gz UXP-b736f53a13af48de08026b7c7e64275122af66e2.tar.lz UXP-b736f53a13af48de08026b7c7e64275122af66e2.tar.xz UXP-b736f53a13af48de08026b7c7e64275122af66e2.zip |
SVG - support radialGradient fr attribute
Diffstat (limited to 'layout/svg/nsSVGGradientFrame.cpp')
-rw-r--r-- | layout/svg/nsSVGGradientFrame.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/layout/svg/nsSVGGradientFrame.cpp b/layout/svg/nsSVGGradientFrame.cpp index 217ab8c4a..2d7684f5a 100644 --- a/layout/svg/nsSVGGradientFrame.cpp +++ b/layout/svg/nsSVGGradientFrame.cpp @@ -623,7 +623,7 @@ nsSVGRadialGradientFrame::GradientVectorLengthIsZero() already_AddRefed<gfxPattern> nsSVGRadialGradientFrame::CreateGradient() { - float cx, cy, r, fx, fy; + float cx, cy, r, fx, fy, fr; cx = GetLengthValue(dom::SVGRadialGradientElement::ATTR_CX); cy = GetLengthValue(dom::SVGRadialGradientElement::ATTR_CY); @@ -631,6 +631,7 @@ nsSVGRadialGradientFrame::CreateGradient() // If fx or fy are not set, use cx/cy instead fx = GetLengthValue(dom::SVGRadialGradientElement::ATTR_FX, cx); fy = GetLengthValue(dom::SVGRadialGradientElement::ATTR_FY, cy); + fr = GetLengthValue(dom::SVGRadialGradientElement::ATTR_FR); if (fx != cx || fy != cy) { // The focal point (fFx and fFy) must be clamped to be *inside* - not on - @@ -651,7 +652,7 @@ nsSVGRadialGradientFrame::CreateGradient() } } - RefPtr<gfxPattern> pattern = new gfxPattern(fx, fy, 0, cx, cy, r); + RefPtr<gfxPattern> pattern = new gfxPattern(fx, fy, fr, cx, cy, r); return pattern.forget(); } |