Bumping manifests a=b2g-bump
[gecko.git] / dom / svg / SVGAnimatedRect.cpp
blob47555df4bf56cffd5c1188651e9b694339a1cc41
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "SVGAnimatedRect.h"
7 #include "mozilla/dom/SVGAnimatedRectBinding.h"
8 #include "nsSVGElement.h"
9 #include "nsSVGViewBox.h"
10 #include "SVGIRect.h"
12 namespace mozilla {
13 namespace dom {
15 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedRect, mSVGElement)
17 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedRect, AddRef)
18 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedRect, Release)
20 SVGAnimatedRect::SVGAnimatedRect(nsSVGViewBox* aVal, nsSVGElement* aSVGElement)
21 : mVal(aVal)
22 , mSVGElement(aSVGElement)
26 SVGAnimatedRect::~SVGAnimatedRect()
28 nsSVGViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
31 already_AddRefed<SVGIRect>
32 SVGAnimatedRect::GetBaseVal()
34 return mVal->ToDOMBaseVal(mSVGElement);
37 already_AddRefed<SVGIRect>
38 SVGAnimatedRect::GetAnimVal()
40 return mVal->ToDOMAnimVal(mSVGElement);
43 JSObject*
44 SVGAnimatedRect::WrapObject(JSContext* aCx)
46 return SVGAnimatedRectBinding::Wrap(aCx, this);
49 } // namespace dom
50 } // namespace mozilla