no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / svg / SVGAnimateMotionElement.h
blob4f9f219aaa141be74d0df09548001507777f533b
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_SVG_SVGANIMATEMOTIONELEMENT_H_
8 #define DOM_SVG_SVGANIMATEMOTIONELEMENT_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/dom/SVGAnimationElement.h"
12 #include "SVGMotionSMILAnimationFunction.h"
14 nsresult NS_NewSVGAnimateMotionElement(
15 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
17 namespace mozilla::dom {
19 class SVGAnimateMotionElement final : public SVGAnimationElement {
20 protected:
21 explicit SVGAnimateMotionElement(
22 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
24 SVGMotionSMILAnimationFunction mAnimationFunction;
25 friend nsresult(::NS_NewSVGAnimateMotionElement(
26 nsIContent** aResult,
27 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
29 JSObject* WrapNode(JSContext* aCx,
30 JS::Handle<JSObject*> aGivenProto) override;
32 public:
33 NS_IMPL_FROMNODE_WITH_TAG(SVGAnimateMotionElement, kNameSpaceID_SVG,
34 animateMotion)
36 // nsINode specializations
37 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
39 // SVGAnimationElement
40 SMILAnimationFunction& AnimationFunction() override;
41 bool GetTargetAttributeName(int32_t* aNamespaceID,
42 nsAtom** aLocalName) const override;
44 // SVGElement
45 nsStaticAtom* GetPathDataAttrName() const override { return nsGkAtoms::path; }
47 // Utility method to let our <mpath> children tell us when they've changed,
48 // so we can make sure our mAnimationFunction is marked as having changed.
49 void MpathChanged() { mAnimationFunction.MpathChanged(); }
52 } // namespace mozilla::dom
54 #endif // DOM_SVG_SVGANIMATEMOTIONELEMENT_H_