2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsIArray;
|
|
|
|
interface nsISupportsArray;
|
|
|
|
interface nsIDOMCharacterData;
|
|
|
|
interface nsIDOMElement;
|
|
|
|
interface nsIDOMDocument;
|
|
|
|
interface nsIDOMCSSStyleRule;
|
|
|
|
interface nsIDOMNode;
|
2011-05-30 14:51:09 -07:00
|
|
|
interface nsIDOMNodeList;
|
2011-06-15 23:31:36 -07:00
|
|
|
interface nsIDOMFontFaceList;
|
|
|
|
interface nsIDOMRange;
|
2012-06-03 09:54:38 -07:00
|
|
|
interface nsIDOMCSSStyleSheet;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-03 09:54:38 -07:00
|
|
|
[scriptable, uuid(f7a37305-a963-4a2a-b951-2c97a6b27fb4)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface inIDOMUtils : nsISupports
|
|
|
|
{
|
|
|
|
// CSS utilities
|
2011-05-05 14:12:04 -07:00
|
|
|
nsISupportsArray getCSSStyleRules(in nsIDOMElement aElement, [optional] in DOMString aPseudo);
|
2007-03-22 10:30:00 -07:00
|
|
|
unsigned long getRuleLine(in nsIDOMCSSStyleRule aRule);
|
|
|
|
|
2011-11-05 08:41:10 -07:00
|
|
|
// Returns true if the string names a property that is inherited by default.
|
|
|
|
bool isInheritedProperty(in AString aPropertyName);
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
// 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);
|
2011-05-30 14:51:09 -07:00
|
|
|
nsIDOMNodeList getChildrenForNode(in nsIDOMNode aNode,
|
|
|
|
in boolean aShowingAnonymousContent);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// XBL utilities
|
|
|
|
nsIArray getBindingURLs(in nsIDOMElement aElement);
|
|
|
|
|
|
|
|
// content state utilities
|
2010-10-20 00:41:35 -07:00
|
|
|
unsigned long long getContentState(in nsIDOMElement aElement);
|
|
|
|
void setContentState(in nsIDOMElement aElement, in unsigned long long aState);
|
2011-06-15 23:31:36 -07:00
|
|
|
|
|
|
|
nsIDOMFontFaceList getUsedFontFaces(in nsIDOMRange aRange);
|
2012-02-08 10:42:38 -08:00
|
|
|
|
|
|
|
// 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);
|
2012-06-03 09:54:38 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|