Bug 1890793: Assert CallArgs::newTarget is not gray. r=spidermonkey-reviewers,sfink...
[gecko.git] / dom / svg / DOMSVGAnimatedAngle.h
blobd5190010fa91ad2102b95e9bc755102d39027f5d
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"
14 namespace mozilla {
16 class SVGAnimatedOrient;
18 namespace dom {
20 class DOMSVGAngle;
22 class DOMSVGAnimatedAngle final : public nsWrapperCache {
23 public:
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) {}
30 // WebIDL
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();
37 protected:
38 ~DOMSVGAnimatedAngle();
40 SVGAnimatedOrient* mVal; // kept alive because it belongs to content
41 RefPtr<SVGElement> mSVGElement;
44 } // namespace dom
45 } // namespace mozilla
47 #endif // DOM_SVG_DOMSVGANIMATEDANGLE_H_