Back to index

lightning-sunbird  0.9+nobinonly
nsTableCellFrame.cpp File Reference
#include "nsTableFrame.h"
#include "nsTableColFrame.h"
#include "nsTableCellFrame.h"
#include "nsTableRowGroupFrame.h"
#include "nsTablePainter.h"
#include "nsReflowPath.h"
#include "nsStyleContext.h"
#include "nsStyleConsts.h"
#include "nsPresContext.h"
#include "nsIRenderingContext.h"
#include "nsCSSRendering.h"
#include "nsIContent.h"
#include "nsGenericHTMLElement.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsVoidArray.h"
#include "nsIView.h"
#include "nsLayoutAtoms.h"
#include "nsIPresShell.h"
#include "nsCOMPtr.h"
#include "nsIDOMHTMLTableCellElement.h"
#include "nsIServiceManager.h"
#include "nsIDOMNode.h"
#include "nsINameSpaceManager.h"
#include "nsIFrameSelection.h"
#include "nsILookAndFeel.h"

Go to the source code of this file.


nscolor EnsureDifferentColors (nscolor colorA, nscolor colorB)
static nscoord CalcUnpaginagedHeight (nsPresContext *aPresContext, nsTableCellFrame &aCellFrame, nsTableFrame &aTableFrame, nscoord aVerticalBorderPadding)
nsresult NS_NewTableCellFrame (nsIPresShell *aPresShell, PRBool aIsBorderCollapse, nsIFrame **aNewFrame)

Function Documentation

static nscoord CalcUnpaginagedHeight ( nsPresContext aPresContext,
nsTableCellFrame aCellFrame,
nsTableFrame aTableFrame,
nscoord  aVerticalBorderPadding 
) [static]

Definition at line 684 of file nsTableCellFrame.cpp.

  const nsTableCellFrame* firstCellInFlow   = (nsTableCellFrame*)aCellFrame.GetFirstInFlow();
  nsTableFrame*           firstTableInFlow  = (nsTableFrame*)aTableFrame.GetFirstInFlow();
  nsTableRowFrame*        row
    = NS_STATIC_CAST(nsTableRowFrame*, firstCellInFlow->GetParent());
  nsTableRowGroupFrame*   firstRGInFlow
    = NS_STATIC_CAST(nsTableRowGroupFrame*, row->GetParent());

  PRInt32 rowIndex;
  PRInt32 rowSpan = aTableFrame.GetEffectiveRowSpan(*firstCellInFlow);
  nscoord cellSpacing = firstTableInFlow->GetCellSpacingX();

  nscoord computedHeight = ((rowSpan - 1) * cellSpacing) - aVerticalBorderPadding;
  PRInt32 rowX;
  for (row = firstRGInFlow->GetFirstRow(), rowX = 0; row; row = row->GetNextRow(), rowX++) {
    if (rowX > rowIndex + rowSpan - 1) {
    else if (rowX >= rowIndex) {
      computedHeight += row->GetUnpaginatedHeight(aPresContext);
  return computedHeight;

Here is the call graph for this function:

Here is the caller graph for this function:

nscolor EnsureDifferentColors ( nscolor  colorA,
nscolor  colorB 
) [inline]

Definition at line 270 of file nsTableCellFrame.cpp.

    if (colorA == colorB)
      nscolor res;
      res = NS_RGB(NS_GET_R(colorA) ^ 0xff,
                   NS_GET_G(colorA) ^ 0xff,
                   NS_GET_B(colorA) ^ 0xff);
      return res;
    return colorA;

Here is the call graph for this function:

nsresult NS_NewTableCellFrame ( nsIPresShell aPresShell,
PRBool  aIsBorderCollapse,
nsIFrame **  aNewFrame 

Definition at line 1143 of file nsTableCellFrame.cpp.

  NS_PRECONDITION(aNewFrame, "null OUT ptr");
  if (nsnull == aNewFrame) {
  nsTableCellFrame* it = (aIsBorderCollapse) ? new (aPresShell) nsBCTableCellFrame 
                                             : new (aPresShell) nsTableCellFrame;
  if (nsnull == it) {
  *aNewFrame = it;
  return NS_OK;

Here is the caller graph for this function: