Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
CSSRuleListImpl Class Reference
Inheritance diagram for CSSRuleListImpl:
Inheritance graph
Collaboration diagram for CSSRuleListImpl:
Collaboration graph

List of all members.

Public Member Functions

 CSSRuleListImpl (nsCSSStyleSheet *aStyleSheet)
NS_IMETHOD Item (PRUint32 aIndex, nsIDOMCSSRule **aReturn)
void DropReference ()
nsIDOMCSSRule item (in unsigned long index)

Public Attributes

PRBool mRulesAccessed
readonly attribute unsigned long length

Protected Member Functions

virtual ~CSSRuleListImpl ()

Protected Attributes


Detailed Description

Definition at line 728 of file nsCSSStyleSheet.cpp.

Constructor & Destructor Documentation

Definition at line 749 of file nsCSSStyleSheet.cpp.

  // Not reference counted to avoid circular references.
  // The style sheet will tell us when its going away.
  mStyleSheet = aStyleSheet;
  mRulesAccessed = PR_FALSE;
CSSRuleListImpl::~CSSRuleListImpl ( ) [protected, virtual]

Definition at line 757 of file nsCSSStyleSheet.cpp.


Member Function Documentation

Definition at line 739 of file nsCSSStyleSheet.cpp.

Here is the caller graph for this function:

Definition at line 774 of file nsCSSStyleSheet.cpp.

  if (nsnull != mStyleSheet) {
    PRInt32 count;
    *aLength = (PRUint32)count;
  else {
    *aLength = 0;

  return NS_OK;
nsIDOMCSSRule nsIDOMCSSRuleList::item ( in unsigned long  index) [inherited]

Definition at line 789 of file nsCSSStyleSheet.cpp.

  nsresult result = NS_OK;

  *aReturn = nsnull;
  if (mStyleSheet) {
    result = mStyleSheet->EnsureUniqueInner(); // needed to ensure rules have correct parent
    if (NS_SUCCEEDED(result)) {
      nsCOMPtr<nsICSSRule> rule;

      result = mStyleSheet->GetStyleRuleAt(aIndex, *getter_AddRefs(rule));
      if (rule) {
        result = rule->GetDOMRule(aReturn);
        mRulesAccessed = PR_TRUE; // signal to never share rules again
      } else if (result == NS_ERROR_ILLEGAL_VALUE) {
        result = NS_OK; // per spec: "Return Value ... null if ... not a valid index."
  return result;

Here is the call graph for this function:

Member Data Documentation

readonly attribute unsigned long nsIDOMCSSRuleList::length [inherited]

Definition at line 55 of file nsIDOMCSSRuleList.idl.

Definition at line 746 of file nsCSSStyleSheet.cpp.

Definition at line 744 of file nsCSSStyleSheet.cpp.

The documentation for this class was generated from the following file: