Bug 1805294 [wpt PR 37463] - WebKit export of https://bugs.webkit.org/show_bug.cgi...
[gecko.git] / dom / svg / SVGTextPositioningElement.h
bloba7b4b4b73dbd545a419aeebe4f7d12336d9e13b8
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 #ifndef DOM_SVG_SVGTEXTPOSITIONINGELEMENT_H_
8 #define DOM_SVG_SVGTEXTPOSITIONINGELEMENT_H_
10 #include "mozilla/dom/SVGTextContentElement.h"
11 #include "SVGAnimatedLengthList.h"
12 #include "SVGAnimatedNumberList.h"
14 namespace mozilla {
15 class SVGAnimatedLengthList;
17 namespace dom {
18 class DOMSVGAnimatedLengthList;
19 class DOMSVGAnimatedNumberList;
20 using SVGTextPositioningElementBase = SVGTextContentElement;
22 class SVGTextPositioningElement : public SVGTextPositioningElementBase {
23 public:
24 // WebIDL
25 already_AddRefed<DOMSVGAnimatedLengthList> X();
26 already_AddRefed<DOMSVGAnimatedLengthList> Y();
27 already_AddRefed<DOMSVGAnimatedLengthList> Dx();
28 already_AddRefed<DOMSVGAnimatedLengthList> Dy();
29 already_AddRefed<DOMSVGAnimatedNumberList> Rotate();
31 protected:
32 explicit SVGTextPositioningElement(
33 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
34 : SVGTextPositioningElementBase(std::move(aNodeInfo)) {}
36 LengthListAttributesInfo GetLengthListInfo() override;
37 NumberListAttributesInfo GetNumberListInfo() override;
39 enum { ATTR_X, ATTR_Y, ATTR_DX, ATTR_DY };
40 SVGAnimatedLengthList mLengthListAttributes[4];
41 static LengthListInfo sLengthListInfo[4];
43 enum { ROTATE };
44 SVGAnimatedNumberList mNumberListAttributes[1];
45 static NumberListInfo sNumberListInfo[1];
48 } // namespace dom
49 } // namespace mozilla
51 #endif // DOM_SVG_SVGTEXTPOSITIONINGELEMENT_H_