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_CSSNamespaceRule_h
8 : #define mozilla_dom_CSSNamespaceRule_h
9 :
10 : #include "mozilla/css/Rule.h"
11 : #include "mozilla/dom/CSSNamespaceRuleBinding.h"
12 :
13 : class nsIAtom;
14 :
15 : namespace mozilla {
16 : namespace dom {
17 :
18 0 : class CSSNamespaceRule : public css::Rule
19 : {
20 : protected:
21 64 : using Rule::Rule;
22 :
23 : public:
24 0 : bool IsCCLeaf() const final {
25 0 : return Rule::IsCCLeaf();
26 : }
27 379 : int32_t GetType() const final {
28 379 : return Rule::NAMESPACE_RULE;
29 : }
30 : using Rule::GetType;
31 :
32 : virtual nsIAtom* GetPrefix() const = 0;
33 : virtual void GetURLSpec(nsString& aURLSpec) const = 0;
34 :
35 : // WebIDL interfaces
36 0 : uint16_t Type() const final {
37 0 : return nsIDOMCSSRule::NAMESPACE_RULE;
38 : }
39 :
40 : size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const = 0;
41 :
42 0 : JSObject* WrapObject(JSContext* aCx,
43 : JS::Handle<JSObject*> aGivenProto) final {
44 0 : return CSSNamespaceRuleBinding::Wrap(aCx, this, aGivenProto);
45 : }
46 : };
47 :
48 : } // namespace dom
49 : } // namespace mozilla
50 :
51 : #endif // mozilla_dom_CSSNamespaceRule_h
|