Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes | Protected Attributes
CSSNameSpaceRuleImpl Class Reference
Inheritance diagram for CSSNameSpaceRuleImpl:
Inheritance graph
[legend]
Collaboration diagram for CSSNameSpaceRuleImpl:
Collaboration graph
[legend]

List of all members.

Public Types

enum  {
  UNKNOWN_RULE = 0, STYLE_RULE = 1, IMPORT_RULE = 2, MEDIA_RULE = 3,
  FONT_FACE_RULE = 4, PAGE_RULE = 5, CHARSET_RULE = 6, NAMESPACE_RULE = 7,
  DOCUMENT_RULE = 8
}

Public Member Functions

 CSSNameSpaceRuleImpl (void)
 CSSNameSpaceRuleImpl (const CSSNameSpaceRuleImpl &aCopy)
virtual ~CSSNameSpaceRuleImpl (void)
NS_DECL_ISUPPORTS_INHERITED
DECL_STYLE_RULE_INHERIT
NS_IMETHOD 
GetType (PRInt32 &aType) const
NS_IMETHOD Clone (nsICSSRule *&aClone) const
NS_IMETHOD GetPrefix (nsIAtom *&aPrefix) const
NS_IMETHOD SetPrefix (nsIAtom *aPrefix)
NS_IMETHOD GetURLSpec (nsString &aURLSpec) const
NS_IMETHOD SetURLSpec (const nsString &aURLSpec)
 NS_IMETHOD_ (nsrefcnt) AddRef()
 NS_IMETHOD_ (nsrefcnt) Release()
NS_IMETHOD GetStyleSheet (nsIStyleSheet *&aSheet) const
NS_IMETHOD SetStyleSheet (nsICSSStyleSheet *aSheet)
NS_IMETHOD SetParentRule (nsICSSGroupRule *aRule)
NS_IMETHOD MapRuleInfoInto (nsRuleData *aRuleData)
NS_IMETHOD GetStyleSheet (nsIStyleSheet *&aSheet) const =0
NS_IMETHOD SetStyleSheet (nsICSSStyleSheet *aSheet)=0
NS_IMETHOD SetParentRule (nsICSSGroupRule *aRule)=0
NS_IMETHOD GetDOMRule (nsIDOMCSSRule **aDOMRule)=0
NS_IMETHOD MapRuleInfoInto (nsRuleData *aRuleData)=0
 |nsIStyleRule::MapRuleInfoInto| is a request to copy all stylistic data represented by the rule that:

Public Attributes

const unsigned short UNKNOWN_RULE = 0
const unsigned short STYLE_RULE = 1
const unsigned short CHARSET_RULE = 2
const unsigned short IMPORT_RULE = 3
const unsigned short MEDIA_RULE = 4
const unsigned short FONT_FACE_RULE = 5
const unsigned short PAGE_RULE = 6
readonly attribute unsigned short type
attribute DOMString cssText
readonly attribute
nsIDOMCSSStyleSheet 
parentStyleSheet
readonly attribute nsIDOMCSSRule parentRule

Protected Attributes

nsIAtommPrefix
nsString mURLSpec
nsAutoRefCnt mRefCnt
nsICSSStyleSheetmSheet
nsICSSGroupRulemParentRule

Detailed Description

Definition at line 1295 of file nsCSSRules.cpp.


Member Enumeration Documentation

anonymous enum [inherited]
Enumerator:
UNKNOWN_RULE 
STYLE_RULE 
IMPORT_RULE 
MEDIA_RULE 
FONT_FACE_RULE 
PAGE_RULE 
CHARSET_RULE 
NAMESPACE_RULE 
DOCUMENT_RULE 

Definition at line 55 of file nsICSSRule.h.


Constructor & Destructor Documentation

Definition at line 1332 of file nsCSSRules.cpp.

Here is the caller graph for this function:

