Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Member Functions | Public Attributes
SinkContext Class Reference
Collaboration diagram for SinkContext:
Collaboration graph
[legend]

List of all members.

Classes

struct  Node

Public Member Functions

 SinkContext (HTMLContentSink *aSink)
 ~SinkContext ()
nsresult Begin (nsHTMLTag aNodeType, nsGenericHTMLElement *aRoot, PRUint32 aNumFlushed, PRInt32 aInsertionPoint)
nsresult OpenContainer (const nsIParserNode &aNode)
nsresult CloseContainer (const nsHTMLTag aTag)
nsresult AddLeaf (const nsIParserNode &aNode)
nsresult AddLeaf (nsGenericHTMLElement *aContent)
nsresult AddComment (const nsIParserNode &aNode)
nsresult End ()
nsresult GrowStack ()
nsresult AddText (const nsAString &aText)
 Add textual content to the current running text buffer.
nsresult FlushText (PRBool *aDidFlush=nsnull, PRBool aReleaseLast=PR_FALSE)
 Flush any buffered text out by creating a text content object and adding it to the content.
nsresult FlushTextAndRelease (PRBool *aDidFlush=nsnull)
nsresult FlushTags (PRBool aNotify)
 Flush all elements that have been seen so far such that they are visible in the tree.
PRBool IsCurrentContainer (nsHTMLTag mType)
PRBool IsAncestorContainer (nsHTMLTag mType)
nsGenericHTMLElementGetCurrentContainer ()
void DidAddContent (nsIContent *aContent, PRBool aDidNotify=PR_FALSE)
void UpdateChildCounts ()

Public Attributes

HTMLContentSinkmSink
PRInt32 mNotifyLevel
nsCOMPtr< nsITextContentmLastTextNode
PRInt32 mLastTextNodeSize
NodemStack
PRInt32 mStackSize
PRInt32 mStackPos
PRUnicharmText
PRInt32 mTextLength
PRInt32 mTextSize

Detailed Description

Definition at line 699 of file nsHTMLContentSink.cpp.


Class Documentation

struct SinkContext::Node

Definition at line 737 of file nsHTMLContentSink.cpp.

Collaboration diagram for SinkContext::Node:
Class Members
nsGenericHTMLElement * mContent
PRInt32 mInsertionPoint
PRUint32 mNumFlushed
nsHTMLTag mType

Constructor & Destructor Documentation

Definition at line 1025 of file nsHTMLContentSink.cpp.

{
  MOZ_COUNT_DTOR(SinkContext);

  if (mStack) {
    for (PRInt32 i = 0; i < mStackPos; i++) {
      NS_RELEASE(mStack[i].mContent);
    }
    delete [] mStack;
  }

  delete [] mText;
}

Member Function Documentation

Definition at line 1495 of file nsHTMLContentSink.cpp.

{
  SINK_TRACE_NODE(SINK_TRACE_CALLS,
                  "SinkContext::AddLeaf", 
                  nsHTMLTag(aNode.GetNodeType()), 
                  mStackPos, mSink);
  FlushTextAndRelease();

  if (!mSink) {
    return NS_ERROR_UNEXPECTED;
  }
  
  nsCOMPtr<nsIContent> comment;
  nsresult rv = NS_NewCommentNode(getter_AddRefs(comment),
                                  mSink->mNodeInfoManager);
  NS_ENSURE_SUCCESS(rv, rv);

  nsCOMPtr<nsIDOMComment> domComment(do_QueryInterface(comment));
  NS_ENSURE_TRUE(domComment, NS_ERROR_UNEXPECTED);

  domComment->AppendData(aNode.GetText());

  NS_ASSERTION(mStackPos > 0, "stack out of bounds");
  if (mStackPos <= 0) {
    return NS_ERROR_FAILURE;
  }

  nsGenericHTMLElement* parent;
  if (!mSink->mBody && !mSink->mFrameset && mSink->mHead) {
    parent = mSink->mHead;
  } else {
    parent = mStack[mStackPos - 1].mContent;
  }

  // If the parent has an insertion point, insert rather than append.
  if (mStack[mStackPos - 1].mInsertionPoint != -1) {
    parent->InsertChildAt(comment,
                          mStack[mStackPos - 1].mInsertionPoint++,
                          PR_FALSE);
  } else {
    parent->AppendChildTo(comment, PR_FALSE);
  }

  DidAddContent(comment, PR_FALSE);

#ifdef DEBUG
  if (SINK_LOG_TEST(gSinkLogModuleInfo, SINK_ALWAYS_REFLOW)) {
    mSink->ForceReflow();
  }
#endif

  return rv;
}

