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 /dom | |
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 '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 86a6fa99c..91427fabb 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 1bcac67e6..93767c934 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 7b2c6b220..ce9f3b4b1 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 d4a3724f6..8d7ce9016 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; }; |