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_CSSKeyframeRule_h
8 : #define mozilla_dom_CSSKeyframeRule_h
9 :
10 : #include "mozilla/css/Rule.h"
11 : #include "nsIDOMCSSKeyframeRule.h"
12 :
13 : namespace mozilla {
14 : namespace dom {
15 :
16 0 : class CSSKeyframeRule : public css::Rule
17 : , public nsIDOMCSSKeyframeRule
18 : {
19 : protected:
20 78 : using css::Rule::Rule;
21 0 : virtual ~CSSKeyframeRule() {}
22 :
23 : public:
24 : NS_DECL_ISUPPORTS_INHERITED
25 :
26 0 : int32_t GetType() const final { return Rule::KEYFRAME_RULE; }
27 : using Rule::GetType;
28 0 : bool IsCCLeaf() const override { return Rule::IsCCLeaf(); }
29 :
30 : // nsIDOMCSSKeyframeRule
31 : NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle) final;
32 :
33 : // WebIDL interface
34 0 : uint16_t Type() const final { return nsIDOMCSSRule::KEYFRAME_RULE; }
35 : // The XPCOM GetKeyText is fine.
36 : // The XPCOM SetKeyText is fine.
37 : virtual nsICSSDeclaration* Style() = 0;
38 :
39 : size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
40 :
41 : JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
42 : };
43 :
44 : } // namespace dom
45 : } // namespace mozilla
46 :
47 : #endif // mozilla_dom_CSSKeyframeRule_h
|