Here is the call graph for this function:

Definition at line 1372 of file nsHTMLContentSink.cpp.

{
  SINK_TRACE_NODE(SINK_TRACE_CALLS,
                  "SinkContext::AddLeaf", 
                  nsHTMLTag(aNode.GetNodeType()), 
                  mStackPos, mSink);

  nsresult rv = NS_OK;

  switch (aNode.GetTokenType()) {
  case eToken_start:
    {
      FlushTextAndRelease();

      // Create new leaf content object
      nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType());
      nsRefPtr<nsGenericHTMLElement> content =
        mSink->CreateContentObject(aNode, nodeType,
                                   mSink->mCurrentForm, mSink->mDocShell);
      NS_ENSURE_TRUE(content, NS_ERROR_OUT_OF_MEMORY);

      // Make sure to add base tag info, if needed, before setting any other
      // attributes -- what URI attrs do will depend on the base URI.  Only do
      // this for elements that have useful URI attributes.
      // See bug 18478 and bug 30617 for why we need to do this.
      switch (nodeType) {
      // leaves with 'SRC='
      case eHTMLTag_img:
      case eHTMLTag_frame:
      case eHTMLTag_input:
      case eHTMLTag_embed:
      // <form> can end up as a leaf if it's misnested with table elements
      case eHTMLTag_form:
        mSink->AddBaseTagInfo(content);

        break;
      default:
        break;
      }

      rv = mSink->AddAttributes(aNode, content);

      NS_ENSURE_SUCCESS(rv, rv);

      // Add new leaf to its parent
      AddLeaf(content);

      // Notify input and button that they are now fully created
      switch (nodeType) {
      case eHTMLTag_input:
      case eHTMLTag_button:
        content->DoneCreatingElement();

        break;

      default:
        break;
      }
    }
    break;

  case eToken_text:
  case eToken_whitespace:
  case eToken_newline:
    rv = AddText(aNode.GetText());

    break;
  case eToken_entity:
    {
      nsAutoString tmp;
      PRInt32 unicode = aNode.TranslateToUnicodeStr(tmp);
      if (unicode < 0) {
        rv = AddText(aNode.GetText());
      } else {
        // Map carriage returns to newlines
        if (!tmp.IsEmpty()) {
          if (tmp.CharAt(0) == '\r') {
            tmp.Assign((PRUnichar)'\n');
          }
          rv = AddText(tmp);
        }
      }
    }

    break;
  default:
    break;
  }

  return rv;
}

Here is the call graph for this function:

Definition at line 1465 of file nsHTMLContentSink.cpp.

{
  NS_ASSERTION(mStackPos > 0, "leaf w/o container");
  if (mStackPos <= 0) {
    return NS_ERROR_FAILURE;
  }

  nsGenericHTMLElement* parent = mStack[mStackPos - 1].mContent;

  // If the parent has an insertion point, insert rather than append.
  if (mStack[mStackPos - 1].mInsertionPoint != -1) {
    parent->InsertChildAt(aContent,
                          mStack[mStackPos - 1].mInsertionPoint++,
                          PR_FALSE);
  } else {
    parent->AppendChildTo(aContent, PR_FALSE);
  }

  DidAddContent(aContent, PR_FALSE);

#ifdef DEBUG
  if (SINK_LOG_TEST(gSinkLogModuleInfo, SINK_ALWAYS_REFLOW)) {
    mSink->ForceReflow();
  }
#endif

  return NS_OK;
}

Here is the call graph for this function:

nsresult SinkContext::AddText ( const nsAString &  aText)

Add textual content to the current running text buffer.

If the text buffer overflows, flush out the text by creating a text content object and adding it to the content tree.

Definition at line 1595 of file nsHTMLContentSink.cpp.

