Bug 1444460 [wpt PR 9948] - gyroscope: Rename LocalCoordinateSystem to GyroscopeLocal...
[gecko.git] / dom / svg / SVGAnimatedLength.h
blobb1e02fa4e24e410f7c30229341144fd308ab235a
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_SVGAnimatedLength_h
8 #define mozilla_dom_SVGAnimatedLength_h
10 #include "mozilla/Attributes.h"
11 #include "nsSVGElement.h"
13 class nsSVGLength2;
15 namespace mozilla {
17 class DOMSVGLength;
19 namespace dom {
21 class SVGAnimatedLength final : public nsWrapperCache
23 public:
24 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(SVGAnimatedLength)
25 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(SVGAnimatedLength)
27 SVGAnimatedLength(nsSVGLength2* aVal, nsSVGElement *aSVGElement)
28 : mVal(aVal), mSVGElement(aSVGElement)
32 // WebIDL
33 nsSVGElement* GetParentObject() { return mSVGElement; }
34 virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
35 already_AddRefed<DOMSVGLength> BaseVal();
36 already_AddRefed<DOMSVGLength> AnimVal();
38 protected:
39 ~SVGAnimatedLength();
41 nsSVGLength2* mVal; // kept alive because it belongs to content
42 RefPtr<nsSVGElement> mSVGElement;
45 } // namespace dom
46 } // namespace mozilla
48 #endif // mozilla_dom_SVGAnimatedLength_h