/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththisfile, *Youcanobtainoneathttp://mozilla.org/MPL/2.0/.
*/
namespace mozilla { class ErrorResult; class StyleSheet; namespace css { class Rule;
} // namespace css namespace dom { class BrowsingContext; enumclass InspectorPropertyType : uint8_t; class CharacterData; class Document; class Element; class GlobalObject; class InspectorFontFace; class NodeList; class OwningCSSRuleOrInspectorDeclaration;
} // namespace dom
} // namespace mozilla
// Utilities for working with CSS properties // // Returns true if the string names a property that is inherited by default. staticbool IsInheritedProperty(GlobalObject& aGlobal, Document& aDocument, const nsACString& aPropertyName);
// Get a list of all our supported property names. Optionally // property aliases included. staticvoid GetCSSPropertyNames(GlobalObject& aGlobal, const PropertyNamesOptions& aOptions,
nsTArray<nsString>& aResult);
// Get a list of all properties controlled by preference, as well as // their corresponding preference names. staticvoid GetCSSPropertyPrefs(GlobalObject& aGlobal,
nsTArray<PropertyPref>& aResult);
// Get a list of all valid keywords and colors for aProperty. staticvoid GetCSSValuesForProperty(GlobalObject& aGlobal, const nsACString& aPropertyName,
nsTArray<nsString>& aResult,
ErrorResult& aRv);
// Get a list of all the CSS wide keywords. staticvoid GetCSSWideKeywords(GlobalObject& aGlobal,
nsTArray<nsString>& aResult);
// Utilities for working with CSS colors staticvoid RgbToColorName(GlobalObject& aGlobal, uint8_t aR, uint8_t aG,
uint8_t aB, nsACString& aResult);
// Convert a given CSS color string to rgba. Returns null on failure or an // InspectorRGBATuple on success. // // NOTE: Converting a color to RGBA may be lossy when converting from some // formats e.g. CMYK. staticvoid ColorToRGBA(GlobalObject&, const nsACString& aColorString,
Nullable<InspectorRGBATuple>& aResult);
// Convert a given CSS color string to another color space. staticvoid ColorTo(GlobalObject&, const nsACString& aFromColor, const nsACString& aToColorSpace,
Nullable<InspectorColorToResult>& aResult);
// Check whether a given color is a valid CSS color. staticbool IsValidCSSColor(GlobalObject& aGlobal, const nsACString& aColorString);
// Check whether a given string is a valid CSS <image> value. staticbool IsValidCSSImage(GlobalObject& aGlobal, const nsACString& aImageString);
// Utilities for obtaining information about a CSS property.
// Get a list of the longhands corresponding to the given CSS property. If // the property is a longhand already, just returns the property itself. // Throws on unsupported property names. staticvoid GetSubpropertiesForCSSProperty(GlobalObject& aGlobal, const nsACString& aProperty,
nsTArray<nsString>& aResult,
ErrorResult& aRv);
// Check whether a given CSS property is a shorthand. Throws on unsupported // property names. staticbool CssPropertyIsShorthand(GlobalObject& aGlobal, const nsACString& aProperty,
ErrorResult& aRv);
// Check whether values of the given type are valid values for the property. // For shorthands, checks whether there's a corresponding longhand property // that accepts values of this type. Throws on unsupported properties or // unknown types. staticbool CssPropertySupportsType(GlobalObject& aGlobal, const nsACString& aProperty,
InspectorPropertyType, ErrorResult& aRv);
// Returns the "parent" of a node. The parent of a document node is the // frame/iframe containing that document. aShowingAnonymousContent says // whether we are showing anonymous content. static nsINode* GetParentForNode(nsINode& aNode, bool aShowingAnonymousContent); static nsINode* GetParentForNode(GlobalObject& aGlobalObject, nsINode& aNode, bool aShowingAnonymousContent) { return GetParentForNode(aNode, aShowingAnonymousContent);
}
staticvoid GetUsedFontFaces(GlobalObject& aGlobal, nsRange& aRange,
uint32_t aMaxRanges, // max number of ranges to // record for each face bool aSkipCollapsedWhitespace,
nsTArray<UniquePtr<InspectorFontFace>>& aResult,
ErrorResult& aRv);
// pseudo-class style locking methods. aPseudoClass must be a valid // pseudo-class selector string, e.g. ":hover". ":any-link" and // non-event-state pseudo-classes are ignored. aEnabled sets whether the // psuedo-class should be locked to on or off. staticvoid AddPseudoClassLock(GlobalObject&, Element&, const nsAString& aPseudoClass, bool aEnabled); staticvoid RemovePseudoClassLock(GlobalObject&, Element&, const nsAString& aPseudoClass); staticbool HasPseudoClassLock(GlobalObject&, Element&, const nsAString& aPseudoClass); staticvoid ClearPseudoClassLocks(GlobalObject&, Element&);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.