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 : #include "mozilla/dom/CSSKeyframesRule.h"
8 :
9 : #include "mozilla/dom/CSSKeyframesRuleBinding.h"
10 :
11 : namespace mozilla {
12 : namespace dom {
13 :
14 62 : NS_IMPL_ADDREF_INHERITED(CSSKeyframesRule, css::GroupRule)
15 31 : NS_IMPL_RELEASE_INHERITED(CSSKeyframesRule, css::GroupRule)
16 :
17 : // QueryInterface implementation for CSSKeyframesRule
18 31 : NS_INTERFACE_MAP_BEGIN(CSSKeyframesRule)
19 31 : NS_INTERFACE_MAP_ENTRY(nsIDOMCSSKeyframesRule)
20 31 : NS_INTERFACE_MAP_END_INHERITING(GroupRule)
21 :
22 : NS_IMETHODIMP
23 0 : CSSKeyframesRule::GetCssRules(nsIDOMCSSRuleList** aRuleList)
24 : {
25 0 : NS_ADDREF(*aRuleList = CssRules());
26 0 : return NS_OK;
27 : }
28 :
29 : NS_IMETHODIMP
30 0 : CSSKeyframesRule::FindRule(const nsAString& aKey,
31 : nsIDOMCSSKeyframeRule** aResult)
32 : {
33 0 : NS_IF_ADDREF(*aResult = FindRule(aKey));
34 0 : return NS_OK;
35 : }
36 :
37 : /* virtual */ bool
38 0 : CSSKeyframesRule::UseForPresentation(nsPresContext* aPresContext,
39 : nsMediaQueryResultCacheKey& aKey)
40 : {
41 0 : MOZ_ASSERT_UNREACHABLE("should not be called");
42 : return false;
43 : }
44 :
45 : /* virtual */ JSObject*
46 0 : CSSKeyframesRule::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
47 : {
48 0 : return CSSKeyframesRuleBinding::Wrap(aCx, this, aGivenProto);
49 : }
50 :
51 : } // namespace dom
52 : } // namespace mozilla
|