Definition at line 1339 of file nsCSSRules.cpp.

  : nsCSSRule(aCopy),
    mPrefix(aCopy.mPrefix),
    mURLSpec(aCopy.mURLSpec)
{
  NS_IF_ADDREF(mPrefix);
}

Definition at line 1347 of file nsCSSRules.cpp.


Member Function Documentation

NS_IMETHODIMP CSSNameSpaceRuleImpl::Clone ( nsICSSRule *&  aClone) const [virtual]

Implements nsICSSRule.

Definition at line 1398 of file nsCSSRules.cpp.

{
  CSSNameSpaceRuleImpl* clone = new CSSNameSpaceRuleImpl(*this);
  if (clone) {
    return CallQueryInterface(clone, &aClone);
  }
  aClone = nsnull;
  return NS_ERROR_OUT_OF_MEMORY;
}

Here is the call graph for this function:

NS_IMETHOD nsICSSRule::GetDOMRule ( nsIDOMCSSRule **  aDOMRule) [pure virtual, inherited]

Implemented in CSSStyleRuleImpl.

Here is the caller graph for this function:

NS_IMETHODIMP CSSNameSpaceRuleImpl::GetPrefix ( nsIAtom *&  aPrefix) const [virtual]

Implements nsICSSNameSpaceRule.

Definition at line 1409 of file nsCSSRules.cpp.

{
  aPrefix = mPrefix;
  NS_IF_ADDREF(aPrefix);
  return NS_OK;
}
NS_IMETHODIMP nsCSSRule::GetStyleSheet ( nsIStyleSheet *&  aSheet) const [inherited]

Reimplemented in CSSStyleRuleImpl.

Definition at line 64 of file nsCSSRule.cpp.

{
  NS_IF_ADDREF(mSheet);
  aSheet = mSheet;
  return NS_OK;
}
NS_IMETHOD nsICSSRule::GetStyleSheet ( nsIStyleSheet *&  aSheet) const [pure virtual, inherited]

Implemented in CSSStyleRuleImpl.

Here is the caller graph for this function:

NS_IMETHODIMP CSSNameSpaceRuleImpl::GetType ( PRInt32 aType) const [virtual]

Implements nsICSSRule.

Definition at line 1391 of file nsCSSRules.cpp.

{
  aType = nsICSSRule::NAMESPACE_RULE;
  return NS_OK;
}
NS_IMETHODIMP CSSNameSpaceRuleImpl::GetURLSpec ( nsString aURLSpec) const [virtual]

Implements nsICSSNameSpaceRule.

Definition at line 1426 of file nsCSSRules.cpp.

{
  aURLSpec = mURLSpec;
  return NS_OK;
}
NS_IMETHODIMP nsCSSRule::MapRuleInfoInto ( nsRuleData aRuleData) [inherited]

Reimplemented in CSSStyleRuleImpl.

Definition at line 92 of file nsCSSRule.cpp.

{
  // The nsIStyleRule contract is not appropriate for all CSS rules.
  NS_NOTREACHED("nsCSSRule::MapRuleInfoInto");
  return NS_OK;
}
NS_IMETHOD nsIStyleRule::MapRuleInfoInto ( nsRuleData aRuleData) [pure virtual, inherited]

|nsIStyleRule::MapRuleInfoInto| is a request to copy all stylistic data represented by the rule that:

  • are relevant for |aRuleData->mSID| (the style struct ID)
  • are not already filled into the data struct into the appropriate data struct in |aRuleData|. It is important that only empty data are filled in, since the rule tree is walked from highest priority rule to least, so that the walk can stop if all needed data are found. Thus overwriting non-empty data will break CSS cascading rules.

Implemented in CSSStyleRuleImpl, CSSImportantRule, nsHTMLStyleSheet::TableUngroupedColRule, nsHTMLStyleSheet::TableColRule, nsHTMLStyleSheet::TableColgroupRule, nsHTMLStyleSheet::TableRowRule, nsHTMLStyleSheet::TableTbodyRule, nsHTMLStyleSheet::TableTHRule, nsHTMLStyleSheet::GenericTableRule, nsHTMLStyleSheet::HTMLColorRule, CSSFirstLetterRule, nsMappedAttributes, CSSFirstLineRule, and BodyRule.

