Remove some unused table code. Bug 359139, r=bernd, sr=roc

This commit is contained in:
bzbarsky%mit.edu 2006-12-18 03:04:25 +00:00
parent f61607c926
commit 6705ad44ff
5 changed files with 3 additions and 91 deletions

View File

@ -40,9 +40,10 @@
#include "nsISupports.h"
// IID for the nsITableCellLayout interface
// 8c921430-ba23-11d2-8f4b-006008159b0c
// 0238f187-033d-426b-bd03-96eb75af5129
#define NS_ITABLECELLAYOUT_IID \
{ 0x8c921430, 0xba23, 0x11d2,{0x8f, 0xb4, 0x00, 0x60, 0x08, 0x15, 0x9b, 0x0c}}
{ 0x0238f187, 0x033d, 0x426b, \
{ 0xbd, 0x03, 0x96, 0xeb, 0x75, 0xaf, 0x51, 0x29 } }
/**
* nsITableCellLayout
@ -64,16 +65,6 @@ public:
/** return the mapped cell's column index (starting at 0 for the first column) */
virtual nsresult GetColIndex(PRInt32 &aColIndex) const = 0;
/** return the previous cell having the same column index as current cell
* returns null if no cell is present (but nsresult is still NS_OK)
*/
NS_IMETHOD GetPreviousCellInColumn(nsITableCellLayout **aCellLayout)=0;
/** return the next cell having the same column index
* returns null if no cell is present (but nsresult is still NS_OK)
*/
NS_IMETHOD GetNextCellInColumn(nsITableCellLayout **aCellLayout)=0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsITableCellLayout, NS_ITABLECELLAYOUT_IID)

View File

@ -931,49 +931,6 @@ nsTableCellFrame::GetCellIndexes(PRInt32 &aRowIndex, PRInt32 &aColIndex)
return NS_OK;
}
NS_IMETHODIMP
nsTableCellFrame::GetPreviousCellInColumn(nsITableCellLayout **aCellLayout)
{
if (!aCellLayout) return NS_ERROR_NULL_POINTER;
*aCellLayout = nsnull;
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
if (!tableFrame)
return NS_ERROR_FAILURE;
// Get current cell location
PRInt32 rowIndex, colIndex;
GetCellIndexes(rowIndex, colIndex);
if (colIndex > 0)
{
// Get the cellframe at previous colIndex
nsTableCellFrame *cellFrame = tableFrame->GetCellFrameAt(rowIndex, colIndex-1);
if (!cellFrame) return NS_ERROR_FAILURE;
return CallQueryInterface(cellFrame, aCellLayout);
}
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsTableCellFrame::GetNextCellInColumn(nsITableCellLayout **aCellLayout)
{
if (!aCellLayout) return NS_ERROR_NULL_POINTER;
*aCellLayout = nsnull;
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
if (!tableFrame)
return NS_ERROR_FAILURE;
// Get current cell location
PRInt32 rowIndex, colIndex;
GetCellIndexes(rowIndex, colIndex);
// Get the cellframe at next colIndex
nsTableCellFrame *cellFrame = tableFrame->GetCellFrameAt(rowIndex, colIndex+1);
if (!cellFrame) return NS_ERROR_FAILURE;
return CallQueryInterface(cellFrame, aCellLayout);
}
nsIFrame*
NS_NewTableCellFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext,

View File

@ -179,18 +179,6 @@ public:
/** return the mapped cell's row index (starting at 0 for the first row) */
virtual nsresult GetRowIndex(PRInt32 &aRowIndex) const;
/** return the previous cell having the same column index as current cell
* returns null if no cell is present (but nsresult is still NS_OK)
* (When used within layout, you can QI aCellLayout to get an nsIFrame*)
*/
NS_IMETHOD GetPreviousCellInColumn(nsITableCellLayout **aCellLayout);
/** return the next cell having the same column index
* returns null if no cell is present (but nsresult is still NS_OK)
* (When used within layout, you can QI aCellLayout to get an nsIFrame*)
*/
NS_IMETHOD GetNextCellInColumn(nsITableCellLayout **aCellLayout);
/**
* return the cell's specified col span. this is what was specified in the
* content model or in the style info, and is always >= 1.

View File

@ -499,16 +499,6 @@ nsTableFrame::GetColFrame(PRInt32 aColIndex) const
}
}
// can return nsnull
nsTableCellFrame* nsTableFrame::GetCellFrameAt(PRInt32 aRowIndex, PRInt32 aColIndex)
{
nsTableCellMap* cellMap = GetCellMap();
if (cellMap)
return cellMap->GetCellInfoAt(aRowIndex, aColIndex);
return nsnull;
}
PRInt32 nsTableFrame::GetEffectiveRowSpan(PRInt32 aRowIndex,
const nsTableCellFrame& aCell) const
{

View File

@ -473,14 +473,6 @@ public:
PRBool aRemoveFromCache,
PRBool aRemoveFromCellMap);
nsTableCellFrame* GetCellInfoAt(PRInt32 aRowX,
PRInt32 aColX,
PRBool* aOriginates = nsnull,
PRInt32* aColSpan = nsnull)
{
return GetCellMap()->GetCellInfoAt(aRowX, aColX, aOriginates, aColSpan);
}
PRInt32 GetNumCellsOriginatingInCol(PRInt32 aColIndex) const;
PRInt32 GetNumCellsOriginatingInRow(PRInt32 aRowIndex) const;
@ -695,12 +687,6 @@ public: /* ----- Cell Map public methods ----- */
// return the last col index which isn't of type eColAnonymousCell
PRInt32 GetIndexOfLastRealCol();
/** return the cell frame at aRowIndex, aColIndex.
* returns nsnull if the cell frame has not yet been allocated,
* or if aRowIndex or aColIndex is out of range
*/
nsTableCellFrame * GetCellFrameAt(PRInt32 aRowIndex, PRInt32 aColIndex);
/** returns PR_TRUE if table-layout:auto */
virtual PRBool IsAutoLayout();