2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-08-11 01:03:49 +04:00
|
|
|
|
2010-05-27 00:01:10 +04:00
|
|
|
#ifndef NS_SVGPOLYELEMENT_H_
|
|
|
|
#define NS_SVGPOLYELEMENT_H_
|
|
|
|
|
2013-05-30 00:43:41 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2012-01-26 13:57:21 +04:00
|
|
|
#include "nsSVGPathGeometryElement.h"
|
2010-12-08 15:15:53 +03:00
|
|
|
#include "SVGAnimatedPointList.h"
|
2006-08-11 01:03:49 +04:00
|
|
|
|
|
|
|
typedef nsSVGPathGeometryElement nsSVGPolyElementBase;
|
|
|
|
|
2013-01-06 13:32:01 +04:00
|
|
|
namespace mozilla {
|
|
|
|
class DOMSVGPointList;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace mozilla
|
2013-01-06 13:32:01 +04:00
|
|
|
|
2013-01-13 02:21:53 +04:00
|
|
|
class nsSVGPolyElement : public nsSVGPolyElementBase
|
2006-08-11 01:03:49 +04:00
|
|
|
{
|
|
|
|
protected:
|
2014-09-01 05:08:04 +04:00
|
|
|
explicit nsSVGPolyElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
2006-08-11 01:03:49 +04:00
|
|
|
|
2014-07-09 01:23:16 +04:00
|
|
|
virtual ~nsSVGPolyElement();
|
|
|
|
|
2006-08-11 01:03:49 +04:00
|
|
|
public:
|
|
|
|
//interfaces
|
2013-01-13 02:21:53 +04:00
|
|
|
|
2006-08-11 01:03:49 +04:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
|
|
|
// nsIContent interface
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const override;
|
2010-12-08 15:15:53 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual SVGAnimatedPointList* GetAnimatedPointList() override {
|
2010-12-08 15:15:53 +03:00
|
|
|
return &mPoints;
|
|
|
|
}
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIAtom* GetPointListAttrName() const override {
|
2010-12-08 15:15:53 +03:00
|
|
|
return nsGkAtoms::points;
|
|
|
|
}
|
|
|
|
|
2014-02-20 00:46:43 +04:00
|
|
|
// nsSVGElement methods:
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool HasValidDimensions() const override;
|
2014-02-20 00:46:43 +04:00
|
|
|
|
2006-08-11 01:03:49 +04:00
|
|
|
// nsSVGPathGeometryElement methods:
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool AttributeDefinesGeometry(const nsIAtom *aName) override;
|
|
|
|
virtual bool IsMarkable() override { return true; }
|
|
|
|
virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) override;
|
2015-02-03 21:36:32 +03:00
|
|
|
virtual bool GetGeometryBounds(Rect* aBounds, const StrokeOptions& aStrokeOptions,
|
2015-03-21 19:28:04 +03:00
|
|
|
const Matrix& aTransform) override;
|
2006-08-11 01:03:49 +04:00
|
|
|
|
2013-01-06 13:32:01 +04:00
|
|
|
// WebIDL
|
|
|
|
already_AddRefed<mozilla::DOMSVGPointList> Points();
|
|
|
|
already_AddRefed<mozilla::DOMSVGPointList> AnimatedPoints();
|
|
|
|
|
2006-08-11 01:03:49 +04:00
|
|
|
protected:
|
2010-12-08 15:15:53 +03:00
|
|
|
SVGAnimatedPointList mPoints;
|
2006-08-11 01:03:49 +04:00
|
|
|
};
|
|
|
|
|
2010-05-27 00:01:10 +04:00
|
|
|
#endif //NS_SVGPOLYELEMENT_H_
|