Here is the caller graph for this function:

nsCSSRule::NS_IMETHOD_ ( nsrefcnt  ) [inherited]
nsCSSRule::NS_IMETHOD_ ( nsrefcnt  ) [inherited]

Reimplemented in CSSStyleRuleImpl.

Definition at line 82 of file nsCSSRule.cpp.

{
  // We don't reference count this up reference. The group rule
  // will tell us when it's going away or when we're detached from
  // it.
  mParentRule = aRule;
  return NS_OK;
}
NS_IMETHOD nsICSSRule::SetParentRule ( nsICSSGroupRule aRule) [pure virtual, inherited]

Implemented in CSSStyleRuleImpl.

Here is the caller graph for this function:

Implements nsICSSNameSpaceRule.

Definition at line 1417 of file nsCSSRules.cpp.

Here is the caller graph for this function:

Reimplemented in CSSStyleRuleImpl, and nsCSSMediaRule.

Definition at line 72 of file nsCSSRule.cpp.

{
  // We don't reference count this up reference. The style sheet
  // will tell us when it's going away or when we're detached from
  // it.
  mSheet = aSheet;
  return NS_OK;
}

Here is the caller graph for this function:

NS_IMETHOD nsICSSRule::SetStyleSheet ( nsICSSStyleSheet aSheet) [pure virtual, inherited]

Implemented in CSSStyleRuleImpl, and nsCSSMediaRule.

Here is the caller graph for this function:

Implements nsICSSNameSpaceRule.

Definition at line 1433 of file nsCSSRules.cpp.

{
  mURLSpec = aURLSpec;
  return NS_OK;
}

Here is the caller graph for this function:


Member Data Documentation

const unsigned short nsIDOMCSSRule::CHARSET_RULE = 2 [inherited]

Definition at line 58 of file nsIDOMCSSRule.idl.

attribute DOMString nsIDOMCSSRule::cssText [inherited]

Definition at line 65 of file nsIDOMCSSRule.idl.

const unsigned short nsIDOMCSSRule::FONT_FACE_RULE = 5 [inherited]

Definition at line 61 of file nsIDOMCSSRule.idl.

const unsigned short nsIDOMCSSRule::IMPORT_RULE = 3 [inherited]

Definition at line 59 of file nsIDOMCSSRule.idl.

const unsigned short nsIDOMCSSRule::MEDIA_RULE = 4 [inherited]

Definition at line 60 of file nsIDOMCSSRule.idl.

nsICSSGroupRule* nsCSSRule::mParentRule [protected, inherited]

Definition at line 73 of file nsCSSRule.h.

Definition at line 1328 of file nsCSSRules.cpp.

nsAutoRefCnt nsCSSRule::mRefCnt [protected, inherited]

Definition at line 58 of file nsCSSRule.h.

nsICSSStyleSheet* nsCSSRule::mSheet [protected, inherited]

Definition at line 72 of file nsCSSRule.h.

Definition at line 1329 of file nsCSSRules.cpp.

const unsigned short nsIDOMCSSRule::PAGE_RULE = 6 [inherited]

Definition at line 62 of file nsIDOMCSSRule.idl.

Definition at line 69 of file nsIDOMCSSRule.idl.

Definition at line 68 of file nsIDOMCSSRule.idl.

const unsigned short nsIDOMCSSRule::STYLE_RULE = 1 [inherited]

Definition at line 57 of file nsIDOMCSSRule.idl.

readonly attribute unsigned short nsIDOMCSSRule::type [inherited]

Definition at line 64 of file nsIDOMCSSRule.idl.

const unsigned short nsIDOMCSSRule::UNKNOWN_RULE = 0 [inherited]

Definition at line 56 of file nsIDOMCSSRule.idl.


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