LCOV - code coverage report
Current view: top level - dom/svg - SVGPatternElement.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 3 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 3 0.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 mozilla_dom_SVGPatternElement_h
       8             : #define mozilla_dom_SVGPatternElement_h
       9             : 
      10             : #include "nsAutoPtr.h"
      11             : #include "nsSVGEnum.h"
      12             : #include "nsSVGLength2.h"
      13             : #include "nsSVGString.h"
      14             : #include "nsSVGElement.h"
      15             : #include "nsSVGViewBox.h"
      16             : #include "SVGAnimatedPreserveAspectRatio.h"
      17             : #include "nsSVGAnimatedTransformList.h"
      18             : 
      19             : class nsSVGPatternFrame;
      20             : 
      21             : nsresult NS_NewSVGPatternElement(nsIContent **aResult,
      22             :                                  already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
      23             : 
      24             : namespace mozilla {
      25             : namespace dom {
      26             : class SVGAnimatedTransformList;
      27             : 
      28             : typedef nsSVGElement SVGPatternElementBase;
      29             : 
      30           0 : class SVGPatternElement final : public SVGPatternElementBase
      31             : {
      32             :   friend class ::nsSVGPatternFrame;
      33             : 
      34             : protected:
      35             :   friend nsresult (::NS_NewSVGPatternElement(nsIContent **aResult,
      36             :                                              already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
      37             :   explicit SVGPatternElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
      38             :   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
      39             : 
      40             : public:
      41             :   typedef mozilla::SVGAnimatedPreserveAspectRatio SVGAnimatedPreserveAspectRatio;
      42             : 
      43             :   // nsIContent interface
      44             :   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* name) const override;
      45             : 
      46             :   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
      47             :                          bool aPreallocateChildren) const override;
      48             : 
      49             :   // nsSVGSVGElement methods:
      50             :   virtual bool HasValidDimensions() const override;
      51             : 
      52             :   virtual mozilla::nsSVGAnimatedTransformList*
      53             :     GetAnimatedTransformList(uint32_t aFlags = 0) override;
      54           0 :   virtual nsIAtom* GetTransformListAttrName() const override {
      55           0 :     return nsGkAtoms::patternTransform;
      56             :   }
      57             : 
      58             :   // WebIDL
      59             :   already_AddRefed<SVGAnimatedRect> ViewBox();
      60             :   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
      61             :   already_AddRefed<SVGAnimatedEnumeration> PatternUnits();
      62             :   already_AddRefed<SVGAnimatedEnumeration> PatternContentUnits();
      63             :   already_AddRefed<SVGAnimatedTransformList> PatternTransform();
      64             :   already_AddRefed<SVGAnimatedLength> X();
      65             :   already_AddRefed<SVGAnimatedLength> Y();
      66             :   already_AddRefed<SVGAnimatedLength> Width();
      67             :   already_AddRefed<SVGAnimatedLength> Height();
      68             :   already_AddRefed<SVGAnimatedString> Href();
      69             : 
      70             : protected:
      71             : 
      72             :   virtual LengthAttributesInfo GetLengthInfo() override;
      73             :   virtual EnumAttributesInfo GetEnumInfo() override;
      74             :   virtual nsSVGViewBox *GetViewBox() override;
      75             :   virtual SVGAnimatedPreserveAspectRatio *GetPreserveAspectRatio() override;
      76             :   virtual StringAttributesInfo GetStringInfo() override;
      77             : 
      78             :   enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
      79             :   nsSVGLength2 mLengthAttributes[4];
      80             :   static LengthInfo sLengthInfo[4];
      81             : 
      82             :   enum { PATTERNUNITS, PATTERNCONTENTUNITS };
      83             :   nsSVGEnum mEnumAttributes[2];
      84             :   static EnumInfo sEnumInfo[2];
      85             : 
      86             :   nsAutoPtr<mozilla::nsSVGAnimatedTransformList> mPatternTransform;
      87             : 
      88             :   enum { HREF, XLINK_HREF };
      89             :   nsSVGString mStringAttributes[2];
      90             :   static StringInfo sStringInfo[2];
      91             : 
      92             :   // SVGFitToViewbox properties
      93             :   nsSVGViewBox mViewBox;
      94             :   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
      95             : };
      96             : 
      97             : } // namespace dom
      98             : } // namespace mozilla
      99             : 
     100             : #endif // mozilla_dom_SVGPatternElement_h

Generated by: LCOV version 1.13