LCOV - code coverage report
Current view: top level - dom/svg - SVGFEImageElement.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 4 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 4 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_SVGFEImageElement_h
       8             : #define mozilla_dom_SVGFEImageElement_h
       9             : 
      10             : #include "nsSVGFilters.h"
      11             : #include "SVGAnimatedPreserveAspectRatio.h"
      12             : 
      13             : class SVGFEImageFrame;
      14             : 
      15             : nsresult NS_NewSVGFEImageElement(nsIContent **aResult,
      16             :                                  already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
      17             : 
      18             : namespace mozilla {
      19             : namespace dom {
      20             : 
      21             : typedef nsSVGFE SVGFEImageElementBase;
      22             : 
      23             : class SVGFEImageElement final : public SVGFEImageElementBase,
      24             :                                 public nsImageLoadingContent
      25             : {
      26             :   friend class ::SVGFEImageFrame;
      27             : 
      28             : protected:
      29             :   friend nsresult (::NS_NewSVGFEImageElement(nsIContent **aResult,
      30             :                                              already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
      31             :   explicit SVGFEImageElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
      32             :   virtual ~SVGFEImageElement();
      33             :   virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
      34             : 
      35             : public:
      36           0 :   virtual bool SubregionIsUnionOfRegions() override { return false; }
      37             : 
      38             :   // interfaces:
      39             :   NS_DECL_ISUPPORTS_INHERITED
      40             : 
      41             :   // EventTarget
      42             :   virtual void AsyncEventRunning(AsyncEventDispatcher* aEvent) override;
      43             : 
      44             :   virtual FilterPrimitiveDescription
      45             :     GetPrimitiveDescription(nsSVGFilterInstance* aInstance,
      46             :                             const IntRect& aFilterSubregion,
      47             :                             const nsTArray<bool>& aInputsAreTainted,
      48             :                             nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
      49             :   virtual bool AttributeAffectsRendering(
      50             :           int32_t aNameSpaceID, nsIAtom* aAttribute) const override;
      51           0 :   virtual nsSVGString& GetResultImageName() override { return mStringAttributes[RESULT]; }
      52             :   virtual bool OutputIsTainted(const nsTArray<bool>& aInputsAreTainted,
      53             :                                nsIPrincipal* aReferencePrincipal) override;
      54             : 
      55             :   // nsIContent
      56             :   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const override;
      57             : 
      58             :   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
      59             :                          bool aPreallocateChildren) const override;
      60             : 
      61             :   virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
      62             :                                 const nsAttrValue* aValue,
      63             :                                 const nsAttrValue* aOldValue,
      64             :                                 bool aNotify) override;
      65             :   virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
      66             :                               nsIContent* aBindingParent,
      67             :                               bool aCompileEventHandlers) override;
      68             :   virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
      69             :   virtual EventStates IntrinsicState() const override;
      70             : 
      71             :   NS_IMETHOD Notify(imgIRequest *aRequest, int32_t aType, const nsIntRect* aData) override;
      72             : 
      73             :   void MaybeLoadSVGImage();
      74             : 
      75             :   // WebIDL
      76             :   already_AddRefed<SVGAnimatedString> Href();
      77             :   already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
      78             : 
      79             : private:
      80             :   // Invalidate users of the filter containing this element.
      81             :   void Invalidate();
      82             : 
      83             :   nsresult LoadSVGImage(bool aForce, bool aNotify);
      84             : 
      85             : protected:
      86           0 :   virtual bool ProducesSRGB() override { return true; }
      87             : 
      88             :   virtual SVGAnimatedPreserveAspectRatio *GetPreserveAspectRatio() override;
      89             :   virtual StringAttributesInfo GetStringInfo() override;
      90             : 
      91             :   // Override for nsImageLoadingContent.
      92           0 :   nsIContent* AsContent() override { return this; }
      93             : 
      94             :   enum { RESULT, HREF, XLINK_HREF };
      95             :   nsSVGString mStringAttributes[3];
      96             :   static StringInfo sStringInfo[3];
      97             : 
      98             :   SVGAnimatedPreserveAspectRatio mPreserveAspectRatio;
      99             : };
     100             : 
     101             : } // namespace dom
     102             : } // namespace mozilla
     103             : 
     104             : #endif

Generated by: LCOV version 1.13