Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Private Member Functions
nsCSSSelectorList Struct Reference

A selector list is the unit of selectors that each style rule has. More...

#include <nsICSSStyleRule.h>

Collaboration diagram for nsCSSSelectorList:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsCSSSelectorList (void)
 ~nsCSSSelectorList (void)
void AddSelector (const nsCSSSelector &aSelector)
 Push a copy of |aSelector| on to the beginning of |mSelectors|, setting its |mNext| to the current value of |mSelectors|.
void ToString (nsAString &aResult, nsICSSStyleSheet *aSheet)
 Should be used only on the first in the list.
nsCSSSelectorListClone () const
 Do a deep clone.

Public Attributes

nsCSSSelectormSelectors
PRInt32 mWeight
nsCSSSelectorListmNext

Private Member Functions

nsCSSSelectorListClone (PRBool aDeep) const
 nsCSSSelectorList (const nsCSSSelectorList &aCopy)
nsCSSSelectorListoperator= (const nsCSSSelectorList &aCopy)

Detailed Description

A selector list is the unit of selectors that each style rule has.

For example, "P B, H1 B { ... }" would be a selector list with two items (where each |nsCSSSelectorList| object's |mSelectors| has an |mNext| for the P or H1). We represent them as linked lists.

Definition at line 183 of file nsICSSStyleRule.h.


Constructor & Destructor Documentation

Definition at line 692 of file nsCSSStyleRule.cpp.

Here is the caller graph for this function:


Member Function Documentation

Push a copy of |aSelector| on to the beginning of |mSelectors|, setting its |mNext| to the current value of |mSelectors|.

The caller is responsible for updating |mWeight|.

Definition at line 707 of file nsCSSStyleRule.cpp.

{ // prepend to list
  nsCSSSelector* newSel = aSelector.Clone();
  if (newSel) {
    newSel->mNext = mSelectors;
    mSelectors = newSel;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Do a deep clone.

Should be used only on the first in the list.

Definition at line 203 of file nsICSSStyleRule.h.

{ return Clone(PR_TRUE); }

Here is the call graph for this function:

Here is the caller graph for this function:

nsCSSSelectorList * nsCSSSelectorList::Clone ( PRBool  aDeep) const [private]

Definition at line 731 of file nsCSSStyleRule.cpp.

Here is the call graph for this function:

nsCSSSelectorList& nsCSSSelectorList::operator= ( const nsCSSSelectorList aCopy) [private]
void nsCSSSelectorList::ToString ( nsAString &  aResult,
nsICSSStyleSheet aSheet 
)

Should be used only on the first in the list.

Definition at line 717 of file nsCSSStyleRule.cpp.

{
  aResult.Truncate();
  nsCSSSelectorList *p = this;
  for (;;) {
    p->mSelectors->ToString(aResult, aSheet, PR_TRUE);
    p = p->mNext;
    if (!p)
      break;
    aResult.AppendLiteral(", ");
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 207 of file nsICSSStyleRule.h.

Definition at line 205 of file nsICSSStyleRule.h.

Definition at line 206 of file nsICSSStyleRule.h.


The documentation for this struct was generated from the following files: