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_DOMSVGANIMATEDANGLE_H_
8 #define DOM_SVG_DOMSVGANIMATEDANGLE_H_
10 #include "nsWrapperCache.h"
11 #include "SVGElement.h"
12 #include "mozilla/Attributes.h"
16 class SVGAnimatedOrient
;
22 class DOMSVGAnimatedAngle final
: public nsWrapperCache
{
24 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedAngle
)
25 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedAngle
)
27 DOMSVGAnimatedAngle(SVGAnimatedOrient
* aVal
, SVGElement
* aSVGElement
)
28 : mVal(aVal
), mSVGElement(aSVGElement
) {}
31 SVGElement
* GetParentObject() { return mSVGElement
; }
32 JSObject
* WrapObject(JSContext
* aCx
,
33 JS::Handle
<JSObject
*> aGivenProto
) override
;
34 already_AddRefed
<DOMSVGAngle
> BaseVal();
35 already_AddRefed
<DOMSVGAngle
> AnimVal();
38 ~DOMSVGAnimatedAngle();
40 SVGAnimatedOrient
* mVal
; // kept alive because it belongs to content
41 RefPtr
<SVGElement
> mSVGElement
;
45 } // namespace mozilla
47 #endif // DOM_SVG_DOMSVGANIMATEDANGLE_H_