Remove unused functions bug 240559 r/sr =bzbarsky
git-svn-id: svn://10.0.0.236/trunk@155289 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -122,11 +122,6 @@ CPPSRCS = \
|
||||
nsHTMLTitleElement.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsIHTMLTableCellElement.h \
|
||||
nsIHTMLTableColElement.h \
|
||||
$(NULL)
|
||||
|
||||
# we don't want the shared lib, but we want to force the creation of a static lib.
|
||||
FORCE_STATIC_LIB = 1
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include "nsIHTMLTableCellElement.h"
|
||||
#include "nsIDOMHTMLTableCellElement.h"
|
||||
#include "nsIDOMHTMLTableRowElement.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
@@ -49,7 +48,6 @@
|
||||
#include "nsIDocument.h"
|
||||
|
||||
class nsHTMLTableCellElement : public nsGenericHTMLElement,
|
||||
public nsIHTMLTableCellElement,
|
||||
public nsIDOMHTMLTableCellElement
|
||||
{
|
||||
public:
|
||||
@@ -71,10 +69,6 @@ public:
|
||||
// nsIDOMHTMLTableCellElement
|
||||
NS_DECL_NSIDOMHTMLTABLECELLELEMENT
|
||||
|
||||
// nsIHTMLTableCellElement
|
||||
NS_METHOD GetColIndex (PRInt32* aColIndex);
|
||||
NS_METHOD SetColIndex (PRInt32 aColIndex);
|
||||
|
||||
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
nsAttrValue& aResult);
|
||||
@@ -90,8 +84,6 @@ protected:
|
||||
// found the row element that this cell is in or not.
|
||||
void GetRow(nsIDOMHTMLTableRowElement** aRow);
|
||||
nsIContent * GetTable();
|
||||
|
||||
PRInt32 mColIndex;
|
||||
};
|
||||
|
||||
nsresult
|
||||
@@ -123,7 +115,6 @@ NS_NewHTMLTableCellElement(nsIHTMLContent** aInstancePtrResult,
|
||||
|
||||
nsHTMLTableCellElement::nsHTMLTableCellElement()
|
||||
{
|
||||
mColIndex=0;
|
||||
}
|
||||
|
||||
nsHTMLTableCellElement::~nsHTMLTableCellElement()
|
||||
@@ -138,7 +129,6 @@ NS_IMPL_RELEASE_INHERITED(nsHTMLTableCellElement, nsGenericElement)
|
||||
// QueryInterface implementation for nsHTMLTableCellElement
|
||||
NS_HTML_CONTENT_INTERFACE_MAP_BEGIN(nsHTMLTableCellElement, nsGenericHTMLElement)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMHTMLTableCellElement)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIHTMLTableCellElement)
|
||||
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(HTMLTableCellElement)
|
||||
NS_HTML_CONTENT_INTERFACE_MAP_END
|
||||
|
||||
@@ -171,20 +161,6 @@ nsHTMLTableCellElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** @return the starting column for this cell in aColIndex. Always >= 1 */
|
||||
NS_METHOD nsHTMLTableCellElement::GetColIndex (PRInt32* aColIndex)
|
||||
{
|
||||
*aColIndex = mColIndex;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/** set the starting column for this cell. Always >= 1 */
|
||||
NS_METHOD nsHTMLTableCellElement::SetColIndex (PRInt32 aColIndex)
|
||||
{
|
||||
mColIndex = aColIndex;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// protected method
|
||||
void
|
||||
nsHTMLTableCellElement::GetRow(nsIDOMHTMLTableRowElement** aRow)
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include "nsIDOMHTMLTableColElement.h"
|
||||
#include "nsIHTMLTableColElement.h"
|
||||
#include "nsIDOMEventReceiver.h"
|
||||
#include "nsIHTMLContent.h"
|
||||
#include "nsMappedAttributes.h"
|
||||
@@ -50,8 +49,7 @@
|
||||
#define MAX_COLSPAN 1000
|
||||
|
||||
class nsHTMLTableColElement : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLTableColElement,
|
||||
public nsIHTMLTableColElement
|
||||
public nsIDOMHTMLTableColElement
|
||||
{
|
||||
public:
|
||||
nsHTMLTableColElement();
|
||||
@@ -72,9 +70,6 @@ public:
|
||||
// nsIDOMHTMLTableColElement
|
||||
NS_DECL_NSIDOMHTMLTABLECOLELEMENT
|
||||
|
||||
// nsIHTMLTableColElement
|
||||
NS_IMETHOD GetSpanValue(PRInt32* aSpan);
|
||||
|
||||
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
nsAttrValue& aResult);
|
||||
@@ -129,7 +124,6 @@ NS_IMPL_RELEASE_INHERITED(nsHTMLTableColElement, nsGenericElement)
|
||||
NS_HTML_CONTENT_INTERFACE_MAP_BEGIN(nsHTMLTableColElement,
|
||||
nsGenericHTMLElement)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMHTMLTableColElement)
|
||||
NS_INTERFACE_MAP_ENTRY_IF_TAG(nsIHTMLTableColElement, col) // for col only
|
||||
NS_INTERFACE_MAP_ENTRY_CONTENT_CLASSINFO(HTMLTableColElement)
|
||||
NS_HTML_CONTENT_INTERFACE_MAP_END
|
||||
|
||||
@@ -331,19 +325,3 @@ nsHTMLTableColElement::GetAttributeMappingFunction(nsMapRuleToAttributesFunc& aM
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_METHOD nsHTMLTableColElement::GetSpanValue(PRInt32* aSpan)
|
||||
{
|
||||
if (nsnull!=aSpan) {
|
||||
PRInt32 span=-1;
|
||||
GetSpan(&span);
|
||||
|
||||
if (-1==span)
|
||||
span=1; // the default;
|
||||
|
||||
*aSpan = span;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1302,7 +1302,7 @@ nsCellMap::AppendCell(nsTableCellMap& aMap,
|
||||
}
|
||||
|
||||
// initialize the cell frame
|
||||
aCellFrame->InitCellFrame(startColIndex);
|
||||
aCellFrame->SetColIndex(startColIndex);
|
||||
|
||||
// Create CellData objects for the rows that this cell spans. Set
|
||||
// their mOrigCell to nsnull and their mSpanData to point to data.
|
||||
@@ -1586,7 +1586,7 @@ void nsCellMap::ExpandWithCells(nsTableCellMap& aMap,
|
||||
SetDataAt(aMap, *data, rowX, colX, (colX == aColIndex + 1));
|
||||
}
|
||||
}
|
||||
cellFrame->InitCellFrame(startColIndex);
|
||||
cellFrame->SetColIndex(startColIndex);
|
||||
}
|
||||
PRInt32 damageHeight = (aRowSpanIsZero) ? aMap.GetColCount() - aRowIndex : aRowSpan;
|
||||
SetDamageArea(aColIndex, aRowIndex, 1 + endColIndex - aColIndex, damageHeight, aDamageArea);
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIHTMLTableCellElement.h"
|
||||
#include "nsIDOMHTMLTableCellElement.h"
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "nsIAccessibilityService.h"
|
||||
@@ -127,7 +126,7 @@ nsTableCellFrame::Init(nsIPresContext* aPresContext,
|
||||
nsTableCellFrame* cellFrame = (nsTableCellFrame*)aPrevInFlow;
|
||||
PRInt32 colIndex;
|
||||
cellFrame->GetColIndex(colIndex);
|
||||
InitCellFrame(colIndex);
|
||||
SetColIndex(colIndex);
|
||||
}
|
||||
|
||||
return rv;
|
||||
@@ -274,35 +273,9 @@ nsTableCellFrame::RemoveFrame(nsIPresContext* aPresContext,
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
void nsTableCellFrame::InitCellFrame(PRInt32 aColIndex)
|
||||
{
|
||||
nsTableFrame* tableFrame=nsnull; // I should be checking my own style context, but border-collapse isn't inheriting correctly
|
||||
nsresult rv = nsTableFrame::GetTableFrame(this, tableFrame);
|
||||
if ((NS_SUCCEEDED(rv)) && tableFrame) {
|
||||
SetColIndex(aColIndex);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult nsTableCellFrame::SetColIndex(PRInt32 aColIndex)
|
||||
void nsTableCellFrame::SetColIndex(PRInt32 aColIndex)
|
||||
{
|
||||
mBits.mColIndex = aColIndex;
|
||||
// for style context optimization, set the content's column index if possible.
|
||||
// this can only be done if we really have an nsTableCell.
|
||||
// other tags mapped to table cell display won't benefit from this optimization
|
||||
// see nsHTMLStyleSheet::RulesMatching
|
||||
|
||||
//nsIContent* cell = kidFrame->GetContent();
|
||||
nsIContent* cell = GetContent();
|
||||
if (!cell)
|
||||
return NS_OK;
|
||||
|
||||
nsIHTMLTableCellElement* cellContent = nsnull;
|
||||
nsresult rv = CallQueryInterface(cell, &cellContent); // cellContent: REFCNT++
|
||||
if (cellContent && NS_SUCCEEDED(rv)) { // it's a table cell
|
||||
cellContent->SetColIndex(aColIndex);
|
||||
NS_RELEASE(cellContent);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -119,9 +119,6 @@ public:
|
||||
virtual void NotifyPercentHeight(const nsHTMLReflowState& aReflowState);
|
||||
|
||||
virtual PRBool NeedsToObserve(const nsHTMLReflowState& aReflowState);
|
||||
|
||||
void InitCellFrame(PRInt32 aColIndex);
|
||||
|
||||
|
||||
/** instantiate a new instance of nsTableCellFrame.
|
||||
* @param aResult the new object is returned in this out-param
|
||||
@@ -213,7 +210,7 @@ public:
|
||||
|
||||
/** return the cell's column index (starting at 0 for the first column) */
|
||||
virtual nsresult GetColIndex(PRInt32 &aColIndex) const;
|
||||
virtual nsresult SetColIndex(PRInt32 aColIndex);
|
||||
void SetColIndex(PRInt32 aColIndex);
|
||||
|
||||
/** return the available width given to this frame during its last reflow */
|
||||
virtual nscoord GetPriorAvailWidth();
|
||||
|
||||
@@ -53,9 +53,6 @@
|
||||
#include "nsTableColGroupFrame.h"
|
||||
#include "nsTableColFrame.h"
|
||||
#include "nsCOMPtr.h"
|
||||
// the following header files are required for style optimizations that work only when the child content is really a cell
|
||||
#include "nsIHTMLTableCellElement.h"
|
||||
// end includes for style optimizations that require real content knowledge
|
||||
|
||||
|
||||
struct nsTableCellReflowState : public nsHTMLReflowState
|
||||
|
||||
@@ -170,7 +170,7 @@ nsTableRowGroupFrame::InitRepeatedFrame(nsIPresContext* aPresContext,
|
||||
"cell frames have different content");
|
||||
PRInt32 colIndex;
|
||||
originalCellFrame->GetColIndex(colIndex);
|
||||
copyCellFrame->InitCellFrame(colIndex);
|
||||
copyCellFrame->SetColIndex(colIndex);
|
||||
|
||||
// Move to the next cell frame
|
||||
copyCellFrame = copyCellFrame->GetNextCell();
|
||||
|
||||
@@ -1302,7 +1302,7 @@ nsCellMap::AppendCell(nsTableCellMap& aMap,
|
||||
}
|
||||
|
||||
// initialize the cell frame
|
||||
aCellFrame->InitCellFrame(startColIndex);
|
||||
aCellFrame->SetColIndex(startColIndex);
|
||||
|
||||
// Create CellData objects for the rows that this cell spans. Set
|
||||
// their mOrigCell to nsnull and their mSpanData to point to data.
|
||||
@@ -1586,7 +1586,7 @@ void nsCellMap::ExpandWithCells(nsTableCellMap& aMap,
|
||||
SetDataAt(aMap, *data, rowX, colX, (colX == aColIndex + 1));
|
||||
}
|
||||
}
|
||||
cellFrame->InitCellFrame(startColIndex);
|
||||
cellFrame->SetColIndex(startColIndex);
|
||||
}
|
||||
PRInt32 damageHeight = (aRowSpanIsZero) ? aMap.GetColCount() - aRowIndex : aRowSpan;
|
||||
SetDamageArea(aColIndex, aRowIndex, 1 + endColIndex - aColIndex, damageHeight, aDamageArea);
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
#include "nsLayoutAtoms.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIHTMLTableCellElement.h"
|
||||
#include "nsIDOMHTMLTableCellElement.h"
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "nsIAccessibilityService.h"
|
||||
@@ -127,7 +126,7 @@ nsTableCellFrame::Init(nsIPresContext* aPresContext,
|
||||
nsTableCellFrame* cellFrame = (nsTableCellFrame*)aPrevInFlow;
|
||||
PRInt32 colIndex;
|
||||
cellFrame->GetColIndex(colIndex);
|
||||
InitCellFrame(colIndex);
|
||||
SetColIndex(colIndex);
|
||||
}
|
||||
|
||||
return rv;
|
||||
@@ -274,35 +273,9 @@ nsTableCellFrame::RemoveFrame(nsIPresContext* aPresContext,
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
void nsTableCellFrame::InitCellFrame(PRInt32 aColIndex)
|
||||
{
|
||||
nsTableFrame* tableFrame=nsnull; // I should be checking my own style context, but border-collapse isn't inheriting correctly
|
||||
nsresult rv = nsTableFrame::GetTableFrame(this, tableFrame);
|
||||
if ((NS_SUCCEEDED(rv)) && tableFrame) {
|
||||
SetColIndex(aColIndex);
|
||||
}
|
||||
}
|
||||
|
||||
nsresult nsTableCellFrame::SetColIndex(PRInt32 aColIndex)
|
||||
void nsTableCellFrame::SetColIndex(PRInt32 aColIndex)
|
||||
{
|
||||
mBits.mColIndex = aColIndex;
|
||||
// for style context optimization, set the content's column index if possible.
|
||||
// this can only be done if we really have an nsTableCell.
|
||||
// other tags mapped to table cell display won't benefit from this optimization
|
||||
// see nsHTMLStyleSheet::RulesMatching
|
||||
|
||||
//nsIContent* cell = kidFrame->GetContent();
|
||||
nsIContent* cell = GetContent();
|
||||
if (!cell)
|
||||
return NS_OK;
|
||||
|
||||
nsIHTMLTableCellElement* cellContent = nsnull;
|
||||
nsresult rv = CallQueryInterface(cell, &cellContent); // cellContent: REFCNT++
|
||||
if (cellContent && NS_SUCCEEDED(rv)) { // it's a table cell
|
||||
cellContent->SetColIndex(aColIndex);
|
||||
NS_RELEASE(cellContent);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -119,9 +119,6 @@ public:
|
||||
virtual void NotifyPercentHeight(const nsHTMLReflowState& aReflowState);
|
||||
|
||||
virtual PRBool NeedsToObserve(const nsHTMLReflowState& aReflowState);
|
||||
|
||||
void InitCellFrame(PRInt32 aColIndex);
|
||||
|
||||
|
||||
/** instantiate a new instance of nsTableCellFrame.
|
||||
* @param aResult the new object is returned in this out-param
|
||||
@@ -213,7 +210,7 @@ public:
|
||||
|
||||
/** return the cell's column index (starting at 0 for the first column) */
|
||||
virtual nsresult GetColIndex(PRInt32 &aColIndex) const;
|
||||
virtual nsresult SetColIndex(PRInt32 aColIndex);
|
||||
void SetColIndex(PRInt32 aColIndex);
|
||||
|
||||
/** return the available width given to this frame during its last reflow */
|
||||
virtual nscoord GetPriorAvailWidth();
|
||||
|
||||
@@ -53,9 +53,6 @@
|
||||
#include "nsTableColGroupFrame.h"
|
||||
#include "nsTableColFrame.h"
|
||||
#include "nsCOMPtr.h"
|
||||
// the following header files are required for style optimizations that work only when the child content is really a cell
|
||||
#include "nsIHTMLTableCellElement.h"
|
||||
// end includes for style optimizations that require real content knowledge
|
||||
|
||||
|
||||
struct nsTableCellReflowState : public nsHTMLReflowState
|
||||
|
||||
@@ -170,7 +170,7 @@ nsTableRowGroupFrame::InitRepeatedFrame(nsIPresContext* aPresContext,
|
||||
"cell frames have different content");
|
||||
PRInt32 colIndex;
|
||||
originalCellFrame->GetColIndex(colIndex);
|
||||
copyCellFrame->InitCellFrame(colIndex);
|
||||
copyCellFrame->SetColIndex(colIndex);
|
||||
|
||||
// Move to the next cell frame
|
||||
copyCellFrame = copyCellFrame->GetNextCell();
|
||||
|
||||
Reference in New Issue
Block a user