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 | c803c6466dba5ea01bbde73748280789769a1074 (patch) | |
tree | 54c20be9b96d7085973469c12332f43839d82f88 /dom | |
parent | b81825a39502c06c1052be3f6a07a5613cc93135 (diff) | |
download | uxp-c803c6466dba5ea01bbde73748280789769a1074.tar.gz |
SVG - support radialGradient fr attribute
Diffstat (limited to 'dom')
-rw-r--r-- | dom/base/nsGkAtomList.h | 1 | ||||
-rw-r--r-- | dom/svg/SVGGradientElement.cpp | 9 | ||||
-rw-r--r-- | dom/svg/SVGGradientElement.h | 7 | ||||
-rw-r--r-- | dom/webidl/SVGRadialGradientElement.webidl | 4 |
4 files changed, 16 insertions, 5 deletions
diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h index 86a6fa99c4..91427fabbd 100644 --- a/dom/base/nsGkAtomList.h +++ b/dom/base/nsGkAtomList.h @@ -1450,6 +1450,7 @@ GK_ATOM(font_style, "font-style") GK_ATOM(font_variant, "font-variant") GK_ATOM(foreignObject, "foreignObject") GK_ATOM(fractalNoise, "fractalNoise") +GK_ATOM(fr, "fr") GK_ATOM(fx, "fx") GK_ATOM(fy, "fy") GK_ATOM(G, "G") diff --git a/dom/svg/SVGGradientElement.cpp b/dom/svg/SVGGradientElement.cpp index 1bcac67e6e..93767c9340 100644 --- a/dom/svg/SVGGradientElement.cpp +++ b/dom/svg/SVGGradientElement.cpp @@ -198,13 +198,14 @@ SVGRadialGradientElement::WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenP return SVGRadialGradientElementBinding::Wrap(aCx, this, aGivenProto); } -nsSVGElement::LengthInfo SVGRadialGradientElement::sLengthInfo[5] = +nsSVGElement::LengthInfo SVGRadialGradientElement::sLengthInfo[6] = { { &nsGkAtoms::cx, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X }, { &nsGkAtoms::cy, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y }, { &nsGkAtoms::r, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY }, { &nsGkAtoms::fx, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::X }, { &nsGkAtoms::fy, 50, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::Y }, + { &nsGkAtoms::fr, 0, nsIDOMSVGLength::SVG_LENGTHTYPE_PERCENTAGE, SVGContentUtils::XY }, }; //---------------------------------------------------------------------- @@ -252,6 +253,12 @@ SVGRadialGradientElement::Fy() return mLengthAttributes[ATTR_FY].ToDOMAnimatedLength(this); } +already_AddRefed<SVGAnimatedLength> +SVGRadialGradientElement::Fr() +{ + return mLengthAttributes[ATTR_FR].ToDOMAnimatedLength(this); +} + //---------------------------------------------------------------------- // nsSVGElement methods diff --git a/dom/svg/SVGGradientElement.h b/dom/svg/SVGGradientElement.h index 7b2c6b2200..ce9f3b4b1c 100644 --- a/dom/svg/SVGGradientElement.h +++ b/dom/svg/SVGGradientElement.h @@ -139,13 +139,14 @@ public: already_AddRefed<SVGAnimatedLength> R(); already_AddRefed<SVGAnimatedLength> Fx(); already_AddRefed<SVGAnimatedLength> Fy(); + already_AddRefed<SVGAnimatedLength> Fr(); protected: virtual LengthAttributesInfo GetLengthInfo() override; - enum { ATTR_CX, ATTR_CY, ATTR_R, ATTR_FX, ATTR_FY }; - nsSVGLength2 mLengthAttributes[5]; - static LengthInfo sLengthInfo[5]; + enum { ATTR_CX, ATTR_CY, ATTR_R, ATTR_FX, ATTR_FY, ATTR_FR }; + nsSVGLength2 mLengthAttributes[6]; + static LengthInfo sLengthInfo[6]; }; } // namespace dom diff --git a/dom/webidl/SVGRadialGradientElement.webidl b/dom/webidl/SVGRadialGradientElement.webidl index d4a3724f6a..8d7ce90168 100644 --- a/dom/webidl/SVGRadialGradientElement.webidl +++ b/dom/webidl/SVGRadialGradientElement.webidl @@ -21,5 +21,7 @@ interface SVGRadialGradientElement : SVGGradientElement { readonly attribute SVGAnimatedLength fx; [Constant] readonly attribute SVGAnimatedLength fy; - // readonly attribute SVGAnimatedLength fr; + // XXX: Bug 1242048 + // [SameObject] + readonly attribute SVGAnimatedLength fr; }; |