{
  PRInt32 addLen = aText.Length();
  if (addLen == 0) {
    return NS_OK;
  }

  // Create buffer when we first need it
  if (mTextSize == 0) {
    mText = new PRUnichar[4096];
    if (!mText) {
      return NS_ERROR_OUT_OF_MEMORY;
    }
    mTextSize = 4096;
  }

  // Copy data from string into our buffer; flush buffer when it fills up
  PRInt32 offset = 0;
  PRBool  isLastCharCR = PR_FALSE;

  while (addLen != 0) {
    PRInt32 amount = mTextSize - mTextLength;

    if (amount > addLen) {
      amount = addLen;
    }

    if (amount == 0) {
      // Don't release last text node so we can add to it again
      nsresult rv = FlushText();
      if (NS_FAILED(rv)) {
        return rv;
      }
    }

    mTextLength +=
      nsContentUtils::CopyNewlineNormalizedUnicodeTo(aText, offset,
                                                     &mText[mTextLength],
                                                     amount, isLastCharCR);
    offset += amount;
    addLen -= amount;
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult SinkContext::Begin ( nsHTMLTag  aNodeType,
nsGenericHTMLElement aRoot,
PRUint32  aNumFlushed,
PRInt32  aInsertionPoint 
)

Definition at line 1040 of file nsHTMLContentSink.cpp.

{
  if (mStackSize < 1) {
    nsresult rv = GrowStack();
    if (NS_FAILED(rv)) {
      return rv;
    }
  }

  mStack[0].mType = aNodeType;
  mStack[0].mContent = aRoot;
  mStack[0].mNumFlushed = aNumFlushed;
  mStack[0].mInsertionPoint = aInsertionPoint;
  NS_ADDREF(aRoot);
  mStackPos = 1;
  mTextLength = 0;

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 1260 of file nsHTMLContentSink.cpp.

{
  nsresult result = NS_OK;

  // Flush any collected text content. Release the last text
  // node to indicate that no more should be added to it.
  FlushTextAndRelease();

  SINK_TRACE_NODE(SINK_TRACE_CALLS,
                  "SinkContext::CloseContainer", 
                  aTag, mStackPos - 1, mSink);

  NS_WARN_IF_FALSE(mStackPos > 0,
                   "stack out of bounds. wrong context probably!");

  if (mStackPos <= 0) {
    return NS_OK; // Fix crash - Ref. bug 45975 or 45007
  }

  --mStackPos;
  nsHTMLTag nodeType = mStack[mStackPos].mType;

  nsGenericHTMLElement* content = mStack[mStackPos].mContent;

  content->Compact();

  // If we're in a state where we do append notifications as
  // we go up the tree, and we're at the level where the next
  // notification needs to be done, do the notification.
  if (mNotifyLevel >= mStackPos) {
    // Check to see if new content has been added after our last
    // notification

    if (mStack[mStackPos].mNumFlushed < content->GetChildCount()) {
#ifdef NS_DEBUG
      {
        // Tracing code
        const char *tagStr;
        mStack[mStackPos].mContent->Tag()->GetUTF8String(&tagStr);

        SINK_TRACE(SINK_TRACE_REFLOW,
                   ("SinkContext::CloseContainer: reflow on notifyImmediate "
                    "tag=%s newIndex=%d stackPos=%d",
                    tagStr,
                    mStack[mStackPos].mNumFlushed, mStackPos));
      }
#endif
      mSink->NotifyAppend(content, mStack[mStackPos].mNumFlushed);
    }

    // Indicate that notification has now happened at this level
    mNotifyLevel = mStackPos - 1;
  }

  if (mSink->IsMonolithicContainer(nodeType)) {
    --mSink->mInMonolithicContainer;
  }

  DidAddContent(content, PR_FALSE);

  // Special handling for certain tags
  switch (nodeType) {
  case eHTMLTag_noembed:
  case eHTMLTag_noframes:
    // Fix bug 40216
    NS_ASSERTION((mSink->mInsideNoXXXTag > 0), "mInsideNoXXXTag underflow");
    if (mSink->mInsideNoXXXTag > 0) {
      mSink->mInsideNoXXXTag--;
    }

    break;
  case eHTMLTag_form:
    {
      mSink->mFlags &= ~NS_SINK_FLAG_FORM_ON_STACK;
      // If there's a FORM on the stack, but this close tag doesn't
      // close the form, then close out the form *and* close out the
      // next container up. This is since the parser doesn't do fix up
      // of invalid form nesting. When the end FORM tag comes through,
      // we'll ignore it.
      if (aTag != nodeType) {
        result = CloseContainer(aTag);
      }
    }

    break;
  case eHTMLTag_iframe:
    mSink->mNumOpenIFRAMES--;

    break;
  case eHTMLTag_select:
  case eHTMLTag_textarea:
  case eHTMLTag_object:
  case eHTMLTag_applet:
    content->DoneAddingChildren();

    break;
  default:
    break;
  }

  NS_IF_RELEASE(content);

#ifdef DEBUG
  if (SINK_LOG_TEST(gSinkLogModuleInfo, SINK_ALWAYS_REFLOW)) {
    mSink->ForceReflow();
  }
#endif

  return result;
}

Here is the call graph for this function:

void SinkContext::DidAddContent ( nsIContent aContent,
PRBool  aDidNotify = PR_FALSE 
)

Definition at line 1098 of file nsHTMLContentSink.cpp.

{
  // If there was a notification done for this content, update the
  // parent's notification count.
  if (aDidNotify && (0 < mStackPos)) {
    nsIContent* parent = mStack[mStackPos - 1].mContent;
    mStack[mStackPos - 1].mNumFlushed = parent->GetChildCount();
  }

  if ((mStackPos == 2) && (mSink->mBody == mStack[1].mContent ||
                           mSink->mFrameset == mStack[1].mContent)) {
    // We just finished adding something to the body
    mNotifyLevel = 0;
  }

  // If we just added content to a node for which
  // an insertion happen, we need to do an immediate
  // notification for that insertion.
  if (!aDidNotify && (0 < mStackPos) &&
      (mStack[mStackPos - 1].mInsertionPoint != -1)) {
    nsIContent* parent = mStack[mStackPos - 1].mContent;

#ifdef NS_DEBUG
    // Tracing code
    nsIParserService *parserService =
      nsContentUtils::GetParserServiceWeakRef();
    if (parserService) {
      nsHTMLTag tag = nsHTMLTag(mStack[mStackPos - 1].mType);
      NS_ConvertUTF16toUTF8 str(parserService->HTMLIdToStringTag(tag));

      SINK_TRACE(SINK_TRACE_REFLOW,
                 ("SinkContext::DidAddContent: Insertion notification for "
                  "parent=%s at position=%d and stackPos=%d",
                  str.get(), mStack[mStackPos - 1].mInsertionPoint - 1,
                  mStackPos - 1));
    }
#endif

    mSink->NotifyInsert(parent, aContent,
                        mStack[mStackPos - 1].mInsertionPoint - 1);
    mStack[mStackPos - 1].mNumFlushed = parent->GetChildCount();
  } else if (!aDidNotify && mSink->IsTimeToNotify()) {
    SINK_TRACE(SINK_TRACE_REFLOW,
               ("SinkContext::DidAddContent: Notification as a result of the "
                "interval expiring; backoff count: %d", mSink->mBackoffCount));
    FlushTags(PR_TRUE);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1550 of file nsHTMLContentSink.cpp.

{
  for (PRInt32 i = 0; i < mStackPos; i++) {
    NS_RELEASE(mStack[i].mContent);
  }

  mStackPos = 0;
  mTextLength = 0;

  return NS_OK;
}

Here is the caller graph for this function:

Flush all elements that have been seen so far such that they are visible in the tree.

Specifically, make sure that they are all added to their respective parents. Also, do notification at the top for all content that has been newly added so that the frame tree is complete.

Definition at line 1649 of file nsHTMLContentSink.cpp.

{
  // Not starting an update here, unlike trunk.  We'll get XBL
  // constructors firing async of the stuff we flush right now.
   
  // Don't release last text node in case we need to add to it again
  FlushText();

  if (aNotify) {
    // Start from the base of the stack (growing upward) and do
    // a notification from the node that is closest to the root of
    // tree for any content that has been added.
    PRInt32 stackPos = 1;
    PRBool flushed = PR_FALSE;
    PRUint32 childCount;
    nsGenericHTMLElement* content;

    while (stackPos < mStackPos) {
      content = mStack[stackPos].mContent;
      childCount = content->GetChildCount();

      if (!flushed && (mStack[stackPos].mNumFlushed < childCount)) {
#ifdef NS_DEBUG
        {
          // Tracing code
          const char* tagStr;
          mStack[stackPos].mContent->Tag()->GetUTF8String(&tagStr);

          SINK_TRACE(SINK_TRACE_REFLOW,
                     ("SinkContext::FlushTags: tag=%s from newindex=%d at "
                      "stackPos=%d", tagStr,
                      mStack[stackPos].mNumFlushed, stackPos));
        }
#endif
        if ((mStack[stackPos].mInsertionPoint != -1) &&
            (mStackPos > (stackPos + 1))) {
          nsIContent* child = mStack[stackPos + 1].mContent;
          mSink->NotifyInsert(content,
                              child,
                              mStack[stackPos].mInsertionPoint);
        } else {
          mSink->NotifyAppend(content, mStack[stackPos].mNumFlushed);
        }

        flushed = PR_TRUE;
      }

      mStack[stackPos].mNumFlushed = childCount;
      stackPos++;
    }
    mNotifyLevel = mStackPos - 1;
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult SinkContext::FlushText ( PRBool aDidFlush = nsnull,
PRBool  aReleaseLast = PR_FALSE 
)

Flush any buffered text out by creating a text content object and adding it to the content.

Definition at line 1728 of file nsHTMLContentSink.cpp.

{
  nsresult rv = NS_OK;
  PRBool didFlush = PR_FALSE;

  if (mTextLength != 0) {
    if (mLastTextNode) {
      if ((mLastTextNodeSize + mTextLength) > mSink->mMaxTextRun) {
        mLastTextNodeSize = 0;
        mLastTextNode = nsnull;
        FlushText(aDidFlush, aReleaseLast);
      } else {
        nsCOMPtr<nsIDOMCharacterData> cdata(do_QueryInterface(mLastTextNode));

        if (cdata) {
          rv = cdata->AppendData(Substring(mText, mText + mTextLength));

          mLastTextNodeSize += mTextLength;
          mTextLength = 0;
          didFlush = PR_TRUE;
        }
      }
    } else {
      nsCOMPtr<nsITextContent> textContent;
      rv = NS_NewTextNode(getter_AddRefs(textContent),
                          mSink->mNodeInfoManager);
      NS_ENSURE_SUCCESS(rv, rv);

      mLastTextNode = textContent;

      // Set the text in the text node
      mLastTextNode->SetText(mText, mTextLength, PR_FALSE);

      // Eat up the rest of the text up in state.
      mLastTextNodeSize += mTextLength;
      mTextLength = 0;

      // Add text to its parent
      NS_ASSERTION(mStackPos > 0, "leaf w/o container");
      if (mStackPos <= 0) {
        return NS_ERROR_FAILURE;
      }

      nsGenericHTMLElement* parent = mStack[mStackPos - 1].mContent;
      if (mStack[mStackPos - 1].mInsertionPoint != -1) {
        parent->InsertChildAt(mLastTextNode,
                              mStack[mStackPos - 1].mInsertionPoint++,
                              PR_FALSE);
      } else {
        parent->AppendChildTo(mLastTextNode, PR_FALSE);
      }

      didFlush = PR_TRUE;

      DidAddContent(mLastTextNode, PR_FALSE);
    }
  }

  if (aDidFlush) {
    *aDidFlush = didFlush;
  }

  if (aReleaseLast) {
    mLastTextNodeSize = 0;
    mLastTextNode = nsnull;
  }

#ifdef DEBUG
  if (didFlush &&
      SINK_LOG_TEST(gSinkLogModuleInfo, SINK_ALWAYS_REFLOW)) {
    mSink->ForceReflow();
  }
#endif

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 718 of file nsHTMLContentSink.cpp.

  {
    return FlushText(aDidFlush, PR_TRUE);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1089 of file nsHTMLContentSink.cpp.

Here is the call graph for this function:

Definition at line 1563 of file nsHTMLContentSink.cpp.

{
  PRInt32 newSize = mStackSize * 2;
  if (newSize == 0) {
    newSize = 32;
  }

  Node* stack = new Node[newSize];
  if (!stack) {
    return NS_ERROR_OUT_OF_MEMORY;
  }

  if (mStackPos != 0) {
    memcpy(stack, mStack, sizeof(Node) * mStackPos);
    delete [] mStack;
  }

  mStack = stack;
  mStackSize = newSize;

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1074 of file nsHTMLContentSink.cpp.

{
  PRInt32 stackPos = mStackPos - 1;

  while (stackPos >= 0) {
    if (aTag == mStack[stackPos].mType) {
      return PR_TRUE;
    }
    stackPos--;
  }

  return PR_FALSE;
}

Definition at line 1064 of file nsHTMLContentSink.cpp.

{
  if (aTag == mStack[mStackPos - 1].mType) {
    return PR_TRUE;
  }

  return PR_FALSE;
}

Definition at line 1148 of file nsHTMLContentSink.cpp.

{
  FlushTextAndRelease();

  SINK_TRACE_NODE(SINK_TRACE_CALLS,
                  "SinkContext::OpenContainer", 
                  nsHTMLTag(aNode.GetNodeType()), 
                  mStackPos, 
                  mSink);

  if (mStackPos <= 0) {
    NS_ERROR("container w/o parent");

    return NS_ERROR_FAILURE;
  }

  nsresult rv;
  if (mStackPos + 1 > mStackSize) {
    rv = GrowStack();
    if (NS_FAILED(rv)) {
      return rv;
    }
  }

  // Create new container content object
  nsHTMLTag nodeType = nsHTMLTag(aNode.GetNodeType());
  nsIDocShell *docshell = nsnull;
  if (mSink->mFrameset) docshell = (nsIDocShell *) mSink->mDocShell;
  nsGenericHTMLElement* content =
    mSink->CreateContentObject(aNode, nodeType, mSink->mCurrentForm,
                               docshell).get();
  if (!content) {
    return NS_ERROR_OUT_OF_MEMORY;
  }

  mStack[mStackPos].mType = nodeType;
  mStack[mStackPos].mContent = content;
  mStack[mStackPos].mNumFlushed = 0;
  mStack[mStackPos].mInsertionPoint = -1;
  ++mStackPos;

  // Make sure to add base tag info, if needed, before setting any other
  // attributes -- what URI attrs do will depend on the base URI.  Only do this
  // for elements that have useful URI attributes.
  // See bug 18478 and bug 30617 for why we need to do this.
  switch (nodeType) {
    // Containers with "href="
    case eHTMLTag_a:
    case eHTMLTag_map:
    
    // Containers with "action="
    case eHTMLTag_form:

    // Containers with "data="
    case eHTMLTag_object:

    // Containers with "background="
    case eHTMLTag_table:
    case eHTMLTag_thead:
    case eHTMLTag_tbody:
    case eHTMLTag_tfoot:
    case eHTMLTag_tr:
    case eHTMLTag_td:
    case eHTMLTag_th:
      mSink->AddBaseTagInfo(content);

      break;
    default:
      break;    
  }
  
  rv = mSink->AddAttributes(aNode, content);

  nsGenericHTMLElement* parent = mStack[mStackPos - 2].mContent;

  if (mStack[mStackPos - 2].mInsertionPoint != -1) {
    parent->InsertChildAt(content,
                          mStack[mStackPos - 2].mInsertionPoint++,
                          PR_FALSE);
  } else {
    parent->AppendChildTo(content, PR_FALSE);
  }

  NS_ENSURE_SUCCESS(rv, rv);

  if (mSink->IsMonolithicContainer(nodeType)) {
    mSink->mInMonolithicContainer++;
  }

  // Special handling for certain tags
  switch (nodeType) {
    case eHTMLTag_noembed:
    case eHTMLTag_noframes:
      mSink->mInsideNoXXXTag++;

      break;

    case eHTMLTag_map:
      mSink->ProcessMAPTag(content);
      break;
    case eHTMLTag_iframe:
      mSink->mNumOpenIFRAMES++;

      break;
    default:
      break;
  }

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 1706 of file nsHTMLContentSink.cpp.

{
  // Start from the top of the stack (growing upwards) and see if any
  // new content has been appended. If so, we recognize that reflows
  // have been generated for it and we should make sure that no
  // further reflows occur.
  PRInt32 stackPos = mStackPos - 1;
  while (stackPos > 0) {
    Node & node = mStack[stackPos];
    node.mNumFlushed = node.mContent->GetChildCount();

    stackPos--;
  }

  mNotifyLevel = mStackPos - 1;
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 734 of file nsHTMLContentSink.cpp.

Definition at line 735 of file nsHTMLContentSink.cpp.

Definition at line 733 of file nsHTMLContentSink.cpp.

Definition at line 732 of file nsHTMLContentSink.cpp.

Definition at line 744 of file nsHTMLContentSink.cpp.

Definition at line 746 of file nsHTMLContentSink.cpp.

Definition at line 745 of file nsHTMLContentSink.cpp.

Definition at line 748 of file nsHTMLContentSink.cpp.

Definition at line 749 of file nsHTMLContentSink.cpp.

Definition at line 750 of file nsHTMLContentSink.cpp.


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