Bug 1700051: part 46) Const-qualify `mozInlineSpellStatus::mAnchorRange`. r=smaug
[gecko.git] / dom / svg / SVGMotionSMILAttr.h
blob6bea99d5160dd949762f4f22cbc090117935a304
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 /* representation of a dummy attribute targeted by <animateMotion> element */
9 #ifndef DOM_SVG_SVGMOTIONSMILATTR_H_
10 #define DOM_SVG_SVGMOTIONSMILATTR_H_
12 #include "mozilla/Attributes.h"
13 #include "mozilla/SMILAttr.h"
15 class nsIContent;
17 namespace mozilla {
19 class SMILValue;
21 namespace dom {
22 class SVGAnimationElement;
23 class SVGElement;
24 } // namespace dom
26 /**
27 * SVGMotionSMILAttr: Implements the SMILAttr interface for SMIL animations
28 * from <animateMotion>.
30 * NOTE: Even though there's technically no "motion" attribute, we behave in
31 * many ways as if there were, for simplicity.
33 class SVGMotionSMILAttr : public SMILAttr {
34 public:
35 explicit SVGMotionSMILAttr(dom::SVGElement* aSVGElement)
36 : mSVGElement(aSVGElement) {}
38 // SMILAttr methods
39 virtual nsresult ValueFromString(
40 const nsAString& aStr, const dom::SVGAnimationElement* aSrcElement,
41 SMILValue& aValue, bool& aPreventCachingOfSandwich) const override;
42 virtual SMILValue GetBaseValue() const override;
43 virtual nsresult SetAnimValue(const SMILValue& aValue) override;
44 virtual void ClearAnimValue() override;
45 virtual const nsIContent* GetTargetNode() const override;
47 protected:
48 // Raw pointers are OK here because this SVGMotionSMILAttr is both
49 // created & destroyed during a SMIL sample-step, during which time the DOM
50 // isn't modified.
51 dom::SVGElement* mSVGElement;
54 } // namespace mozilla
56 #endif // DOM_SVG_SVGMOTIONSMILATTR_H_