Bug 1700051: part 46) Const-qualify `mozInlineSpellStatus::mAnchorRange`. r=smaug
[gecko.git] / dom / svg / SVGPolyElement.h
blobe98b86148d3be6a7e0d5db4e4d20348214f4dc86
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_SVGPOLYELEMENT_H_
8 #define DOM_SVG_SVGPOLYELEMENT_H_
10 #include "mozilla/Attributes.h"
11 #include "SVGAnimatedPointList.h"
12 #include "SVGGeometryElement.h"
14 namespace mozilla {
15 namespace dom {
17 class DOMSVGPointList;
19 using SVGPolyElementBase = SVGGeometryElement;
21 class SVGPolyElement : public SVGPolyElementBase {
22 protected:
23 explicit SVGPolyElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
25 virtual ~SVGPolyElement() = default;
27 public:
28 // interfaces
30 NS_INLINE_DECL_REFCOUNTING_INHERITED(SVGPolyElement, SVGPolyElementBase)
32 // nsIContent interface
33 NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* name) const override;
35 virtual SVGAnimatedPointList* GetAnimatedPointList() override {
36 return &mPoints;
38 virtual nsStaticAtom* GetPointListAttrName() const override {
39 return nsGkAtoms::points;
42 // SVGElement methods:
43 virtual bool HasValidDimensions() const override;
45 // SVGGeometryElement methods:
46 virtual bool AttributeDefinesGeometry(const nsAtom* aName) override;
47 virtual bool IsMarkable() override { return true; }
48 virtual void GetMarkPoints(nsTArray<SVGMark>* aMarks) override;
49 virtual bool GetGeometryBounds(
50 Rect* aBounds, const StrokeOptions& aStrokeOptions,
51 const Matrix& aToBoundsSpace,
52 const Matrix* aToNonScalingStrokeSpace = nullptr) override;
54 // WebIDL
55 already_AddRefed<DOMSVGPointList> Points();
56 already_AddRefed<DOMSVGPointList> AnimatedPoints();
58 protected:
59 SVGAnimatedPointList mPoints;
62 } // namespace dom
63 } // namespace mozilla
65 #endif // DOM_SVG_SVGPOLYELEMENT_H_