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_DOMSVGANIMATEDLENGTH_H_
8 #define DOM_SVG_DOMSVGANIMATEDLENGTH_H_
10 #include "mozilla/Attributes.h"
11 #include "SVGElement.h"
15 class SVGAnimatedLength
;
21 class DOMSVGAnimatedLength final
: public nsWrapperCache
{
23 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedLength
)
24 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedLength
)
26 DOMSVGAnimatedLength(SVGAnimatedLength
* aVal
, SVGElement
* aSVGElement
)
27 : mVal(aVal
), mSVGElement(aSVGElement
) {}
30 SVGElement
* GetParentObject() { return mSVGElement
; }
31 JSObject
* WrapObject(JSContext
* aCx
,
32 JS::Handle
<JSObject
*> aGivenProto
) override
;
33 already_AddRefed
<DOMSVGLength
> BaseVal();
34 already_AddRefed
<DOMSVGLength
> AnimVal();
37 ~DOMSVGAnimatedLength();
39 SVGAnimatedLength
* mVal
; // kept alive because it belongs to content
40 RefPtr
<SVGElement
> mSVGElement
;
44 } // namespace mozilla
46 #endif // DOM_SVG_DOMSVGANIMATEDLENGTH_H_