Bug 1698238 return default dictionary from GetUserMediaRequest#getConstraints() if...
[gecko.git] / layout / style / CSSNamespaceRule.cpp
blob219ff5b7f51dbf68d3ef07f31344f73f240dc598
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 #include "mozilla/dom/CSSNamespaceRule.h"
9 #include "mozilla/ServoBindings.h"
11 using namespace mozilla::dom;
13 namespace mozilla {
15 CSSNamespaceRule::~CSSNamespaceRule() = default;
17 #ifdef DEBUG
18 void CSSNamespaceRule::List(FILE* out, int32_t aIndent) const {
19 nsAutoCString str;
20 for (int32_t i = 0; i < aIndent; i++) {
21 str.AppendLiteral(" ");
23 Servo_NamespaceRule_Debug(mRawRule, &str);
24 fprintf_stderr(out, "%s\n", str.get());
26 #endif
28 nsAtom* CSSNamespaceRule::GetPrefix() const {
29 return Servo_NamespaceRule_GetPrefix(mRawRule);
32 void CSSNamespaceRule::GetURLSpec(nsString& aURLSpec) const {
33 nsAtom* atom = Servo_NamespaceRule_GetURI(mRawRule);
34 atom->ToString(aURLSpec);
37 void CSSNamespaceRule::GetCssText(nsACString& aCssText) const {
38 Servo_NamespaceRule_GetCssText(mRawRule, &aCssText);
41 size_t CSSNamespaceRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
42 return aMallocSizeOf(this);
45 } // namespace mozilla