/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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 */ #ifndef mozilla_dom_CSS_h_ #define mozilla_dom_CSS_h_ #include "mozilla/dom/CSSUnitValueBindingFwd.h" #include "nsStringFwd.h" template struct already_AddRefed; namespace mozilla { class ErrorResult; namespace dom { class GlobalObject; class HighlightRegistry; struct PropertyDefinition; class CSS { public: CSS() = delete; static bool Supports(const GlobalObject&, const nsACString& aProperty, const nsACString& aValue); static bool Supports(const GlobalObject&, const nsACString& aDeclaration); static void Escape(const GlobalObject&, const nsAString& aIdent, nsAString& aReturn); static HighlightRegistry* GetHighlights(const GlobalObject& aGlobal, ErrorResult& aRv); static void RegisterProperty(const GlobalObject&, const PropertyDefinition&, ErrorResult&); // start of CSS Typed OM Web IDL declarations static already_AddRefed Number(const GlobalObject& aGlobal, double aValue); static already_AddRefed Percent(const GlobalObject& aGlobal, double aValue); // static already_AddRefed Cap(const GlobalObject& aGlobal, double aValue); static already_AddRefed Ch(const GlobalObject& aGlobal, double aValue); static already_AddRefed Em(const GlobalObject& aGlobal, double aValue); static already_AddRefed Ex(const GlobalObject& aGlobal, double aValue); static already_AddRefed Ic(const GlobalObject& aGlobal, double aValue); static already_AddRefed Lh(const GlobalObject& aGlobal, double aValue); static already_AddRefed Rcap(const GlobalObject& aGlobal, double aValue); static already_AddRefed Rch(const GlobalObject& aGlobal, double aValue); static already_AddRefed Rem(const GlobalObject& aGlobal, double aValue); static already_AddRefed Rex(const GlobalObject& aGlobal, double aValue); static already_AddRefed Ric(const GlobalObject& aGlobal, double aValue); static already_AddRefed Rlh(const GlobalObject& aGlobal, double aValue); static already_AddRefed Vw(const GlobalObject& aGlobal, double aValue); static already_AddRefed Vh(const GlobalObject& aGlobal, double aValue); static already_AddRefed Vi(const GlobalObject& aGlobal, double aValue); static already_AddRefed Vb(const GlobalObject& aGlobal, double aValue); static already_AddRefed Vmin(const GlobalObject& aGlobal, double aValue); static already_AddRefed Vmax(const GlobalObject& aGlobal, double aValue); static already_AddRefed Svw(const GlobalObject& aGlobal, double aValue); static already_AddRefed Svh(const GlobalObject& aGlobal, double aValue); static already_AddRefed Svi(const GlobalObject& aGlobal, double aValue); static already_AddRefed Svb(const GlobalObject& aGlobal, double aValue); static already_AddRefed Svmin(const GlobalObject& aGlobal, double aValue); static already_AddRefed Svmax(const GlobalObject& aGlobal, double aValue); static already_AddRefed Lvw(const GlobalObject& aGlobal, double aValue); static already_AddRefed Lvh(const GlobalObject& aGlobal, double aValue); static already_AddRefed Lvi(const GlobalObject& aGlobal, double aValue); static already_AddRefed Lvb(const GlobalObject& aGlobal, double aValue); static already_AddRefed Lvmin(const GlobalObject& aGlobal, double aValue); static already_AddRefed Lvmax(const GlobalObject& aGlobal, double aValue); static already_AddRefed Dvw(const GlobalObject& aGlobal, double aValue); static already_AddRefed Dvh(const GlobalObject& aGlobal, double aValue); static already_AddRefed Dvi(const GlobalObject& aGlobal, double aValue); static already_AddRefed Dvb(const GlobalObject& aGlobal, double aValue); static already_AddRefed Dvmin(const GlobalObject& aGlobal, double aValue); static already_AddRefed Dvmax(const GlobalObject& aGlobal, double aValue); static already_AddRefed Cqw(const GlobalObject& aGlobal, double aValue); static already_AddRefed Cqh(const GlobalObject& aGlobal, double aValue); static already_AddRefed Cqi(const GlobalObject& aGlobal, double aValue); static already_AddRefed Cqb(const GlobalObject& aGlobal, double aValue); static already_AddRefed Cqmin(const GlobalObject& aGlobal, double aValue); static already_AddRefed Cqmax(const GlobalObject& aGlobal, double aValue); static already_AddRefed Cm(const GlobalObject& aGlobal, double aValue); static already_AddRefed Mm(const GlobalObject& aGlobal, double aValue); static already_AddRefed Q(const GlobalObject& aGlobal, double aValue); static already_AddRefed In(const GlobalObject& aGlobal, double aValue); static already_AddRefed Pt(const GlobalObject& aGlobal, double aValue); static already_AddRefed Pc(const GlobalObject& aGlobal, double aValue); static already_AddRefed Px(const GlobalObject& aGlobal, double aValue); // static already_AddRefed Deg(const GlobalObject& aGlobal, double aValue); static already_AddRefed Grad(const GlobalObject& aGlobal, double aValue); static already_AddRefed Rad(const GlobalObject& aGlobal, double aValue); static already_AddRefed Turn(const GlobalObject& aGlobal, double aValue); //