Bug 1691109 [wpt PR 27513] - Increase timeout duration for wpt/fetch/api/basic/keepal...
[gecko.git] / dom / svg / SVGAnimateMotionElement.h
blob4841ef34299be2077b71a41a3dc36b41b58e6121
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 {
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 // DOM_SVG_SVGANIMATEMOTIONELEMENT_H_