Back to index

lightning-sunbird  0.9+nobinonly
nsMathMLTokenFrame.cpp File Reference
#include "nsCOMPtr.h"
#include "nsFrame.h"
#include "nsPresContext.h"
#include "nsUnitConversion.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsIRenderingContext.h"
#include "nsIFontMetrics.h"
#include "nsIDOMText.h"
#include "nsITextContent.h"
#include "nsFrameManager.h"
#include "nsLayoutAtoms.h"
#include "nsStyleChangeList.h"
#include "nsINameSpaceManager.h"
#include "nsMathMLTokenFrame.h"

Go to the source code of this file.


nsresult NS_NewMathMLTokenFrame (nsIPresShell *aPresShell, nsIFrame **aNewFrame)
static void CompressWhitespace (nsIContent *aContent)
static void SetQuote (nsPresContext *aPresContext, nsIFrame *aFrame, nsString &aValue)

Function Documentation

static void CompressWhitespace ( nsIContent aContent) [static]

Definition at line 99 of file nsMathMLTokenFrame.cpp.

  PRUint32 numKids = aContent->GetChildCount();
  for (PRUint32 kid = 0; kid < numKids; kid++) {
    nsCOMPtr<nsITextContent> tc(do_QueryInterface(aContent->GetChildAt(kid)));
    if (tc && tc->IsContentOfType(nsIContent::eTEXT)) {
      nsAutoString text;
      tc->SetText(text, PR_FALSE); // not meant to be used if notify is needed

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult NS_NewMathMLTokenFrame ( nsIPresShell aPresShell,
nsIFrame **  aNewFrame 

Definition at line 58 of file nsMathMLTokenFrame.cpp.

  NS_PRECONDITION(aNewFrame, "null OUT ptr");
  if (nsnull == aNewFrame) {
  nsMathMLTokenFrame* it = new (aPresShell) nsMathMLTokenFrame;
  if (nsnull == it) {
  *aNewFrame = it;  
  return NS_OK;
static void SetQuote ( nsPresContext aPresContext,
nsIFrame aFrame,
nsString aValue 
) [static]

Definition at line 377 of file nsMathMLTokenFrame.cpp.

  nsIFrame* textFrame;
  do {
    // walk down the hierarchy of first children because they could be wrapped
    textFrame = aFrame->GetFirstChild(nsnull);
    if (textFrame) {
      if (textFrame->GetType() == nsLayoutAtoms::textFrame)
    aFrame = textFrame;
  } while (textFrame);
  if (textFrame) {
    nsIContent* quoteContent = textFrame->GetContent();
    if (quoteContent) {
      nsCOMPtr<nsIDOMText> domText(do_QueryInterface(quoteContent));
      if (domText) {
        nsCOMPtr<nsITextContent> tc(do_QueryInterface(quoteContent));
        if (tc) {
          tc->SetText(aValue, PR_FALSE); // no notify since we don't want a reflow yet

Here is the call graph for this function:

Here is the caller graph for this function: