Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsIComputedDOMStyle.h File Reference
#include "nsICSSDeclaration.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nsIComputedDOMStyle

Defines

#define NS_ICOMPUTEDDOMSTYLE_IID

Functions

nsresult NS_NewComputedDOMStyle (nsIComputedDOMStyle **aComputedStyle)

Define Documentation

Value:
{ 0x5f0197a1, 0xa873, 0x44e5, \
    {0x96, 0x31, 0xac, 0xd6, 0xca, 0xb4, 0xf1, 0xe0 } }

Definition at line 45 of file nsIComputedDOMStyle.h.


Function Documentation

Definition at line 80 of file nsComputedDOMStyle.cpp.

{
  NS_ENSURE_ARG_POINTER(aComputedStyle);

  if (sCachedComputedDOMStyle) {
    // There's an unused nsComputedDOMStyle cached, use it.
    // But before we use it, re-initialize the object.

    // Oh yeah baby, placement new!
    *aComputedStyle = new (sCachedComputedDOMStyle) nsComputedDOMStyle();

    sCachedComputedDOMStyle = nsnull;
  } else {
    // No nsComputedDOMStyle cached, create a new one.

    *aComputedStyle = new nsComputedDOMStyle();
    NS_ENSURE_TRUE(*aComputedStyle, NS_ERROR_OUT_OF_MEMORY);
  }

  NS_ADDREF(*aComputedStyle);

  return NS_OK;
}

Here is the call graph for this function: