Fixed numerous compiler warnings (hopefully) from the mac build

This commit is contained in:
kipp%netscape.com 1998-12-18 17:34:34 +00:00
Родитель a7f838d8d2
Коммит 12fb04dd78
27 изменённых файлов: 116 добавлений и 152 удалений

Просмотреть файл

@ -544,10 +544,10 @@ nsIArena* nsDocument::GetArena()
return mArena;
}
NS_IMETHODIMP
nsDocument::StartDocumentLoad(nsIURL *aURL,
nsIContentViewerContainer* aContainer,
nsIStreamListener **aDocListener)
nsresult
nsDocument::StartDocLoad(nsIURL *aURL,
nsIContentViewerContainer* aContainer,
nsIStreamListener **aDocListener)
{
// Delete references to style sheets - this should be done in superclass...
PRInt32 index = mStyleSheets.Count();

Просмотреть файл

@ -58,16 +58,13 @@ class nsDocument : public nsIDocument,
public nsIDOMNSDocument,
public nsIScriptObjectOwner,
public nsIDOMEventCapturer,
public nsIJSScriptObject {
public nsIJSScriptObject
{
public:
NS_DECL_ISUPPORTS
virtual nsIArena* GetArena();
NS_IMETHOD StartDocumentLoad(nsIURL *aUrl,
nsIContentViewerContainer* aContainer,
nsIStreamListener **aDocListener);
/**
* Return the title of the document. May return null.
*/
@ -296,6 +293,11 @@ protected:
const nsIContent* aTest2) const;
protected:
virtual nsresult StartDocLoad(nsIURL *aUrl,
nsIContentViewerContainer* aContainer,
nsIStreamListener **aDocListener);
virtual void AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet); // subclass hook
nsDocument();

Просмотреть файл

@ -748,7 +748,7 @@ static PRInt32 gInstanceCount;
static PRInt32 gInstrument = 6;
#endif
PRBool HashStyleRule(nsISupports* aRule, void* aData)
static PRBool HashStyleRule(nsISupports* aRule, void* aData)
{
*((PRUint32*)aData) ^= PRUint32(aRule);
return PR_TRUE;
@ -1132,7 +1132,7 @@ struct MapStyleData {
nsIPresContext* mPresContext;
};
PRBool MapStyleRule(nsISupports* aRule, void* aData)
static PRBool MapStyleRule(nsISupports* aRule, void* aData)
{
nsIStyleRule* rule = (nsIStyleRule*)aRule;
MapStyleData* data = (MapStyleData*)aData;

Просмотреть файл

@ -20,6 +20,7 @@
#define nsGenericHTMLElement_h___
#include "nsGenericElement.h"
#include "nsHTMLParts.h"
#include "nsIDOMHTMLElement.h"
#include "nsIContent.h"
#include "nsHTMLValue.h"

Просмотреть файл

@ -701,7 +701,7 @@ nsHTMLTableElement::InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aValue)
{
nsIDOMNode *newRowNode=nsnull;
newRow->QueryInterface(kIDOMNodeIID, (void **)&newRowNode); // caller's addref
if ((0<=aIndex) && (rowCount<=aIndex)) // the index is greater than the number of rows, so just append
if ((0<=aIndex) && (PRInt32(rowCount)<=aIndex)) // the index is greater than the number of rows, so just append
rv = parent->AppendChild(newRowNode, (nsIDOMNode **)aValue);
else // insert the new row before the reference row we found above
rv = parent->InsertBefore(newRowNode, refRow, (nsIDOMNode **)aValue);

Просмотреть файл

@ -207,8 +207,7 @@ nsHTMLDocument::StartDocumentLoad(nsIURL *aURL,
nsIStreamListener **aDocListener,
const char* aCommand)
{
nsresult rv = nsDocument::StartDocumentLoad(aURL, aContainer,
aDocListener);
nsresult rv = nsDocument::StartDocLoad(aURL, aContainer, aDocListener);
if (NS_FAILED(rv)) {
return rv;
}

Просмотреть файл

@ -126,8 +126,7 @@ nsXMLDocument::StartDocumentLoad(nsIURL *aUrl,
nsIStreamListener **aDocListener,
const char* aCommand)
{
nsresult rv = nsDocument::StartDocumentLoad(aUrl, aContainer,
aDocListener);
nsresult rv = nsDocument::StartDocLoad(aUrl, aContainer, aDocListener);
if (NS_FAILED(rv)) {
return rv;
}

Просмотреть файл

@ -544,10 +544,10 @@ nsIArena* nsDocument::GetArena()
return mArena;
}
NS_IMETHODIMP
nsDocument::StartDocumentLoad(nsIURL *aURL,
nsIContentViewerContainer* aContainer,
nsIStreamListener **aDocListener)
nsresult
nsDocument::StartDocLoad(nsIURL *aURL,
nsIContentViewerContainer* aContainer,
nsIStreamListener **aDocListener)
{
// Delete references to style sheets - this should be done in superclass...
PRInt32 index = mStyleSheets.Count();

Просмотреть файл

@ -58,16 +58,13 @@ class nsDocument : public nsIDocument,
public nsIDOMNSDocument,
public nsIScriptObjectOwner,
public nsIDOMEventCapturer,
public nsIJSScriptObject {
public nsIJSScriptObject
{
public:
NS_DECL_ISUPPORTS
virtual nsIArena* GetArena();
NS_IMETHOD StartDocumentLoad(nsIURL *aUrl,
nsIContentViewerContainer* aContainer,
nsIStreamListener **aDocListener);
/**
* Return the title of the document. May return null.
*/
@ -296,6 +293,11 @@ protected:
const nsIContent* aTest2) const;
protected:
virtual nsresult StartDocLoad(nsIURL *aUrl,
nsIContentViewerContainer* aContainer,
nsIStreamListener **aDocListener);
virtual void AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet); // subclass hook
nsDocument();

Просмотреть файл

@ -748,7 +748,7 @@ static PRInt32 gInstanceCount;
static PRInt32 gInstrument = 6;
#endif
PRBool HashStyleRule(nsISupports* aRule, void* aData)
static PRBool HashStyleRule(nsISupports* aRule, void* aData)
{
*((PRUint32*)aData) ^= PRUint32(aRule);
return PR_TRUE;
@ -1132,7 +1132,7 @@ struct MapStyleData {
nsIPresContext* mPresContext;
};
PRBool MapStyleRule(nsISupports* aRule, void* aData)
static PRBool MapStyleRule(nsISupports* aRule, void* aData)
{
nsIStyleRule* rule = (nsIStyleRule*)aRule;
MapStyleData* data = (MapStyleData*)aData;

Просмотреть файл

@ -940,7 +940,7 @@ nsBaseIBFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
aState.reflowCommand->GetPrevSiblingFrame(prevSibling);
// Remove the frame. This marks the affected lines dirty.
RemoveFrame(aState, this, deletedFrame, prevSibling);
DoRemoveFrame(aState, this, deletedFrame, prevSibling);
return NS_OK;
}
@ -3095,10 +3095,10 @@ nsBaseIBFrame::InsertNewFrame(nsIPresContext& aPresContext,
// XXX this code can't work...rewrite it!
nsresult
nsBaseIBFrame::RemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
nsBaseIBFrame::DoRemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
{
// Find the line that contains deletedFrame; we also find the pointer to
// the line.
@ -4577,7 +4577,7 @@ nsBlockFrame::BuildFloaterList()
// XXX keep the text-run data in the first-in-flow of the block
nsresult
nsBlockFrame::FindTextRuns(nsBlockReflowState& aState)
nsBlockFrame::ComputeTextRuns(nsBlockReflowState& aState)
{
// Destroy old run information first
nsTextRun::DeleteTextRuns(mTextRuns);
@ -4722,7 +4722,7 @@ nsBlockFrame::PrepareInitialReflow(nsBlockReflowState& aState)
}
nsresult rv = nsBlockFrameSuper::PrepareInitialReflow(aState);
FindTextRuns(aState);
ComputeTextRuns(aState);
RenumberLists(aState);
return rv;
}
@ -4732,7 +4732,7 @@ nsBlockFrame::PrepareFrameAppendedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameAppendedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4741,7 +4741,7 @@ nsBlockFrame::PrepareFrameInsertedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameInsertedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4750,7 +4750,7 @@ nsBlockFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameRemovedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}

Просмотреть файл

@ -131,10 +131,10 @@ protected:
nsIFrame* aNewFrame,
nsIFrame* aPrevSibling);
nsresult RemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling);
nsresult DoRemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling);
virtual nsresult PrepareInitialReflow(nsBlockReflowState& aState);
@ -361,7 +361,7 @@ protected:
void TakeRunInFrames(nsBlockFrame* aRunInFrame);
nsresult FindTextRuns(nsBlockReflowState& aState);
nsresult ComputeTextRuns(nsBlockReflowState& aState);
void BuildFloaterList();

Просмотреть файл

@ -940,7 +940,7 @@ nsBaseIBFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
aState.reflowCommand->GetPrevSiblingFrame(prevSibling);
// Remove the frame. This marks the affected lines dirty.
RemoveFrame(aState, this, deletedFrame, prevSibling);
DoRemoveFrame(aState, this, deletedFrame, prevSibling);
return NS_OK;
}
@ -3095,10 +3095,10 @@ nsBaseIBFrame::InsertNewFrame(nsIPresContext& aPresContext,
// XXX this code can't work...rewrite it!
nsresult
nsBaseIBFrame::RemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
nsBaseIBFrame::DoRemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
{
// Find the line that contains deletedFrame; we also find the pointer to
// the line.
@ -4577,7 +4577,7 @@ nsBlockFrame::BuildFloaterList()
// XXX keep the text-run data in the first-in-flow of the block
nsresult
nsBlockFrame::FindTextRuns(nsBlockReflowState& aState)
nsBlockFrame::ComputeTextRuns(nsBlockReflowState& aState)
{
// Destroy old run information first
nsTextRun::DeleteTextRuns(mTextRuns);
@ -4722,7 +4722,7 @@ nsBlockFrame::PrepareInitialReflow(nsBlockReflowState& aState)
}
nsresult rv = nsBlockFrameSuper::PrepareInitialReflow(aState);
FindTextRuns(aState);
ComputeTextRuns(aState);
RenumberLists(aState);
return rv;
}
@ -4732,7 +4732,7 @@ nsBlockFrame::PrepareFrameAppendedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameAppendedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4741,7 +4741,7 @@ nsBlockFrame::PrepareFrameInsertedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameInsertedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4750,7 +4750,7 @@ nsBlockFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameRemovedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}

Просмотреть файл

@ -940,7 +940,7 @@ nsBaseIBFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
aState.reflowCommand->GetPrevSiblingFrame(prevSibling);
// Remove the frame. This marks the affected lines dirty.
RemoveFrame(aState, this, deletedFrame, prevSibling);
DoRemoveFrame(aState, this, deletedFrame, prevSibling);
return NS_OK;
}
@ -3095,10 +3095,10 @@ nsBaseIBFrame::InsertNewFrame(nsIPresContext& aPresContext,
// XXX this code can't work...rewrite it!
nsresult
nsBaseIBFrame::RemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
nsBaseIBFrame::DoRemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
{
// Find the line that contains deletedFrame; we also find the pointer to
// the line.
@ -4577,7 +4577,7 @@ nsBlockFrame::BuildFloaterList()
// XXX keep the text-run data in the first-in-flow of the block
nsresult
nsBlockFrame::FindTextRuns(nsBlockReflowState& aState)
nsBlockFrame::ComputeTextRuns(nsBlockReflowState& aState)
{
// Destroy old run information first
nsTextRun::DeleteTextRuns(mTextRuns);
@ -4722,7 +4722,7 @@ nsBlockFrame::PrepareInitialReflow(nsBlockReflowState& aState)
}
nsresult rv = nsBlockFrameSuper::PrepareInitialReflow(aState);
FindTextRuns(aState);
ComputeTextRuns(aState);
RenumberLists(aState);
return rv;
}
@ -4732,7 +4732,7 @@ nsBlockFrame::PrepareFrameAppendedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameAppendedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4741,7 +4741,7 @@ nsBlockFrame::PrepareFrameInsertedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameInsertedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4750,7 +4750,7 @@ nsBlockFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameRemovedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}

Просмотреть файл

@ -1860,7 +1860,7 @@ void nsFrame::NewContentIsBefore(nsIPresContext& aPresContext,
/********************************************************
* Refreshes each content's frame
*********************************************************/
void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent)
static void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent)
{
nsIContent* frameContent;
aFrame->GetContent(frameContent);
@ -1879,7 +1879,7 @@ void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent)
/********************************************************
* Refreshes each content's frame
*********************************************************/
void RefreshContentFrames(nsIPresContext& aPresContext,
static void RefreshContentFrames(nsIPresContext& aPresContext,
nsIContent * aStartContent,
nsIContent * aEndContent)
{
@ -2082,7 +2082,7 @@ void ForceDrawFrame(nsFrame * aFrame)//, PRBool)
//----------------------------
//
//----------------------------
void resetContentTrackers() {
static void resetContentTrackers() {
PRInt32 i;
for (i=0;i<fTrackerRemoveListMax;i++) {
NS_RELEASE(fTrackerContentArrayRemoveList[i]);
@ -2097,7 +2097,7 @@ void resetContentTrackers() {
//----------------------------
//
//----------------------------
void RefreshFromContentTrackers(nsIPresContext& aPresContext) {
static void RefreshFromContentTrackers(nsIPresContext& aPresContext) {
PRInt32 i;
nsIPresShell * shell = aPresContext.GetShell();
@ -2120,7 +2120,7 @@ void RefreshFromContentTrackers(nsIPresContext& aPresContext) {
//----------------------------
//
//----------------------------
void addRangeToSelectionTrackers(nsIContent * aStartContent, nsIContent * aEndContent, PRUint32 aType)
static void addRangeToSelectionTrackers(nsIContent * aStartContent, nsIContent * aEndContent, PRUint32 aType)
{
if (aStartContent == nsnull || aEndContent == nsnull) {
return;

Просмотреть файл

@ -293,9 +293,6 @@ extern nsresult NS_NewTableRowFrame(nsIFrame*& aResult);
extern nsresult NS_NewTableRowGroupFrame(nsIFrame*& aResult);
extern nsresult NS_NewTableCellFrame(nsIFrame*& aResult);
// Everything below this line is obsolete...
//----------------------------------------------------------------------
// XXX naming consistency puhleeze!
// XXX passing aWebShell into this is wrong
extern nsresult NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
@ -303,22 +300,6 @@ extern nsresult NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
nsIURL* aURL,
nsIWebShell* aWebShell);
extern nsresult
NS_NewHTMLEmbed(nsIHTMLContent** aInstancePtrResult,
nsIAtom* aTag);
extern nsresult
NS_NewHTMLObject(nsIHTMLContent** aInstancePtrResult,
nsIAtom* aTag);
extern nsresult
NS_NewHTMLImage(nsIHTMLContent** aInstancePtrResult,
nsIAtom* aTag);
extern nsresult
NS_NewHTMLLayer(nsIHTMLContent** aInstancePtrResult,
nsIAtom* aTag);
/** Create a new HTML reflow command */
extern nsresult
NS_NewHTMLReflowCommand(nsIReflowCommand** aInstancePtrResult,

Просмотреть файл

@ -940,7 +940,7 @@ nsBaseIBFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
aState.reflowCommand->GetPrevSiblingFrame(prevSibling);
// Remove the frame. This marks the affected lines dirty.
RemoveFrame(aState, this, deletedFrame, prevSibling);
DoRemoveFrame(aState, this, deletedFrame, prevSibling);
return NS_OK;
}
@ -3095,10 +3095,10 @@ nsBaseIBFrame::InsertNewFrame(nsIPresContext& aPresContext,
// XXX this code can't work...rewrite it!
nsresult
nsBaseIBFrame::RemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
nsBaseIBFrame::DoRemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
{
// Find the line that contains deletedFrame; we also find the pointer to
// the line.
@ -4577,7 +4577,7 @@ nsBlockFrame::BuildFloaterList()
// XXX keep the text-run data in the first-in-flow of the block
nsresult
nsBlockFrame::FindTextRuns(nsBlockReflowState& aState)
nsBlockFrame::ComputeTextRuns(nsBlockReflowState& aState)
{
// Destroy old run information first
nsTextRun::DeleteTextRuns(mTextRuns);
@ -4722,7 +4722,7 @@ nsBlockFrame::PrepareInitialReflow(nsBlockReflowState& aState)
}
nsresult rv = nsBlockFrameSuper::PrepareInitialReflow(aState);
FindTextRuns(aState);
ComputeTextRuns(aState);
RenumberLists(aState);
return rv;
}
@ -4732,7 +4732,7 @@ nsBlockFrame::PrepareFrameAppendedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameAppendedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4741,7 +4741,7 @@ nsBlockFrame::PrepareFrameInsertedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameInsertedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4750,7 +4750,7 @@ nsBlockFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameRemovedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}

Просмотреть файл

@ -131,10 +131,10 @@ protected:
nsIFrame* aNewFrame,
nsIFrame* aPrevSibling);
nsresult RemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling);
nsresult DoRemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling);
virtual nsresult PrepareInitialReflow(nsBlockReflowState& aState);
@ -361,7 +361,7 @@ protected:
void TakeRunInFrames(nsBlockFrame* aRunInFrame);
nsresult FindTextRuns(nsBlockReflowState& aState);
nsresult ComputeTextRuns(nsBlockReflowState& aState);
void BuildFloaterList();

Просмотреть файл

@ -940,7 +940,7 @@ nsBaseIBFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
aState.reflowCommand->GetPrevSiblingFrame(prevSibling);
// Remove the frame. This marks the affected lines dirty.
RemoveFrame(aState, this, deletedFrame, prevSibling);
DoRemoveFrame(aState, this, deletedFrame, prevSibling);
return NS_OK;
}
@ -3095,10 +3095,10 @@ nsBaseIBFrame::InsertNewFrame(nsIPresContext& aPresContext,
// XXX this code can't work...rewrite it!
nsresult
nsBaseIBFrame::RemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
nsBaseIBFrame::DoRemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
{
// Find the line that contains deletedFrame; we also find the pointer to
// the line.
@ -4577,7 +4577,7 @@ nsBlockFrame::BuildFloaterList()
// XXX keep the text-run data in the first-in-flow of the block
nsresult
nsBlockFrame::FindTextRuns(nsBlockReflowState& aState)
nsBlockFrame::ComputeTextRuns(nsBlockReflowState& aState)
{
// Destroy old run information first
nsTextRun::DeleteTextRuns(mTextRuns);
@ -4722,7 +4722,7 @@ nsBlockFrame::PrepareInitialReflow(nsBlockReflowState& aState)
}
nsresult rv = nsBlockFrameSuper::PrepareInitialReflow(aState);
FindTextRuns(aState);
ComputeTextRuns(aState);
RenumberLists(aState);
return rv;
}
@ -4732,7 +4732,7 @@ nsBlockFrame::PrepareFrameAppendedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameAppendedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4741,7 +4741,7 @@ nsBlockFrame::PrepareFrameInsertedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameInsertedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4750,7 +4750,7 @@ nsBlockFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameRemovedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}

Просмотреть файл

@ -940,7 +940,7 @@ nsBaseIBFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
aState.reflowCommand->GetPrevSiblingFrame(prevSibling);
// Remove the frame. This marks the affected lines dirty.
RemoveFrame(aState, this, deletedFrame, prevSibling);
DoRemoveFrame(aState, this, deletedFrame, prevSibling);
return NS_OK;
}
@ -3095,10 +3095,10 @@ nsBaseIBFrame::InsertNewFrame(nsIPresContext& aPresContext,
// XXX this code can't work...rewrite it!
nsresult
nsBaseIBFrame::RemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
nsBaseIBFrame::DoRemoveFrame(nsBlockReflowState& aState,
nsBaseIBFrame* aParentFrame,
nsIFrame* aDeletedFrame,
nsIFrame* aPrevSibling)
{
// Find the line that contains deletedFrame; we also find the pointer to
// the line.
@ -4577,7 +4577,7 @@ nsBlockFrame::BuildFloaterList()
// XXX keep the text-run data in the first-in-flow of the block
nsresult
nsBlockFrame::FindTextRuns(nsBlockReflowState& aState)
nsBlockFrame::ComputeTextRuns(nsBlockReflowState& aState)
{
// Destroy old run information first
nsTextRun::DeleteTextRuns(mTextRuns);
@ -4722,7 +4722,7 @@ nsBlockFrame::PrepareInitialReflow(nsBlockReflowState& aState)
}
nsresult rv = nsBlockFrameSuper::PrepareInitialReflow(aState);
FindTextRuns(aState);
ComputeTextRuns(aState);
RenumberLists(aState);
return rv;
}
@ -4732,7 +4732,7 @@ nsBlockFrame::PrepareFrameAppendedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameAppendedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4741,7 +4741,7 @@ nsBlockFrame::PrepareFrameInsertedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameInsertedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}
@ -4750,7 +4750,7 @@ nsBlockFrame::PrepareFrameRemovedReflow(nsBlockReflowState& aState)
{
nsresult rv = nsBlockFrameSuper::PrepareFrameRemovedReflow(aState);
RenumberLists(aState);
rv = FindTextRuns(aState);
rv = ComputeTextRuns(aState);
return rv;
}

Просмотреть файл

@ -1860,7 +1860,7 @@ void nsFrame::NewContentIsBefore(nsIPresContext& aPresContext,
/********************************************************
* Refreshes each content's frame
*********************************************************/
void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent)
static void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent)
{
nsIContent* frameContent;
aFrame->GetContent(frameContent);
@ -1879,7 +1879,7 @@ void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent)
/********************************************************
* Refreshes each content's frame
*********************************************************/
void RefreshContentFrames(nsIPresContext& aPresContext,
static void RefreshContentFrames(nsIPresContext& aPresContext,
nsIContent * aStartContent,
nsIContent * aEndContent)
{
@ -2082,7 +2082,7 @@ void ForceDrawFrame(nsFrame * aFrame)//, PRBool)
//----------------------------
//
//----------------------------
void resetContentTrackers() {
static void resetContentTrackers() {
PRInt32 i;
for (i=0;i<fTrackerRemoveListMax;i++) {
NS_RELEASE(fTrackerContentArrayRemoveList[i]);
@ -2097,7 +2097,7 @@ void resetContentTrackers() {
//----------------------------
//
//----------------------------
void RefreshFromContentTrackers(nsIPresContext& aPresContext) {
static void RefreshFromContentTrackers(nsIPresContext& aPresContext) {
PRInt32 i;
nsIPresShell * shell = aPresContext.GetShell();
@ -2120,7 +2120,7 @@ void RefreshFromContentTrackers(nsIPresContext& aPresContext) {
//----------------------------
//
//----------------------------
void addRangeToSelectionTrackers(nsIContent * aStartContent, nsIContent * aEndContent, PRUint32 aType)
static void addRangeToSelectionTrackers(nsIContent * aStartContent, nsIContent * aEndContent, PRUint32 aType)
{
if (aStartContent == nsnull || aEndContent == nsnull) {
return;

Просмотреть файл

@ -293,9 +293,6 @@ extern nsresult NS_NewTableRowFrame(nsIFrame*& aResult);
extern nsresult NS_NewTableRowGroupFrame(nsIFrame*& aResult);
extern nsresult NS_NewTableCellFrame(nsIFrame*& aResult);
// Everything below this line is obsolete...
//----------------------------------------------------------------------
// XXX naming consistency puhleeze!
// XXX passing aWebShell into this is wrong
extern nsresult NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
@ -303,22 +300,6 @@ extern nsresult NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
nsIURL* aURL,
nsIWebShell* aWebShell);
extern nsresult
NS_NewHTMLEmbed(nsIHTMLContent** aInstancePtrResult,
nsIAtom* aTag);
extern nsresult
NS_NewHTMLObject(nsIHTMLContent** aInstancePtrResult,
nsIAtom* aTag);
extern nsresult
NS_NewHTMLImage(nsIHTMLContent** aInstancePtrResult,
nsIAtom* aTag);
extern nsresult
NS_NewHTMLLayer(nsIHTMLContent** aInstancePtrResult,
nsIAtom* aTag);
/** Create a new HTML reflow command */
extern nsresult
NS_NewHTMLReflowCommand(nsIReflowCommand** aInstancePtrResult,

Просмотреть файл

@ -20,6 +20,7 @@
#define nsGenericHTMLElement_h___
#include "nsGenericElement.h"
#include "nsHTMLParts.h"
#include "nsIDOMHTMLElement.h"
#include "nsIContent.h"
#include "nsHTMLValue.h"

Просмотреть файл

@ -701,7 +701,7 @@ nsHTMLTableElement::InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aValue)
{
nsIDOMNode *newRowNode=nsnull;
newRow->QueryInterface(kIDOMNodeIID, (void **)&newRowNode); // caller's addref
if ((0<=aIndex) && (rowCount<=aIndex)) // the index is greater than the number of rows, so just append
if ((0<=aIndex) && (PRInt32(rowCount)<=aIndex)) // the index is greater than the number of rows, so just append
rv = parent->AppendChild(newRowNode, (nsIDOMNode **)aValue);
else // insert the new row before the reference row we found above
rv = parent->InsertBefore(newRowNode, refRow, (nsIDOMNode **)aValue);

Просмотреть файл

@ -207,8 +207,7 @@ nsHTMLDocument::StartDocumentLoad(nsIURL *aURL,
nsIStreamListener **aDocListener,
const char* aCommand)
{
nsresult rv = nsDocument::StartDocumentLoad(aURL, aContainer,
aDocListener);
nsresult rv = nsDocument::StartDocLoad(aURL, aContainer, aDocListener);
if (NS_FAILED(rv)) {
return rv;
}

Просмотреть файл

@ -748,7 +748,7 @@ static PRInt32 gInstanceCount;
static PRInt32 gInstrument = 6;
#endif
PRBool HashStyleRule(nsISupports* aRule, void* aData)
static PRBool HashStyleRule(nsISupports* aRule, void* aData)
{
*((PRUint32*)aData) ^= PRUint32(aRule);
return PR_TRUE;
@ -1132,7 +1132,7 @@ struct MapStyleData {
nsIPresContext* mPresContext;
};
PRBool MapStyleRule(nsISupports* aRule, void* aData)
static PRBool MapStyleRule(nsISupports* aRule, void* aData)
{
nsIStyleRule* rule = (nsIStyleRule*)aRule;
MapStyleData* data = (MapStyleData*)aData;

Просмотреть файл

@ -126,8 +126,7 @@ nsXMLDocument::StartDocumentLoad(nsIURL *aUrl,
nsIStreamListener **aDocListener,
const char* aCommand)
{
nsresult rv = nsDocument::StartDocumentLoad(aUrl, aContainer,
aDocListener);
nsresult rv = nsDocument::StartDocLoad(aUrl, aContainer, aDocListener);
if (NS_FAILED(rv)) {
return rv;
}