no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / layout / style / CSSPropertyRule.h
blobca6d5a12f2a07ce68265faf03061ee8046a482c1
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/. */
7 #ifndef mozilla_dom_CSSPropertyRule_h
8 #define mozilla_dom_CSSPropertyRule_h
10 #include "mozilla/css/Rule.h"
11 #include "mozilla/ServoBindingTypes.h"
13 #include "nsICSSDeclaration.h"
15 struct StylePropertyRule;
17 namespace mozilla::dom {
19 class CSSPropertyRule final : public css::Rule {
20 public:
21 CSSPropertyRule(already_AddRefed<StylePropertyRule> aRawRule,
22 StyleSheet* aSheet, css::Rule* aParentRule, uint32_t aLine,
23 uint32_t aColumn)
24 : css::Rule(aSheet, aParentRule, aLine, aColumn),
25 mRawRule(std::move(aRawRule)) {}
27 bool IsCCLeaf() const final;
29 StylePropertyRule* Raw() const { return mRawRule; }
30 void SetRawAfterClone(RefPtr<StylePropertyRule> aRaw);
32 JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
34 #ifdef DEBUG
35 void List(FILE* out = stdout, int32_t aIndent = 0) const final;
36 #endif
38 size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
40 // WebIDL interfaces
41 StyleCssRuleType Type() const final;
43 void GetName(nsACString& aName) const;
45 void GetSyntax(nsACString& aSyntax) const;
47 bool Inherits() const;
49 void GetInitialValue(nsACString& aInitialValueStr) const;
51 void GetCssText(nsACString& aCssText) const final;
53 private:
54 ~CSSPropertyRule() = default;
56 RefPtr<StylePropertyRule> mRawRule;
59 } // namespace mozilla::dom
61 #endif // mozilla_dom_CSSPropertyRule_h