Bug 1890793: Assert CallArgs::newTarget is not gray. r=spidermonkey-reviewers,sfink...
[gecko.git] / dom / svg / DOMSVGAnimatedInteger.h
blobc4c24fed1c91099f21770005cac81a28f4f7510c
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_DOMSVGANIMATEDINTEGER_H_
8 #define DOM_SVG_DOMSVGANIMATEDINTEGER_H_
10 #include "nsWrapperCache.h"
12 #include "SVGElement.h"
14 namespace mozilla::dom {
16 class DOMSVGAnimatedInteger : public nsWrapperCache {
17 public:
18 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedInteger)
19 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedInteger)
21 SVGElement* GetParentObject() const { return mSVGElement; }
23 JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
25 virtual int32_t BaseVal() = 0;
26 virtual void SetBaseVal(int32_t aBaseVal) = 0;
27 virtual int32_t AnimVal() = 0;
29 protected:
30 explicit DOMSVGAnimatedInteger(SVGElement* aSVGElement)
31 : mSVGElement(aSVGElement) {}
32 virtual ~DOMSVGAnimatedInteger() = default;
34 RefPtr<SVGElement> mSVGElement;
37 } // namespace mozilla::dom
39 #endif // DOM_SVG_DOMSVGANIMATEDINTEGER_H_