Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/svg/SVGAnimatedRect.cpp
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#include "SVGAnimatedRect.h"
8
#include "mozilla/dom/SVGAnimatedRectBinding.h"
9
#include "nsSVGElement.h"
10
#include "nsSVGViewBox.h"
11
#include "SVGIRect.h"
12
13
namespace mozilla {
14
namespace dom {
15
16
NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedRect, mSVGElement)
17
18
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(SVGAnimatedRect, AddRef)
19
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(SVGAnimatedRect, Release)
20
21
SVGAnimatedRect::SVGAnimatedRect(nsSVGViewBox* aVal, nsSVGElement* aSVGElement)
22
  : mVal(aVal)
23
  , mSVGElement(aSVGElement)
24
0
{
25
0
}
26
27
SVGAnimatedRect::~SVGAnimatedRect()
28
0
{
29
0
  nsSVGViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
30
0
}
31
32
already_AddRefed<SVGIRect>
33
SVGAnimatedRect::GetBaseVal()
34
0
{
35
0
  return mVal->ToDOMBaseVal(mSVGElement);
36
0
}
37
38
already_AddRefed<SVGIRect>
39
SVGAnimatedRect::GetAnimVal()
40
0
{
41
0
  return mVal->ToDOMAnimVal(mSVGElement);
42
0
}
43
44
JSObject*
45
SVGAnimatedRect::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
46
0
{
47
0
  return SVGAnimatedRect_Binding::Wrap(aCx, this, aGivenProto);
48
0
}
49
50
} // namespace dom
51
} // namespace mozilla