Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsHTMLStyleSheet.h File Reference
#include "nsIStyleSheet.h"
#include "nsIStyleRuleProcessor.h"
#include "nsIStyleRule.h"
#include "pldhash.h"
#include "nsCOMPtr.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nsHTMLStyleSheet
class  nsHTMLStyleSheet::HTMLColorRule
class  nsHTMLStyleSheet::GenericTableRule
class  nsHTMLStyleSheet::TableTHRule
class  nsHTMLStyleSheet::TableTbodyRule
class  nsHTMLStyleSheet::TableRowRule
class  nsHTMLStyleSheet::TableColgroupRule
class  nsHTMLStyleSheet::TableColRule
class  nsHTMLStyleSheet::TableUngroupedColRule

Functions

nsresult NS_NewHTMLStyleSheet (nsHTMLStyleSheet **aInstancePtrResult, nsIURI *aURL, nsIDocument *aDocument)
nsresult NS_NewHTMLStyleSheet (nsHTMLStyleSheet **aInstancePtrResult)

Function Documentation

nsresult NS_NewHTMLStyleSheet ( nsHTMLStyleSheet **  aInstancePtrResult,
nsIURI aURL,
nsIDocument aDocument 
)

Definition at line 848 of file nsHTMLStyleSheet.cpp.

{
  nsresult rv;
  nsHTMLStyleSheet* sheet;
  if (NS_FAILED(rv = NS_NewHTMLStyleSheet(&sheet)))
    return rv;

  if (NS_FAILED(rv = sheet->Init(aURL, aDocument))) {
    NS_RELEASE(sheet);
    return rv;
  }

  *aInstancePtrResult = sheet;
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult NS_NewHTMLStyleSheet ( nsHTMLStyleSheet **  aInstancePtrResult)

Definition at line 867 of file nsHTMLStyleSheet.cpp.

{
  NS_ASSERTION(aInstancePtrResult, "null out param");

  nsHTMLStyleSheet *it = new nsHTMLStyleSheet();
  if (!it) {
    *aInstancePtrResult = nsnull;
    return NS_ERROR_OUT_OF_MEMORY;
  }

  NS_ADDREF(it);
  nsresult rv = it->Init();
  if (NS_FAILED(rv))
    NS_RELEASE(it);

  *aInstancePtrResult = it; // NS_ADDREF above, or set to null by NS_RELEASE
  return rv;
}

Here is the call graph for this function: