2017-10-27 20:33:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-11-25 04:26:07 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
/* DOM object holding utility CSS functions */
|
|
|
|
|
|
|
|
#include "CSS.h"
|
|
|
|
|
2012-12-03 20:07:49 +04:00
|
|
|
#include "mozilla/dom/BindingDeclarations.h"
|
2016-07-18 11:29:04 +03:00
|
|
|
#include "mozilla/ServoBindings.h"
|
2012-11-25 04:26:07 +04:00
|
|
|
#include "nsGlobalWindow.h"
|
2019-01-02 16:05:23 +03:00
|
|
|
#include "mozilla/dom/Document.h"
|
2014-03-21 07:19:43 +04:00
|
|
|
#include "nsStyleUtil.h"
|
2014-10-30 00:00:48 +03:00
|
|
|
#include "xpcpublic.h"
|
2012-11-25 04:26:07 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2019-02-26 01:09:24 +03:00
|
|
|
/* static */
|
2020-10-09 02:56:14 +03:00
|
|
|
bool CSS::Supports(const GlobalObject&, const nsACString& aProperty,
|
|
|
|
const nsACString& aValue) {
|
|
|
|
return Servo_CSSSupports2(&aProperty, &aValue);
|
2012-11-25 04:26:07 +04:00
|
|
|
}
|
|
|
|
|
2019-02-26 01:09:24 +03:00
|
|
|
/* static */
|
2020-10-09 02:56:14 +03:00
|
|
|
bool CSS::Supports(const GlobalObject&, const nsACString& aCondition) {
|
2020-10-09 06:20:34 +03:00
|
|
|
return Servo_CSSSupports(&aCondition, /* ua = */ false, /* chrome = */ false,
|
|
|
|
/* quirks = */ false);
|
2012-11-25 04:26:07 +04:00
|
|
|
}
|
|
|
|
|
2019-02-26 01:09:24 +03:00
|
|
|
/* static */
|
2020-10-09 06:20:34 +03:00
|
|
|
void CSS::Escape(const GlobalObject&, const nsAString& aIdent,
|
2019-02-26 01:09:24 +03:00
|
|
|
nsAString& aReturn) {
|
2016-01-05 23:05:23 +03:00
|
|
|
nsStyleUtil::AppendEscapedCSSIdent(aIdent, aReturn);
|
2014-03-21 07:19:43 +04:00
|
|
|
}
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|