LCOV - code coverage report
Current view: top level - dom/svg - SVGPolyElement.h (source / functions) Hit Total Coverage
Test: output.info Lines: 5 5 100.0 %
Date: 2017-07-14 16:53:18 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef NS_SVGPOLYELEMENT_H_
       8             : #define NS_SVGPOLYELEMENT_H_
       9             : 
      10             : #include "mozilla/Attributes.h"
      11             : #include "SVGAnimatedPointList.h"
      12             : #include "SVGGeometryElement.h"
      13             : 
      14             : namespace mozilla {
      15             : class DOMSVGPointList;
      16             : 
      17             : namespace dom {
      18             : 
      19             : typedef SVGGeometryElement SVGPolyElementBase;
      20             : 
      21             : class SVGPolyElement : public SVGPolyElementBase
      22             : {
      23             : protected:
      24             :   explicit SVGPolyElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
      25             : 
      26             :   virtual ~SVGPolyElement();
      27             : 
      28             : public:
      29             :   //interfaces
      30             : 
      31             :   NS_DECL_ISUPPORTS_INHERITED
      32             : 
      33             :   // nsIContent interface
      34             :   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const override;
      35             : 
      36          14 :   virtual SVGAnimatedPointList* GetAnimatedPointList() override {
      37          14 :     return &mPoints;
      38             :   }
      39          28 :   virtual nsIAtom* GetPointListAttrName() const override {
      40          28 :     return nsGkAtoms::points;
      41             :   }
      42             : 
      43             :   // nsSVGElement methods:
      44             :   virtual bool HasValidDimensions() const override;
      45             : 
      46             :   // SVGGeometryElement methods:
      47             :   virtual bool AttributeDefinesGeometry(const nsIAtom *aName) override;
      48         192 :   virtual bool IsMarkable() override { return true; }
      49             :   virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks) override;
      50             :   virtual bool GetGeometryBounds(Rect* aBounds, const StrokeOptions& aStrokeOptions,
      51             :                                  const Matrix& aToBoundsSpace,
      52             :                                  const Matrix* aToNonScalingStrokeSpace = nullptr) override;
      53             : 
      54             :   // WebIDL
      55             :   already_AddRefed<mozilla::DOMSVGPointList> Points();
      56             :   already_AddRefed<mozilla::DOMSVGPointList> AnimatedPoints();
      57             : 
      58             : protected:
      59             :   SVGAnimatedPointList mPoints;
      60             : };
      61             : 
      62             : } // namespace dom
      63             : } // namespace mozilla
      64             : 
      65             : #endif //NS_SVGPOLYELEMENT_H_

Generated by: LCOV version 1.13