Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Attributes
nsNode3Tearoff Class Reference

A tearoff class for nsGenericElement to implement the nsIDOM3Node functions. More...

#include <nsGenericElement.h>

Inheritance diagram for nsNode3Tearoff:
Inheritance graph
[legend]
Collaboration diagram for nsNode3Tearoff:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS
NS_DECL_NSIDOM3NODE 
nsNode3Tearoff (nsIContent *aContent)
unsigned short compareDocumentPosition (in nsIDOMNode other) raises (DOMException)
boolean isSameNode (in nsIDOMNode other)
DOMString lookupPrefix (in DOMString namespaceURI)
boolean isDefaultNamespace (in DOMString namespaceURI)
DOMString lookupNamespaceURI (in DOMString prefix)
boolean isEqualNode (in nsIDOMNode arg)
nsISupports getFeature (in DOMString feature, in DOMString version)
nsIVariant setUserData (in DOMString key, in nsIVariant data, in nsIDOMUserDataHandler handler)
nsIVariant getUserData (in DOMString key)

Static Public Member Functions

static nsresult GetTextContent (nsIContent *aContent, nsAString &aTextContent)
static nsresult SetTextContent (nsIContent *aContent, const nsAString &aTextContent)

Public Attributes

readonly attribute DOMString baseURI
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02
const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
attribute DOMString textContent

Protected Member Functions

virtual ~nsNode3Tearoff ()

Private Attributes

nsCOMPtr< nsIContentmContent

Detailed Description

A tearoff class for nsGenericElement to implement the nsIDOM3Node functions.

Definition at line 245 of file nsGenericElement.h.


Constructor & Destructor Documentation

NS_DECL_ISUPPORTS NS_DECL_NSIDOM3NODE nsNode3Tearoff::nsNode3Tearoff ( nsIContent aContent) [inline]

Definition at line 252 of file nsGenericElement.h.

                                       : mContent(aContent)
  {
  }
virtual nsNode3Tearoff::~nsNode3Tearoff ( ) [inline, protected, virtual]

Definition at line 263 of file nsGenericElement.h.

{};

Member Function Documentation

unsigned short nsIDOM3Node::compareDocumentPosition ( in nsIDOMNode  other) raises (DOMException) [inherited]
nsISupports nsIDOM3Node::getFeature ( in DOMString  feature,
in DOMString  version 
) [inherited]
nsresult nsNode3Tearoff::GetTextContent ( nsIContent aContent,
nsAString &  aTextContent 
) [static]

Definition at line 243 of file nsGenericElement.cpp.

{
  nsCOMPtr<nsIDOMNode> node(do_QueryInterface(mContent));
  NS_ASSERTION(node, "We have an nsIContent which doesn't support nsIDOMNode");

  PRUint16 nodeType;
  node->GetNodeType(&nodeType);
  if (nodeType == nsIDOMNode::DOCUMENT_TYPE_NODE ||
      nodeType == nsIDOMNode::NOTATION_NODE) {
    SetDOMStringToNull(aTextContent);

    return NS_OK;
  }

  if (nodeType == nsIDOMNode::TEXT_NODE ||
      nodeType == nsIDOMNode::CDATA_SECTION_NODE ||
      nodeType == nsIDOMNode::COMMENT_NODE ||
      nodeType == nsIDOMNode::PROCESSING_INSTRUCTION_NODE) {
    return node->GetNodeValue(aTextContent);
  }

  return GetTextContent(mContent, aTextContent);
}

Here is the call graph for this function:

nsIVariant nsIDOM3Node::getUserData ( in DOMString  key) [inherited]
boolean nsIDOM3Node::isDefaultNamespace ( in DOMString  namespaceURI) [inherited]
boolean nsIDOM3Node::isSameNode ( in nsIDOMNode  other) [inherited]
DOMString nsIDOM3Node::lookupNamespaceURI ( in DOMString  prefix) [inherited]
DOMString nsIDOM3Node::lookupPrefix ( in DOMString  namespaceURI) [inherited]
nsresult nsNode3Tearoff::SetTextContent ( nsIContent aContent,
const nsAString &  aTextContent 
) [static]

Definition at line 293 of file nsGenericElement.cpp.

{
  nsCOMPtr<nsIDOMNode> node(do_QueryInterface(mContent));
  NS_ASSERTION(node, "We have an nsIContent which doesn't support nsIDOMNode");

  PRUint16 nodeType;
  node->GetNodeType(&nodeType);
  if (nodeType == nsIDOMNode::DOCUMENT_TYPE_NODE ||
      nodeType == nsIDOMNode::NOTATION_NODE) {
    return NS_OK;
  }

  if (nodeType == nsIDOMNode::TEXT_NODE ||
      nodeType == nsIDOMNode::CDATA_SECTION_NODE ||
      nodeType == nsIDOMNode::COMMENT_NODE ||
      nodeType == nsIDOMNode::PROCESSING_INSTRUCTION_NODE) {
    return node->SetNodeValue(aTextContent);
  }

  return SetTextContent(mContent, aTextContent);
}

Here is the call graph for this function:

nsIVariant nsIDOM3Node::setUserData ( in DOMString  key,
in nsIVariant  data,
in nsIDOMUserDataHandler  handler 
) [inherited]

Member Data Documentation

readonly attribute DOMString nsIDOM3Node::baseURI [inherited]

Definition at line 50 of file nsIDOM3Node.idl.

const unsigned short nsIDOM3Node::DOCUMENT_POSITION_CONTAINED_BY = 0x10 [inherited]

Definition at line 57 of file nsIDOM3Node.idl.

const unsigned short nsIDOM3Node::DOCUMENT_POSITION_CONTAINS = 0x08 [inherited]

Definition at line 56 of file nsIDOM3Node.idl.

const unsigned short nsIDOM3Node::DOCUMENT_POSITION_DISCONNECTED = 0x01 [inherited]

Definition at line 53 of file nsIDOM3Node.idl.

const unsigned short nsIDOM3Node::DOCUMENT_POSITION_FOLLOWING = 0x04 [inherited]

Definition at line 55 of file nsIDOM3Node.idl.

Definition at line 58 of file nsIDOM3Node.idl.

const unsigned short nsIDOM3Node::DOCUMENT_POSITION_PRECEDING = 0x02 [inherited]

Definition at line 54 of file nsIDOM3Node.idl.

Definition at line 263 of file nsGenericElement.h.

attribute DOMString nsIDOM3Node::textContent [inherited]

Definition at line 64 of file nsIDOM3Node.idl.


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