/src/mozilla-central/dom/svg/SVGTextPositioningElement.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/SVGTextPositioningElement.h" |
10 | | #include "SVGAnimatedLengthList.h" |
11 | | #include "DOMSVGAnimatedLengthList.h" |
12 | | #include "DOMSVGAnimatedNumberList.h" |
13 | | #include "SVGContentUtils.h" |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | nsSVGElement::LengthListInfo SVGTextPositioningElement::sLengthListInfo[4] = |
19 | | { |
20 | | { &nsGkAtoms::x, SVGContentUtils::X, false }, |
21 | | { &nsGkAtoms::y, SVGContentUtils::Y, false }, |
22 | | { &nsGkAtoms::dx, SVGContentUtils::X, true }, |
23 | | { &nsGkAtoms::dy, SVGContentUtils::Y, true } |
24 | | }; |
25 | | |
26 | | nsSVGElement::LengthListAttributesInfo |
27 | | SVGTextPositioningElement::GetLengthListInfo() |
28 | 0 | { |
29 | 0 | return LengthListAttributesInfo(mLengthListAttributes, sLengthListInfo, |
30 | 0 | ArrayLength(sLengthListInfo)); |
31 | 0 | } |
32 | | |
33 | | |
34 | | nsSVGElement::NumberListInfo SVGTextPositioningElement::sNumberListInfo[1] = |
35 | | { |
36 | | { &nsGkAtoms::rotate } |
37 | | }; |
38 | | |
39 | | nsSVGElement::NumberListAttributesInfo |
40 | | SVGTextPositioningElement::GetNumberListInfo() |
41 | 0 | { |
42 | 0 | return NumberListAttributesInfo(mNumberListAttributes, sNumberListInfo, |
43 | 0 | ArrayLength(sNumberListInfo)); |
44 | 0 | } |
45 | | |
46 | | //---------------------------------------------------------------------- |
47 | | |
48 | | already_AddRefed<DOMSVGAnimatedLengthList> |
49 | | SVGTextPositioningElement::X() |
50 | 0 | { |
51 | 0 | return DOMSVGAnimatedLengthList::GetDOMWrapper(&mLengthListAttributes[ATTR_X], |
52 | 0 | this, ATTR_X, SVGContentUtils::X); |
53 | 0 | } |
54 | | |
55 | | already_AddRefed<DOMSVGAnimatedLengthList> |
56 | | SVGTextPositioningElement::Y() |
57 | 0 | { |
58 | 0 | return DOMSVGAnimatedLengthList::GetDOMWrapper(&mLengthListAttributes[ATTR_Y], |
59 | 0 | this, ATTR_Y, SVGContentUtils::Y); |
60 | 0 | } |
61 | | |
62 | | already_AddRefed<DOMSVGAnimatedLengthList> |
63 | | SVGTextPositioningElement::Dx() |
64 | 0 | { |
65 | 0 | return DOMSVGAnimatedLengthList::GetDOMWrapper(&mLengthListAttributes[ATTR_DX], |
66 | 0 | this, ATTR_DX, SVGContentUtils::X); |
67 | 0 | } |
68 | | |
69 | | already_AddRefed<DOMSVGAnimatedLengthList> |
70 | | SVGTextPositioningElement::Dy() |
71 | 0 | { |
72 | 0 | return DOMSVGAnimatedLengthList::GetDOMWrapper(&mLengthListAttributes[ATTR_DY], |
73 | 0 | this, ATTR_DY, SVGContentUtils::Y); |
74 | 0 | } |
75 | | |
76 | | already_AddRefed<DOMSVGAnimatedNumberList> |
77 | | SVGTextPositioningElement::Rotate() |
78 | 0 | { |
79 | 0 | return DOMSVGAnimatedNumberList::GetDOMWrapper(&mNumberListAttributes[ROTATE], |
80 | 0 | this, ROTATE); |
81 | 0 | } |
82 | | |
83 | | } // namespace dom |
84 | | } // namespace mozilla |