Bug 1635304 [wpt PR 23392] - Remove erroneous named properties object test, a=testonly
[gecko.git] / dom / svg / SVGAnimateMotionElement.h
blobbc3f0c36e4cea59c7e1baf6dcd8bc7b14b39955e
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 mozilla_dom_SVGAnimateMotionElement_h
8 #define mozilla_dom_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 {
18 namespace dom {
20 class SVGAnimateMotionElement final : public SVGAnimationElement {
21 protected:
22 explicit SVGAnimateMotionElement(
23 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
25 SVGMotionSMILAnimationFunction mAnimationFunction;
26 friend nsresult(::NS_NewSVGAnimateMotionElement(
27 nsIContent** aResult,
28 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
30 virtual JSObject* WrapNode(JSContext* aCx,
31 JS::Handle<JSObject*> aGivenProto) override;
33 public:
34 // nsINode specializations
35 virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
37 // SVGAnimationElement
38 virtual SMILAnimationFunction& AnimationFunction() override;
39 virtual bool GetTargetAttributeName(int32_t* aNamespaceID,
40 nsAtom** aLocalName) const override;
42 // SVGElement
43 virtual nsStaticAtom* GetPathDataAttrName() const override {
44 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 dom
53 } // namespace mozilla
55 #endif // mozilla_dom_SVGAnimateMotionElement_h