Back to index

lightning-sunbird  0.9+nobinonly
Public Types | Public Member Functions | Public Attributes | Protected Attributes
CSSCharsetRuleImpl Class Reference
Inheritance diagram for CSSCharsetRuleImpl:
Inheritance graph
[legend]
Collaboration diagram for CSSCharsetRuleImpl:
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

 CSSCharsetRuleImpl (const nsAString &aEncoding)
 CSSCharsetRuleImpl (const CSSCharsetRuleImpl &aCopy)
virtual ~CSSCharsetRuleImpl (void)
NS_DECL_ISUPPORTS_INHERITED
DECL_STYLE_RULE_INHERIT
NS_IMETHOD 
GetType (PRInt32 &aType) const
NS_IMETHOD Clone (nsICSSRule *&aClone) const
NS_DECL_NSIDOMCSSRULE NS_IMETHOD GetEncoding (nsAString &aEncoding)
NS_IMETHOD SetEncoding (const nsAString &aEncoding)
 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

attribute DOMString encoding
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

nsString mEncoding
nsAutoRefCnt mRefCnt
nsICSSStyleSheetmSheet
nsICSSGroupRulemParentRule

Detailed Description

Definition at line 162 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

CSSCharsetRuleImpl::CSSCharsetRuleImpl ( const nsAString &  aEncoding)

Definition at line 195 of file nsCSSRules.cpp.

  : nsCSSRule(),
    mEncoding(aEncoding)
{
}

Here is the caller graph for this function:

Definition at line 201 of file nsCSSRules.cpp.

  : nsCSSRule(aCopy),
    mEncoding(aCopy.mEncoding)
{
}

Definition at line 207 of file nsCSSRules.cpp.

{
}

Member Function Documentation

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

Implements nsICSSRule.

Definition at line 249 of file nsCSSRules.cpp.

{
  CSSCharsetRuleImpl* clone = new CSSCharsetRuleImpl(*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 CSSCharsetRuleImpl::GetEncoding ( nsAString &  aEncoding)

Definition at line 260 of file nsCSSRules.cpp.

{
  aEncoding = mEncoding;
  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 CSSCharsetRuleImpl::GetType ( PRInt32 aType) const [virtual]

Implements nsICSSRule.

Definition at line 242 of file nsCSSRules.cpp.

{
  aType = nsICSSRule::CHARSET_RULE;
  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]

Definition at line 267 of file nsCSSRules.cpp.

{
  mEncoding = aEncoding;
  return NS_OK;
}

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:

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:


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.

Definition at line 45 of file nsIDOMCSSCharsetRule.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.

Definition at line 192 of file nsCSSRules.cpp.

nsICSSGroupRule* nsCSSRule::mParentRule [protected, inherited]

Definition at line 73 of file nsCSSRule.h.

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.

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: