mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
08d815245e
--HG-- rename : layout/inspector/inICSSValueSearch.idl => layout/inspector/public/inICSSValueSearch.idl rename : layout/inspector/inIDOMUtils.idl => layout/inspector/public/inIDOMUtils.idl rename : layout/inspector/inIDOMView.idl => layout/inspector/public/inIDOMView.idl rename : layout/inspector/inIDeepTreeWalker.idl => layout/inspector/public/inIDeepTreeWalker.idl rename : layout/inspector/inIFlasher.idl => layout/inspector/public/inIFlasher.idl rename : layout/inspector/inISearchObserver.idl => layout/inspector/public/inISearchObserver.idl rename : layout/inspector/inISearchProcess.idl => layout/inspector/public/inISearchProcess.idl rename : layout/inspector/nsIDOMFontFace.idl => layout/inspector/public/nsIDOMFontFace.idl rename : layout/inspector/nsIDOMFontFaceList.idl => layout/inspector/public/nsIDOMFontFaceList.idl rename : layout/inspector/inCSSValueSearch.cpp => layout/inspector/src/inCSSValueSearch.cpp rename : layout/inspector/inCSSValueSearch.h => layout/inspector/src/inCSSValueSearch.h rename : layout/inspector/inDOMUtils.cpp => layout/inspector/src/inDOMUtils.cpp rename : layout/inspector/inDOMUtils.h => layout/inspector/src/inDOMUtils.h rename : layout/inspector/inDOMView.cpp => layout/inspector/src/inDOMView.cpp rename : layout/inspector/inDOMView.h => layout/inspector/src/inDOMView.h rename : layout/inspector/inDeepTreeWalker.cpp => layout/inspector/src/inDeepTreeWalker.cpp rename : layout/inspector/inDeepTreeWalker.h => layout/inspector/src/inDeepTreeWalker.h rename : layout/inspector/inFlasher.cpp => layout/inspector/src/inFlasher.cpp rename : layout/inspector/inFlasher.h => layout/inspector/src/inFlasher.h rename : layout/inspector/inLayoutUtils.cpp => layout/inspector/src/inLayoutUtils.cpp rename : layout/inspector/inLayoutUtils.h => layout/inspector/src/inLayoutUtils.h rename : layout/inspector/inSearchLoop.cpp => layout/inspector/src/inSearchLoop.cpp rename : layout/inspector/inSearchLoop.h => layout/inspector/src/inSearchLoop.h rename : layout/inspector/moz.build => layout/inspector/src/moz.build rename : layout/inspector/nsFontFace.cpp => layout/inspector/src/nsFontFace.cpp rename : layout/inspector/nsFontFace.h => layout/inspector/src/nsFontFace.h rename : layout/inspector/nsFontFaceList.cpp => layout/inspector/src/nsFontFaceList.cpp rename : layout/inspector/nsFontFaceList.h => layout/inspector/src/nsFontFaceList.h
107 lines
4.6 KiB
Plaintext
107 lines
4.6 KiB
Plaintext
/* 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/. */
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
interface nsIArray;
|
|
interface nsISupportsArray;
|
|
interface nsIDOMCharacterData;
|
|
interface nsIDOMElement;
|
|
interface nsIDOMDocument;
|
|
interface nsIDOMCSSStyleRule;
|
|
interface nsIDOMNode;
|
|
interface nsIDOMNodeList;
|
|
interface nsIDOMFontFaceList;
|
|
interface nsIDOMRange;
|
|
interface nsIDOMCSSStyleSheet;
|
|
|
|
[scriptable, uuid(ceae6c68-f5d4-4597-a3d9-ca5646c25f1a)]
|
|
interface inIDOMUtils : nsISupports
|
|
{
|
|
// CSS utilities
|
|
void getAllStyleSheets (in nsIDOMDocument aDoc,
|
|
[optional] out unsigned long aLength,
|
|
[array, size_is (aLength), retval] out nsISupports aSheets);
|
|
nsISupportsArray getCSSStyleRules(in nsIDOMElement aElement, [optional] in DOMString aPseudo);
|
|
unsigned long getRuleLine(in nsIDOMCSSStyleRule aRule);
|
|
unsigned long getRuleColumn(in nsIDOMCSSStyleRule aRule);
|
|
|
|
// Utilities for working with selectors. We don't have a JS OM representation
|
|
// of a single selector or a selector list yet, but given a rule we can index
|
|
// into the selector list.
|
|
//
|
|
// This is a somewhat backwards API; once we move StyleRule to WebIDL we
|
|
// should consider using [ChromeOnly] APIs on that.
|
|
unsigned long getSelectorCount(in nsIDOMCSSStyleRule aRule);
|
|
// For all three functions below, aSelectorIndex is 0-based
|
|
AString getSelectorText(in nsIDOMCSSStyleRule aRule,
|
|
in unsigned long aSelectorIndex);
|
|
unsigned long long getSpecificity(in nsIDOMCSSStyleRule aRule,
|
|
in unsigned long aSelectorIndex);
|
|
// Note: This does not handle scoped selectors correctly, because it has no
|
|
// idea what the right scope is.
|
|
bool selectorMatchesElement(in nsIDOMElement aElement,
|
|
in nsIDOMCSSStyleRule aRule,
|
|
in unsigned long aSelectorIndex);
|
|
|
|
// Utilities for working with CSS properties
|
|
//
|
|
// Returns true if the string names a property that is inherited by default.
|
|
bool isInheritedProperty(in AString aPropertyName);
|
|
|
|
// Get a list of all our supported property names. Optionally
|
|
// shorthands can be excluded or property aliases included.
|
|
const unsigned long EXCLUDE_SHORTHANDS = (1<<0);
|
|
const unsigned long INCLUDE_ALIASES = (1<<1);
|
|
void getCSSPropertyNames([optional] in unsigned long aFlags,
|
|
[optional] out unsigned long aCount,
|
|
[retval, array, size_is(aCount)] out wstring aProps);
|
|
|
|
// Get a list of all valid keywords and colors for aProperty.
|
|
void getCSSValuesForProperty(in AString aProperty,
|
|
[optional] out unsigned long aLength,
|
|
[array, size_is(aLength), retval] out wstring aValues);
|
|
|
|
// Utilities for working with CSS colors
|
|
[implicit_jscontext]
|
|
jsval colorNameToRGB(in DOMString aColorName);
|
|
AString rgbToColorName(in octet aR, in octet aG, in octet aB);
|
|
|
|
// DOM Node utilities
|
|
boolean isIgnorableWhitespace(in nsIDOMCharacterData aDataNode);
|
|
// 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.
|
|
nsIDOMNode getParentForNode(in nsIDOMNode aNode,
|
|
in boolean aShowingAnonymousContent);
|
|
nsIDOMNodeList getChildrenForNode(in nsIDOMNode aNode,
|
|
in boolean aShowingAnonymousContent);
|
|
|
|
// XBL utilities
|
|
nsIArray getBindingURLs(in nsIDOMElement aElement);
|
|
|
|
// content state utilities
|
|
unsigned long long getContentState(in nsIDOMElement aElement);
|
|
void setContentState(in nsIDOMElement aElement, in unsigned long long aState);
|
|
|
|
nsIDOMFontFaceList getUsedFontFaces(in nsIDOMRange aRange);
|
|
|
|
// pseudo-class style locking methods. aPseudoClass must be a valid pseudo-class
|
|
// selector string, e.g. ":hover". ":-moz-any-link" and non-event-state
|
|
// pseudo-classes are ignored.
|
|
void addPseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass);
|
|
void removePseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass);
|
|
bool hasPseudoClassLock(in nsIDOMElement aElement, in DOMString aPseudoClass);
|
|
void clearPseudoClassLocks(in nsIDOMElement aElement);
|
|
|
|
/**
|
|
* Parse CSS and update the style sheet in place.
|
|
*
|
|
* @param DOMCSSStyleSheet aSheet
|
|
* @param DOMString aInput
|
|
* The new source string for the style sheet.
|
|
*/
|
|
void parseStyleSheet(in nsIDOMCSSStyleSheet aSheet, in DOMString aInput);
|
|
};
|