Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/svg/SVGClipPathElement.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 "mozilla/ArrayUtils.h"
8
9
#include "mozilla/dom/SVGClipPathElement.h"
10
#include "mozilla/dom/SVGClipPathElementBinding.h"
11
#include "mozilla/dom/SVGUnitTypesBinding.h"
12
#include "nsGkAtoms.h"
13
14
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(ClipPath)
15
16
namespace mozilla {
17
namespace dom {
18
19
using namespace SVGUnitTypes_Binding;
20
21
JSObject*
22
SVGClipPathElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
23
0
{
24
0
  return SVGClipPathElement_Binding::Wrap(aCx, this, aGivenProto);
25
0
}
26
27
nsSVGElement::EnumInfo SVGClipPathElement::sEnumInfo[1] =
28
{
29
  { &nsGkAtoms::clipPathUnits,
30
    sSVGUnitTypesMap,
31
    SVG_UNIT_TYPE_USERSPACEONUSE
32
  }
33
};
34
35
//----------------------------------------------------------------------
36
// Implementation
37
38
SVGClipPathElement::SVGClipPathElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
39
  : SVGClipPathElementBase(std::move(aNodeInfo))
40
0
{
41
0
}
42
43
already_AddRefed<SVGAnimatedEnumeration>
44
SVGClipPathElement::ClipPathUnits()
45
0
{
46
0
  return mEnumAttributes[CLIPPATHUNITS].ToDOMAnimatedEnum(this);
47
0
}
48
49
nsSVGElement::EnumAttributesInfo
50
SVGClipPathElement::GetEnumInfo()
51
0
{
52
0
  return EnumAttributesInfo(mEnumAttributes, sEnumInfo,
53
0
                            ArrayLength(sEnumInfo));
54
0
}
55
56
bool
57
SVGClipPathElement::IsUnitsObjectBoundingBox() const
58
0
{
59
0
  return mEnumAttributes[CLIPPATHUNITS].GetAnimValue() == SVG_UNIT_TYPE_OBJECTBOUNDINGBOX;
60
0
}
61
62
63
//----------------------------------------------------------------------
64
// nsINode methods
65
66
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGClipPathElement)
67
68
} // namespace dom
69
} // namespace mozilla