Bug 1698238 return default dictionary from GetUserMediaRequest#getConstraints() if...
[gecko.git] / layout / style / CSS.cpp
blob93bd2a9c69be8749b463e380d4e16419a2b71dd2
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 /* DOM object holding utility CSS functions */
9 #include "CSS.h"
11 #include "mozilla/dom/BindingDeclarations.h"
12 #include "mozilla/ServoBindings.h"
13 #include "nsGlobalWindow.h"
14 #include "mozilla/dom/Document.h"
15 #include "nsStyleUtil.h"
16 #include "xpcpublic.h"
18 namespace mozilla {
19 namespace dom {
21 /* static */
22 bool CSS::Supports(const GlobalObject&, const nsACString& aProperty,
23 const nsACString& aValue) {
24 return Servo_CSSSupports2(&aProperty, &aValue);
27 /* static */
28 bool CSS::Supports(const GlobalObject&, const nsACString& aCondition) {
29 return Servo_CSSSupports(&aCondition, /* ua = */ false, /* chrome = */ false,
30 /* quirks = */ false);
33 /* static */
34 void CSS::Escape(const GlobalObject&, const nsAString& aIdent,
35 nsAString& aReturn) {
36 nsStyleUtil::AppendEscapedCSSIdent(aIdent, aReturn);
39 } // namespace dom
40 } // namespace mozilla