LCOV - code coverage report
Current view: top level - dom/svg - SVGAElement.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 7 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 6 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_SVGAElement_h
       8             : #define mozilla_dom_SVGAElement_h
       9             : 
      10             : #include "Link.h"
      11             : #include "nsSVGString.h"
      12             : #include "mozilla/dom/SVGGraphicsElement.h"
      13             : 
      14             : nsresult NS_NewSVGAElement(nsIContent **aResult,
      15             :                            already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
      16             : 
      17             : namespace mozilla {
      18             : 
      19             : class EventChainPostVisitor;
      20             : class EventChainPreVisitor;
      21             : 
      22             : namespace dom {
      23             : 
      24             : typedef SVGGraphicsElement SVGAElementBase;
      25             : 
      26             : class SVGAElement final : public SVGAElementBase,
      27             :                           public Link
      28             : {
      29             : protected:
      30             :   explicit SVGAElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
      31             :   friend nsresult (::NS_NewSVGAElement(nsIContent **aResult,
      32             :                                        already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
      33             :   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
      34             : 
      35             : public:
      36             :   NS_DECL_ISUPPORTS_INHERITED
      37           0 :   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SVGAElement, SVGAElementBase)
      38             : 
      39             :   // nsINode interface methods
      40             :   virtual nsresult GetEventTargetParent(
      41             :                      EventChainPreVisitor& aVisitor) override;
      42             :   virtual nsresult PostHandleEvent(
      43             :                      EventChainPostVisitor& aVisitor) override;
      44             :   virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
      45             :                          bool aPreallocateChildren) const override;
      46             : 
      47             :   // nsIContent
      48             :   virtual nsresult BindToTree(nsIDocument *aDocument, nsIContent *aParent,
      49             :                               nsIContent *aBindingParent,
      50             :                               bool aCompileEventHandlers) override;
      51             :   virtual void UnbindFromTree(bool aDeep = true,
      52             :                               bool aNullParent = true) override;
      53             :   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const override;
      54             :   virtual int32_t TabIndexDefault() override;
      55             :   virtual bool IsSVGFocusable(bool* aIsFocusable, int32_t* aTabIndex) override;
      56             :   virtual bool IsLink(nsIURI** aURI) const override;
      57             :   virtual void GetLinkTarget(nsAString& aTarget) override;
      58             :   virtual already_AddRefed<nsIURI> GetHrefURI() const override;
      59             :   virtual EventStates IntrinsicState() const override;
      60           0 :   nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
      61             :                    const nsAString& aValue, bool aNotify)
      62             :   {
      63           0 :     return SetAttr(aNameSpaceID, aName, nullptr, aValue, aNotify);
      64             :   }
      65             :   virtual nsresult SetAttr(int32_t aNameSpaceID, nsIAtom* aName,
      66             :                            nsIAtom* aPrefix, const nsAString& aValue,
      67             :                            bool aNotify) override;
      68             :   virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute,
      69             :                              bool aNotify) override;
      70             : 
      71             :   // Link
      72             :   virtual bool ElementHasHref() const override;
      73             : 
      74             :   // WebIDL
      75             :   already_AddRefed<SVGAnimatedString> Href();
      76             :   already_AddRefed<SVGAnimatedString> Target();
      77             :   void GetDownload(nsAString & aDownload);
      78             :   void SetDownload(const nsAString & aDownload, ErrorResult& rv);
      79             : 
      80           0 :   virtual void NodeInfoChanged(nsIDocument* aOldDoc) final override
      81             :   {
      82           0 :     ClearHasPendingLinkUpdate();
      83           0 :     SVGAElementBase::NodeInfoChanged(aOldDoc);
      84           0 :   }
      85             : 
      86             : protected:
      87             :   virtual ~SVGAElement();
      88             : 
      89             :   virtual StringAttributesInfo GetStringInfo() override;
      90             : 
      91             :   enum { HREF, XLINK_HREF, TARGET };
      92             :   nsSVGString mStringAttributes[3];
      93             :   static StringInfo sStringInfo[3];
      94             : };
      95             : 
      96             : } // namespace dom
      97             : } // namespace mozilla
      98             : 
      99             : #endif // mozilla_dom_SVGAElement_h

Generated by: LCOV version 1.13