diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp index 2426cf56b60..16c7a3657f6 100644 --- a/mozilla/content/base/src/nsDocument.cpp +++ b/mozilla/content/base/src/nsDocument.cpp @@ -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(); diff --git a/mozilla/content/base/src/nsDocument.h b/mozilla/content/base/src/nsDocument.h index 4a3fcc27fb0..3f30e3cad25 100644 --- a/mozilla/content/base/src/nsDocument.h +++ b/mozilla/content/base/src/nsDocument.h @@ -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(); diff --git a/mozilla/content/base/src/nsStyleContext.cpp b/mozilla/content/base/src/nsStyleContext.cpp index 2bb871cf95b..38deec8ab4b 100644 --- a/mozilla/content/base/src/nsStyleContext.cpp +++ b/mozilla/content/base/src/nsStyleContext.cpp @@ -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; diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.h b/mozilla/content/html/content/src/nsGenericHTMLElement.h index 88636cd736d..b96254ba07e 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.h +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.h @@ -20,6 +20,7 @@ #define nsGenericHTMLElement_h___ #include "nsGenericElement.h" +#include "nsHTMLParts.h" #include "nsIDOMHTMLElement.h" #include "nsIContent.h" #include "nsHTMLValue.h" diff --git a/mozilla/content/html/content/src/nsHTMLTableElement.cpp b/mozilla/content/html/content/src/nsHTMLTableElement.cpp index a329a72558e..32ba7aaa1b9 100644 --- a/mozilla/content/html/content/src/nsHTMLTableElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableElement.cpp @@ -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); diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index 19e40820032..ca8a688512a 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -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; } diff --git a/mozilla/content/xml/document/src/nsXMLDocument.cpp b/mozilla/content/xml/document/src/nsXMLDocument.cpp index b334dec9633..700883dfe2d 100644 --- a/mozilla/content/xml/document/src/nsXMLDocument.cpp +++ b/mozilla/content/xml/document/src/nsXMLDocument.cpp @@ -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; } diff --git a/mozilla/layout/base/src/nsDocument.cpp b/mozilla/layout/base/src/nsDocument.cpp index 2426cf56b60..16c7a3657f6 100644 --- a/mozilla/layout/base/src/nsDocument.cpp +++ b/mozilla/layout/base/src/nsDocument.cpp @@ -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(); diff --git a/mozilla/layout/base/src/nsDocument.h b/mozilla/layout/base/src/nsDocument.h index 4a3fcc27fb0..3f30e3cad25 100644 --- a/mozilla/layout/base/src/nsDocument.h +++ b/mozilla/layout/base/src/nsDocument.h @@ -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(); diff --git a/mozilla/layout/base/src/nsStyleContext.cpp b/mozilla/layout/base/src/nsStyleContext.cpp index 2bb871cf95b..38deec8ab4b 100644 --- a/mozilla/layout/base/src/nsStyleContext.cpp +++ b/mozilla/layout/base/src/nsStyleContext.cpp @@ -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; diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index d3bebeff9a0..1ea54c68f5e 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -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; } diff --git a/mozilla/layout/generic/nsBlockFrame.h b/mozilla/layout/generic/nsBlockFrame.h index ba2db75d568..01108b16a57 100644 --- a/mozilla/layout/generic/nsBlockFrame.h +++ b/mozilla/layout/generic/nsBlockFrame.h @@ -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(); diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index d3bebeff9a0..1ea54c68f5e 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -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; } diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index d3bebeff9a0..1ea54c68f5e 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -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; } diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index b60fc45e6c5..041effc3cdb 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -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;iGetPrevSiblingFrame(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; } diff --git a/mozilla/layout/html/base/src/nsBlockFrame.h b/mozilla/layout/html/base/src/nsBlockFrame.h index ba2db75d568..01108b16a57 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.h +++ b/mozilla/layout/html/base/src/nsBlockFrame.h @@ -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(); diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index d3bebeff9a0..1ea54c68f5e 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -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; } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index d3bebeff9a0..1ea54c68f5e 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -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; } diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index b60fc45e6c5..041effc3cdb 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -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;iQueryInterface(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); diff --git a/mozilla/layout/html/document/src/nsHTMLDocument.cpp b/mozilla/layout/html/document/src/nsHTMLDocument.cpp index 19e40820032..ca8a688512a 100644 --- a/mozilla/layout/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/layout/html/document/src/nsHTMLDocument.cpp @@ -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; } diff --git a/mozilla/layout/style/nsStyleContext.cpp b/mozilla/layout/style/nsStyleContext.cpp index 2bb871cf95b..38deec8ab4b 100644 --- a/mozilla/layout/style/nsStyleContext.cpp +++ b/mozilla/layout/style/nsStyleContext.cpp @@ -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; diff --git a/mozilla/layout/xml/document/src/nsXMLDocument.cpp b/mozilla/layout/xml/document/src/nsXMLDocument.cpp index b334dec9633..700883dfe2d 100644 --- a/mozilla/layout/xml/document/src/nsXMLDocument.cpp +++ b/mozilla/layout/xml/document/src/nsXMLDocument.cpp @@ -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; }