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_ServoNamespaceRule_h
8 : #define mozilla_ServoNamespaceRule_h
9 :
10 : #include "mozilla/ServoBindingTypes.h"
11 : #include "mozilla/dom/CSSNamespaceRule.h"
12 :
13 : namespace mozilla {
14 :
15 : class ServoNamespaceRule : public dom::CSSNamespaceRule
16 : {
17 : public:
18 0 : ServoNamespaceRule(already_AddRefed<RawServoNamespaceRule> aRule,
19 : uint32_t aLine, uint32_t aColumn)
20 0 : : CSSNamespaceRule(aLine, aColumn)
21 0 : , mRawRule(Move(aRule))
22 : {
23 0 : }
24 :
25 : NS_DECL_ISUPPORTS_INHERITED
26 :
27 : #ifdef DEBUG
28 : void List(FILE* out = stdout, int32_t aIndent = 0) const final;
29 : #endif
30 : already_AddRefed<Rule> Clone() const final;
31 :
32 : nsIAtom* GetPrefix() const final;
33 : void GetURLSpec(nsString& aURLSpec) const final;
34 :
35 : // WebIDL interface
36 : void GetCssTextImpl(nsAString& aCssText) const final;
37 :
38 : size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
39 :
40 : private:
41 : ~ServoNamespaceRule();
42 :
43 : RefPtr<RawServoNamespaceRule> mRawRule;
44 : };
45 :
46 : } // namespace mozilla
47 :
48 : #endif // mozilla_ServoNamespaceRule_h
|