mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Eliminated IRIX compiler warnings (and a bug)
This commit is contained in:
parent
8ea72914e1
commit
b00f7215a5
@ -124,7 +124,6 @@ NS_METHOD nsDOMEvent::GetKeyCode(PRUint32& aKeyCode)
|
||||
break;
|
||||
default:
|
||||
return NS_ERROR_FAILURE;
|
||||
break;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
@ -148,7 +147,6 @@ NS_METHOD nsDOMEvent::GetButton(PRUint32& aButton)
|
||||
break;
|
||||
default:
|
||||
return NS_ERROR_FAILURE;
|
||||
break;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -77,4 +77,4 @@ protected:
|
||||
nsISupports *kTarget;
|
||||
|
||||
};
|
||||
#endif // nsDOMEvent_h__
|
||||
#endif // nsDOMEvent_h__
|
||||
|
@ -133,7 +133,7 @@ static NS_DEFINE_IID(kIDocumentObserverIID, NS_IDOCUMENT_OBSERVER_IID);
|
||||
|
||||
static PRLogModuleInfo* gShellLogModuleInfo;
|
||||
|
||||
class PresShell : public nsIPresShell, nsIDocumentObserver {
|
||||
class PresShell : public nsIPresShell, private nsIDocumentObserver {
|
||||
public:
|
||||
PresShell();
|
||||
|
||||
|
@ -1650,7 +1650,6 @@ nsCSSBlockFrame::ReflowLine(nsCSSBlockReflowState& aState,
|
||||
nsInlineReflowStatus& aReflowResult)
|
||||
{
|
||||
PRBool keepGoing = PR_FALSE;
|
||||
nsInlineReflowStatus rs;
|
||||
nsCSSBlockFrame* nextInFlow;
|
||||
aState.mInlineLayoutPrepared = PR_FALSE;
|
||||
|
||||
@ -1713,7 +1712,6 @@ nsCSSBlockFrame::ReflowLine(nsCSSBlockReflowState& aState,
|
||||
}
|
||||
}
|
||||
keepGoing = PR_TRUE;
|
||||
rs = NS_INLINE_REFLOW_COMPLETE;
|
||||
|
||||
done:;
|
||||
if (!aLine->IsBlock()) {
|
||||
|
@ -124,7 +124,6 @@ NS_METHOD nsDOMEvent::GetKeyCode(PRUint32& aKeyCode)
|
||||
break;
|
||||
default:
|
||||
return NS_ERROR_FAILURE;
|
||||
break;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
@ -148,7 +147,6 @@ NS_METHOD nsDOMEvent::GetButton(PRUint32& aButton)
|
||||
break;
|
||||
default:
|
||||
return NS_ERROR_FAILURE;
|
||||
break;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -77,4 +77,4 @@ protected:
|
||||
nsISupports *kTarget;
|
||||
|
||||
};
|
||||
#endif // nsDOMEvent_h__
|
||||
#endif // nsDOMEvent_h__
|
||||
|
@ -262,11 +262,9 @@ NS_METHOD nsHTMLContainerFrame::ContentInserted(nsIPresShell* aShell,
|
||||
}
|
||||
|
||||
// Create the new frame
|
||||
nsIStyleContext* kidSC;
|
||||
kidSC = aPresContext->ResolveStyleContextFor(aChild, parent);
|
||||
nsIFrame* newFrame;
|
||||
//XXX nsresult rv = parent->CreateFrameFor(aPresContext, aChild, kidSC, newFrame);
|
||||
nsresult rv = nsHTMLBase::CreateFrame(aPresContext, this, aChild, nsnull, newFrame);
|
||||
nsresult rv = nsHTMLBase::CreateFrame(aPresContext, this, aChild, nsnull,
|
||||
newFrame);
|
||||
if (NS_OK != rv) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -145,7 +145,6 @@ nsHTMLBase::CreateFrame(nsIPresContext* aPresContext,
|
||||
kidSC->GetStyleData(eStyleStruct_Display);
|
||||
|
||||
// Check whether it wants to floated or absolutely positioned
|
||||
PRBool isBlock = PR_FALSE;
|
||||
nsIFrame* kidFrame = nsnull;
|
||||
nsresult rv;
|
||||
if (NS_STYLE_POSITION_ABSOLUTE == kidPosition->mPosition) {
|
||||
@ -178,10 +177,6 @@ nsHTMLBase::CreateFrame(nsIPresContext* aPresContext,
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_STYLE_DISPLAY_BLOCK:
|
||||
case NS_STYLE_DISPLAY_LIST_ITEM:
|
||||
isBlock = PR_TRUE;
|
||||
// FALL THROUGH
|
||||
default:
|
||||
kidDel = aKid->GetDelegate(aPresContext);
|
||||
rv = kidDel->CreateFrame(aPresContext, aKid, aParentFrame,
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
nsIFrame*& aResult);
|
||||
};
|
||||
|
||||
class BulletFrame : public nsFrame, nsIInlineReflow {
|
||||
class BulletFrame : public nsFrame, private nsIInlineReflow {
|
||||
public:
|
||||
BulletFrame(nsIContent* aContent, nsIFrame* aParentFrame);
|
||||
virtual ~BulletFrame();
|
||||
|
@ -262,11 +262,9 @@ NS_METHOD nsHTMLContainerFrame::ContentInserted(nsIPresShell* aShell,
|
||||
}
|
||||
|
||||
// Create the new frame
|
||||
nsIStyleContext* kidSC;
|
||||
kidSC = aPresContext->ResolveStyleContextFor(aChild, parent);
|
||||
nsIFrame* newFrame;
|
||||
//XXX nsresult rv = parent->CreateFrameFor(aPresContext, aChild, kidSC, newFrame);
|
||||
nsresult rv = nsHTMLBase::CreateFrame(aPresContext, this, aChild, nsnull, newFrame);
|
||||
nsresult rv = nsHTMLBase::CreateFrame(aPresContext, this, aChild, nsnull,
|
||||
newFrame);
|
||||
if (NS_OK != rv) {
|
||||
return rv;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
#define TYPE_LINE 1 // line-break + vertical space
|
||||
#define TYPE_IMAGE 2 // acts like a sized image with nothing to see
|
||||
|
||||
class SpacerFrame : public nsFrame, nsIInlineReflow {
|
||||
class SpacerFrame : public nsFrame, private nsIInlineReflow {
|
||||
public:
|
||||
SpacerFrame(nsIContent* aContent, nsIFrame* aParentFrame);
|
||||
|
||||
|
@ -117,7 +117,7 @@ public:
|
||||
nsVoidArray mFrames;
|
||||
};
|
||||
|
||||
class TextFrame : public nsSplittableFrame, nsIInlineReflow {
|
||||
class TextFrame : public nsSplittableFrame, private nsIInlineReflow {
|
||||
public:
|
||||
TextFrame(nsIContent* aContent, nsIFrame* aParentFrame);
|
||||
|
||||
@ -1078,9 +1078,6 @@ void TextFrame::CalcCursorPosition(nsIPresContext& aCX,
|
||||
|
||||
const PRUnichar* lastWordEnd = cpStart;
|
||||
|
||||
PRBool hasMultibyte = PR_FALSE;
|
||||
PRBool endsInWhitespace = PR_FALSE;
|
||||
|
||||
int w = 0;
|
||||
while (cp < end) {
|
||||
width = fm->GetWidth(cpStart, PRUint32(cp - cpStart));
|
||||
@ -1157,7 +1154,7 @@ void TextFrame::CalcCursorPosition(nsIPresContext& aCX,
|
||||
|
||||
PRUnichar ch = *cp++;
|
||||
|
||||
PRBool isWhitespace;
|
||||
//XXX PRBool isWhitespace;
|
||||
if (XP_IS_SPACE(ch)) {
|
||||
if (gCalcDebug) printf("Before 11111111111111111111111111111111\n");
|
||||
// Compress whitespace down to a single whitespace
|
||||
@ -1174,14 +1171,14 @@ void TextFrame::CalcCursorPosition(nsIPresContext& aCX,
|
||||
continue;
|
||||
}
|
||||
width = spaceWidth;
|
||||
isWhitespace = PR_TRUE;
|
||||
//XXX isWhitespace = PR_TRUE;
|
||||
if (gCalcDebug) printf("After 11111111111111111111111111111111\n");
|
||||
} else {
|
||||
if (gCalcDebug) printf("Before 2222222222222222222222222222222222222\n");
|
||||
// The character is not a space character. Find the end of the
|
||||
// word and then measure it.
|
||||
if (ch >= 256) {
|
||||
hasMultibyte = PR_TRUE;
|
||||
//XXX hasMultibyte = PR_TRUE;
|
||||
}
|
||||
const PRUnichar* wordStart = cp - 1;
|
||||
while (cp < end) {
|
||||
@ -1201,7 +1198,7 @@ void TextFrame::CalcCursorPosition(nsIPresContext& aCX,
|
||||
|
||||
ch = *cp;
|
||||
if (ch >= 256) {
|
||||
hasMultibyte = PR_TRUE;
|
||||
//XXX hasMultibyte = PR_TRUE;
|
||||
}
|
||||
if (!XP_IS_SPACE(ch)) {
|
||||
cp++;
|
||||
@ -1235,7 +1232,7 @@ void TextFrame::CalcCursorPosition(nsIPresContext& aCX,
|
||||
atLeftMargin = PR_FALSE;
|
||||
lastWordEnd = cp;
|
||||
width = 0;
|
||||
endsInWhitespace = isWhitespace;
|
||||
//XXX endsInWhitespace = isWhitespace;
|
||||
if (gCalcDebug) printf("Bottom--------------------------------\n");
|
||||
} // while
|
||||
|
||||
|
@ -673,7 +673,7 @@ void nsTableFrame::DumpCellMap () const
|
||||
{
|
||||
cell = cd->mOverlap->mCell;
|
||||
nsTableRowFrame* row2;
|
||||
cell->GetGeometricParent((nsIFrame *&)row);
|
||||
cell->GetGeometricParent((nsIFrame *&)row2);
|
||||
rr = row2->GetRowIndex ();
|
||||
cc = cell->GetColIndex ();
|
||||
printf("O%d,%c ", rr, cc);
|
||||
|
@ -975,12 +975,10 @@ nsTableRowFrame::ReflowUnmappedChildren( nsIPresContext* aPresContext,
|
||||
|
||||
nsMargin margin(0,0,0,0);
|
||||
nscoord topMargin = 0;
|
||||
nscoord bottomMargin = 0;
|
||||
|
||||
if (aState.tableFrame->GetCellMarginData((nsTableCellFrame *)kidFrame, margin) == NS_OK)
|
||||
{
|
||||
topMargin = margin.top;
|
||||
bottomMargin = margin.bottom;
|
||||
}
|
||||
|
||||
maxTopMargin = PR_MAX(margin.top,maxTopMargin);
|
||||
|
@ -673,7 +673,7 @@ void nsTableFrame::DumpCellMap () const
|
||||
{
|
||||
cell = cd->mOverlap->mCell;
|
||||
nsTableRowFrame* row2;
|
||||
cell->GetGeometricParent((nsIFrame *&)row);
|
||||
cell->GetGeometricParent((nsIFrame *&)row2);
|
||||
rr = row2->GetRowIndex ();
|
||||
cc = cell->GetColIndex ();
|
||||
printf("O%d,%c ", rr, cc);
|
||||
|
@ -975,12 +975,10 @@ nsTableRowFrame::ReflowUnmappedChildren( nsIPresContext* aPresContext,
|
||||
|
||||
nsMargin margin(0,0,0,0);
|
||||
nscoord topMargin = 0;
|
||||
nscoord bottomMargin = 0;
|
||||
|
||||
if (aState.tableFrame->GetCellMarginData((nsTableCellFrame *)kidFrame, margin) == NS_OK)
|
||||
{
|
||||
topMargin = margin.top;
|
||||
bottomMargin = margin.bottom;
|
||||
}
|
||||
|
||||
maxTopMargin = PR_MAX(margin.top,maxTopMargin);
|
||||
|
Loading…
Reference in New Issue
Block a user