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

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       5             : 
       6             : /* class for CSS @namespace rules */
       7             : 
       8             : #ifndef mozilla_css_NameSpaceRule_h__
       9             : #define mozilla_css_NameSpaceRule_h__
      10             : 
      11             : #include "mozilla/Attributes.h"
      12             : #include "mozilla/MemoryReporting.h"
      13             : #include "mozilla/dom/CSSNamespaceRule.h"
      14             : 
      15             : #include "nsIDOMCSSRule.h"
      16             : 
      17             : class nsIAtom;
      18             : 
      19             : // IID for the NameSpaceRule class {f0b0dbe1-5031-4a21-b06a-dc141ef2af98}
      20             : #define NS_CSS_NAMESPACE_RULE_IMPL_CID     \
      21             : {0xf0b0dbe1, 0x5031, 0x4a21, {0xb0, 0x6a, 0xdc, 0x14, 0x1e, 0xf2, 0xaf, 0x98}}
      22             : 
      23             : 
      24             : namespace mozilla {
      25             : namespace css {
      26             : 
      27             : class NameSpaceRule final : public dom::CSSNamespaceRule
      28             : {
      29             : public:
      30             :   NameSpaceRule(nsIAtom* aPrefix, const nsString& aURLSpec,
      31             :                 uint32_t aLineNumber, uint32_t aColumnNumber);
      32             : private:
      33             :   // for |Clone|
      34             :   NameSpaceRule(const NameSpaceRule& aCopy);
      35             :   ~NameSpaceRule();
      36             : public:
      37             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_CSS_NAMESPACE_RULE_IMPL_CID)
      38             : 
      39             :   NS_DECL_ISUPPORTS_INHERITED
      40             : 
      41             : #ifdef DEBUG
      42             :   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
      43             : #endif
      44             :   virtual already_AddRefed<Rule> Clone() const override;
      45             : 
      46          64 :   nsIAtom* GetPrefix() const final { return mPrefix; }
      47          64 :   void GetURLSpec(nsString& aURLSpec) const final { aURLSpec = mURLSpec; }
      48             : 
      49             :   // WebIDL interface
      50             :   void GetCssTextImpl(nsAString& aCssText) const override;
      51             : 
      52             :   size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
      53             : 
      54             : private:
      55             :   nsCOMPtr<nsIAtom> mPrefix;
      56             :   nsString          mURLSpec;
      57             : };
      58             : 
      59             : NS_DEFINE_STATIC_IID_ACCESSOR(NameSpaceRule, NS_CSS_NAMESPACE_RULE_IMPL_CID)
      60             : 
      61             : } // namespace css
      62             : } // namespace mozilla
      63             : 
      64             : #endif /* mozilla_css_NameSpaceRule_h__ */

Generated by: LCOV version 1.13