Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsQuoteNode Struct Reference

#include <nsQuoteList.h>

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

List of all members.

Public Member Functions

 nsQuoteNode (nsStyleContentType &aType, nsIFrame *aPseudoFrame, PRUint32 aContentIndex)
PRBool IsOpenQuote ()
PRBool IsCloseQuote ()
PRBool IsRealQuote ()
PRBool IsHiddenQuote ()
PRInt32 Depth ()
PRInt32 DepthAfter ()
const nsStringText ()

Public Attributes

const nsStyleContentType mType
PRInt32 mDepthBefore
nsIFrame *const mPseudoFrame
const PRInt32 mContentIndex
nsCOMPtr< nsIDOMCharacterDatamText

Detailed Description

Definition at line 42 of file nsQuoteList.h.


Constructor & Destructor Documentation

nsQuoteNode::nsQuoteNode ( nsStyleContentType aType,
nsIFrame aPseudoFrame,
PRUint32  aContentIndex 
) [inline]

Definition at line 50 of file nsQuoteList.h.

    : nsGenConNode(aPseudoFrame, aContentIndex)
    , mType(aType)
    , mDepthBefore(0)
  {
    NS_ASSERTION(aType == eStyleContentType_OpenQuote ||
                 aType == eStyleContentType_CloseQuote ||
                 aType == eStyleContentType_NoOpenQuote ||
                 aType == eStyleContentType_NoCloseQuote,
                 "incorrect type");
    NS_ASSERTION(aContentIndex >= 0, "out of range");
  }

Member Function Documentation

Definition at line 89 of file nsQuoteList.h.

                  {
    return IsOpenQuote() ? mDepthBefore : mDepthBefore - 1;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 94 of file nsQuoteList.h.

                       {
    return IsOpenQuote() ? mDepthBefore + 1
                         : (mDepthBefore == 0 ? 0 : mDepthBefore - 1);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 71 of file nsQuoteList.h.

                        {
    return !IsOpenQuote();
  }

Here is the call graph for this function:

Definition at line 82 of file nsQuoteList.h.

                         {
    return !IsRealQuote();
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 65 of file nsQuoteList.h.

Here is the caller graph for this function:

Definition at line 76 of file nsQuoteList.h.

Here is the caller graph for this function:

Definition at line 43 of file nsQuoteList.cpp.

{
  NS_ASSERTION(mType == eStyleContentType_OpenQuote ||
               mType == eStyleContentType_CloseQuote,
               "should only be called when mText should be non-null");
  const nsStyleQuotes* styleQuotes = mPseudoFrame->GetStyleQuotes();
  PRInt32 quotesCount = styleQuotes->QuotesCount(); // 0 if 'quotes:none'
  PRInt32 quoteDepth = Depth();

  // Reuse the last pair when the depth is greater than the number of
  // pairs of quotes.  (Also make 'quotes: none' and close-quote from
  // a depth of 0 equivalent for the next test.)
  if (quoteDepth >= quotesCount)
    quoteDepth = quotesCount - 1;

  const nsString *result;
  if (quoteDepth == -1) {
    // close-quote from a depth of 0 or 'quotes: none' (we want a node
    // with the empty string so dynamic changes are easier to handle)
    result = & EmptyString();
  } else {
    result = eStyleContentType_OpenQuote == mType
               ? styleQuotes->OpenQuoteAt(quoteDepth)
               : styleQuotes->CloseQuoteAt(quoteDepth);
  }
  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 56 of file nsGenConList.h.

Definition at line 47 of file nsQuoteList.h.

Definition at line 51 of file nsGenConList.h.

Definition at line 60 of file nsGenConList.h.

Definition at line 44 of file nsQuoteList.h.


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