Bug 1698238 return default dictionary from GetUserMediaRequest#getConstraints() if...
[gecko.git] / dom / svg / SVGAnimatedRect.cpp
blobf7a4aa00fb00119f75cafa0c9c489bfe654ded32
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 #include "SVGAnimatedRect.h"
8 #include "mozilla/dom/SVGAnimatedRectBinding.h"
9 #include "mozilla/dom/SVGElement.h"
10 #include "mozilla/dom/SVGRect.h"
11 #include "SVGAnimatedViewBox.h"
13 namespace mozilla {
14 namespace dom {
16 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedRect, mSVGElement)
18 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedRect, AddRef)
19 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedRect, Release)
21 SVGAnimatedRect::SVGAnimatedRect(SVGAnimatedViewBox* aVal,
22 SVGElement* aSVGElement)
23 : mVal(aVal), mSVGElement(aSVGElement) {}
25 SVGAnimatedRect::~SVGAnimatedRect() {
26 SVGAnimatedViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
29 already_AddRefed<SVGRect> SVGAnimatedRect::GetBaseVal() {
30 return mVal->ToDOMBaseVal(mSVGElement);
33 already_AddRefed<SVGRect> SVGAnimatedRect::GetAnimVal() {
34 return mVal->ToDOMAnimVal(mSVGElement);
37 JSObject* SVGAnimatedRect::WrapObject(JSContext* aCx,
38 JS::Handle<JSObject*> aGivenProto) {
39 return SVGAnimatedRect_Binding::Wrap(aCx, this, aGivenProto);
42 } // namespace dom
43 } // namespace mozilla