From 38a3d3a5fcd4ec284313c04c6f6a82b32090ec03 Mon Sep 17 00:00:00 2001 From: thom Date: Tue, 19 May 1998 23:11:28 +0000 Subject: [PATCH] fixed compile errors for mac git-svn-id: svn://10.0.0.236/trunk@1984 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/base/src/nsHTMLValue.h | 2 +- .../html/document/src/nsHTMLContentSink.cpp | 4 +++- mozilla/content/html/style/src/nsHTMLValue.h | 2 +- mozilla/content/shared/public/nsHTMLValue.h | 2 +- mozilla/layout/base/nsCSSRendering.cpp | 3 ++- mozilla/layout/base/src/nsFrame.cpp | 4 ++-- .../html/document/src/nsHTMLContentSink.cpp | 4 +++- .../layout/html/style/src/nsCSSRendering.cpp | 3 ++- mozilla/layout/html/style/src/nsHTMLValue.h | 2 +- .../layout/html/table/src/nsTableContent.cpp | 3 ++- mozilla/layout/html/table/src/nsTableFrame.cpp | 3 ++- mozilla/layout/html/table/src/nsTableFrame.h | 2 +- .../layout/html/table/src/nsTableOuterFrame.h | 2 +- mozilla/layout/html/table/src/nsTablePart.cpp | 9 ++++++--- mozilla/layout/html/table/src/nsTablePart.h | 18 +++++++++--------- mozilla/layout/tables/nsTableFrame.cpp | 3 ++- mozilla/layout/tables/nsTableFrame.h | 2 +- mozilla/layout/tables/nsTableOuterFrame.h | 2 +- 18 files changed, 41 insertions(+), 29 deletions(-) diff --git a/mozilla/content/base/src/nsHTMLValue.h b/mozilla/content/base/src/nsHTMLValue.h index 1031450585c..4bd87a0e50f 100644 --- a/mozilla/content/base/src/nsHTMLValue.h +++ b/mozilla/content/base/src/nsHTMLValue.h @@ -35,7 +35,7 @@ enum nsHTMLUnit { eHTMLUnit_Percent = 90, // (float) 1.0 == 100%) value is percentage of something // Screen relative measure - eHTMLUnit_Pixel = 600, // (int) screen pixels + eHTMLUnit_Pixel = 600 // (int) screen pixels }; class nsHTMLValue { diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 366ae34fd35..1dd0ac9002d 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -625,11 +625,13 @@ PRBool HTMLContentSink::CloseContainer(const nsIParserNode& aNode) // We just closed a child of the body off. Trigger a // content-appended reflow if enough time has elapsed PRTime now = PR_Now(); + /* XXX this expression doesn't compile on the Mac + kipp said it had to do with a type issue. if (now - mLastUpdateTime >= mUpdateDelta) { mLastUpdateTime = now; mUpdateDelta += mUpdateDelta; ReflowNewContent(); - } + }*/ } } NS_RELEASE(container); diff --git a/mozilla/content/html/style/src/nsHTMLValue.h b/mozilla/content/html/style/src/nsHTMLValue.h index 1031450585c..4bd87a0e50f 100644 --- a/mozilla/content/html/style/src/nsHTMLValue.h +++ b/mozilla/content/html/style/src/nsHTMLValue.h @@ -35,7 +35,7 @@ enum nsHTMLUnit { eHTMLUnit_Percent = 90, // (float) 1.0 == 100%) value is percentage of something // Screen relative measure - eHTMLUnit_Pixel = 600, // (int) screen pixels + eHTMLUnit_Pixel = 600 // (int) screen pixels }; class nsHTMLValue { diff --git a/mozilla/content/shared/public/nsHTMLValue.h b/mozilla/content/shared/public/nsHTMLValue.h index 1031450585c..4bd87a0e50f 100644 --- a/mozilla/content/shared/public/nsHTMLValue.h +++ b/mozilla/content/shared/public/nsHTMLValue.h @@ -35,7 +35,7 @@ enum nsHTMLUnit { eHTMLUnit_Percent = 90, // (float) 1.0 == 100%) value is percentage of something // Screen relative measure - eHTMLUnit_Pixel = 600, // (int) screen pixels + eHTMLUnit_Pixel = 600 // (int) screen pixels }; class nsHTMLValue { diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index ef1501a5f5d..06ec3474385 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -653,6 +653,7 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext, const nsStyleSpacing& aStyle, PRIntn aSkipSides) { + PRIntn cnt; nsMargin border; aStyle.CalcBorderFor(aForFrame, border); if ((0 == border.left) && (0 == border.right) && @@ -666,7 +667,7 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext, outside.Deflate(border); //see if any sides are dotted or dashed - for (PRIntn cnt = 0; cnt < 4; cnt++) { + for (cnt = 0; cnt < 4; cnt++) { if ((aStyle.mBorderStyle[cnt] == NS_STYLE_BORDER_STYLE_DOTTED) || (aStyle.mBorderStyle[cnt] == NS_STYLE_BORDER_STYLE_DASHED)) { break; diff --git a/mozilla/layout/base/src/nsFrame.cpp b/mozilla/layout/base/src/nsFrame.cpp index 67834ba9e17..bf74fcd0e0a 100644 --- a/mozilla/layout/base/src/nsFrame.cpp +++ b/mozilla/layout/base/src/nsFrame.cpp @@ -1761,9 +1761,9 @@ void RefreshFromContentTrackers(nsIPresContext& aPresContext) { fflush(fd); fclose(fd);*/ - + PRInt32 i; nsIPresShell * shell = aPresContext.GetShell(); - for (PRInt32 i=0;iFindFrameWithContent(fTrackerContentArrayRemoveList[i])); if (gSelectionDebug) printf("ForceDrawFrame (remove) content 0x%X\n", fTrackerContentArrayRemoveList[i]); } diff --git a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp index 366ae34fd35..1dd0ac9002d 100644 --- a/mozilla/layout/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/layout/html/document/src/nsHTMLContentSink.cpp @@ -625,11 +625,13 @@ PRBool HTMLContentSink::CloseContainer(const nsIParserNode& aNode) // We just closed a child of the body off. Trigger a // content-appended reflow if enough time has elapsed PRTime now = PR_Now(); + /* XXX this expression doesn't compile on the Mac + kipp said it had to do with a type issue. if (now - mLastUpdateTime >= mUpdateDelta) { mLastUpdateTime = now; mUpdateDelta += mUpdateDelta; ReflowNewContent(); - } + }*/ } } NS_RELEASE(container); diff --git a/mozilla/layout/html/style/src/nsCSSRendering.cpp b/mozilla/layout/html/style/src/nsCSSRendering.cpp index ef1501a5f5d..06ec3474385 100644 --- a/mozilla/layout/html/style/src/nsCSSRendering.cpp +++ b/mozilla/layout/html/style/src/nsCSSRendering.cpp @@ -653,6 +653,7 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext, const nsStyleSpacing& aStyle, PRIntn aSkipSides) { + PRIntn cnt; nsMargin border; aStyle.CalcBorderFor(aForFrame, border); if ((0 == border.left) && (0 == border.right) && @@ -666,7 +667,7 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext, outside.Deflate(border); //see if any sides are dotted or dashed - for (PRIntn cnt = 0; cnt < 4; cnt++) { + for (cnt = 0; cnt < 4; cnt++) { if ((aStyle.mBorderStyle[cnt] == NS_STYLE_BORDER_STYLE_DOTTED) || (aStyle.mBorderStyle[cnt] == NS_STYLE_BORDER_STYLE_DASHED)) { break; diff --git a/mozilla/layout/html/style/src/nsHTMLValue.h b/mozilla/layout/html/style/src/nsHTMLValue.h index 1031450585c..4bd87a0e50f 100644 --- a/mozilla/layout/html/style/src/nsHTMLValue.h +++ b/mozilla/layout/html/style/src/nsHTMLValue.h @@ -35,7 +35,7 @@ enum nsHTMLUnit { eHTMLUnit_Percent = 90, // (float) 1.0 == 100%) value is percentage of something // Screen relative measure - eHTMLUnit_Pixel = 600, // (int) screen pixels + eHTMLUnit_Pixel = 600 // (int) screen pixels }; class nsHTMLValue { diff --git a/mozilla/layout/html/table/src/nsTableContent.cpp b/mozilla/layout/html/table/src/nsTableContent.cpp index b06d2cbc73a..68da61df158 100644 --- a/mozilla/layout/html/table/src/nsTableContent.cpp +++ b/mozilla/layout/html/table/src/nsTableContent.cpp @@ -150,7 +150,8 @@ void nsTableContent::SetTableForTableContent(nsIContent* aContent, nsTablePart * void nsTableContent::List(FILE* out, PRInt32 aIndent) const { - for (PRInt32 i = aIndent; --i >= 0; ) fputs(" ", out); + PRInt32 i; + for (i = aIndent; --i >= 0; ) fputs(" ", out); nsIAtom* tag = GetTag(); if (tag != nsnull) { nsAutoString buf; diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 1af58fe3572..1dc4f2f2325 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -1621,6 +1621,7 @@ void nsTableFrame::ShrinkWrapChildren(nsIPresContext* aPresContext, // iterate children, tell all row groups to ShrinkWrap PRBool atLeastOneRowSpanningCell = PR_FALSE; + PRInt32 rowIndex; PRInt32 tableHeight = 0; nsStyleSpacing* spacing = (nsStyleSpacing*) @@ -1657,7 +1658,7 @@ void nsTableFrame::ShrinkWrapChildren(nsIPresContext* aPresContext, rowGroupFrame->ChildCount(numRows); PRInt32 *rowHeights = new PRInt32[numRows]; if (gsDebug==PR_TRUE) printf("Height Step 1...\n"); - for (PRInt32 rowIndex = 0; rowIndex < numRows; rowIndex++) + for (rowIndex = 0; rowIndex < numRows; rowIndex++) { // get the height of the tallest cell in the row (excluding cells that span rows) nsTableRowFrame *rowFrame; diff --git a/mozilla/layout/html/table/src/nsTableFrame.h b/mozilla/layout/html/table/src/nsTableFrame.h index 0292ffa8415..30ed534376c 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.h +++ b/mozilla/layout/html/table/src/nsTableFrame.h @@ -297,7 +297,7 @@ protected: virtual NS_METHOD DidSetStyleContext(nsIPresContext* aPresContext); private: - void nsTableFrame::DebugPrintCount() const; // Debugging routine + void DebugPrintCount() const; // Debugging routine /** table reflow is a multi-pass operation. Use these constants to keep track of diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.h b/mozilla/layout/html/table/src/nsTableOuterFrame.h index e9369626636..27b4b16cdd0 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.h +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.h @@ -224,7 +224,7 @@ protected: * @param aChild child this child's next-in-flow * @return PR_TRUE if successful and PR_FALSE otherwise */ - PRBool nsTableOuterFrame::DeleteChildsNextInFlow(nsIFrame* aChild); + PRBool DeleteChildsNextInFlow(nsIFrame* aChild); /** create the inner table frame (nsTableFrame) * handles initial creation as well as creation of continuing frames diff --git a/mozilla/layout/html/table/src/nsTablePart.cpp b/mozilla/layout/html/table/src/nsTablePart.cpp index 28883e23ad6..670f707a4d4 100644 --- a/mozilla/layout/html/table/src/nsTablePart.cpp +++ b/mozilla/layout/html/table/src/nsTablePart.cpp @@ -547,6 +547,7 @@ PRBool nsTablePart::RemoveChildAt (PRInt32 aIndex) /** protected method for appending a column group to this table */ PRBool nsTablePart::AppendRowGroup (nsTableRowGroup *aContent) { + PRInt32 childIndex; NS_PRECONDITION(nsnull!=aContent, "null arg."); PRBool result = PR_TRUE; if (gsDebug==PR_TRUE) @@ -559,7 +560,7 @@ PRBool nsTablePart::AppendRowGroup (nsTableRowGroup *aContent) nsIAtom * tHeadTag = NS_NewAtom(kRowGroupHeadTagString); // tHeadTag: REFCNT++ nsIAtom * tFootTag = NS_NewAtom(kRowGroupFootTagString); // tFootTag: REFCNT++ nsIAtom * tBodyTag = NS_NewAtom(kRowGroupBodyTagString); // tBodyTag: REFCNT++ - for (PRInt32 childIndex = 0; childIndex < childCount; childIndex++) + for (childIndex = 0; childIndex < childCount; childIndex++) { nsTableContent *tableChild = (nsTableContent *)ChildAt(childIndex); // tableChild: REFCNT++ const int tableChildType = tableChild->GetType(); @@ -622,6 +623,7 @@ PRBool nsTablePart::AppendRowGroup (nsTableRowGroup *aContent) /** protected method for appending a column group to this table */ PRBool nsTablePart::AppendColGroup(nsTableColGroup *aContent) { + PRInt32 childIndex; NS_PRECONDITION(nsnull!=aContent, "null arg."); if (gsDebug==PR_TRUE) printf ("nsTablePart::AppendColGroup -- adding a column group.\n"); @@ -629,7 +631,7 @@ PRBool nsTablePart::AppendColGroup(nsTableColGroup *aContent) // if there is no column group already in the table, make this the first child // after any caption int childCount = ChildCount (); - for (PRInt32 childIndex = 0; childIndex < childCount; childIndex++) + for (childIndex = 0; childIndex < childCount; childIndex++) { nsTableContent *tableChild = (nsTableContent *)ChildAt(childIndex); // tableChild: REFCNT++ const int tableChildType = tableChild->GetType(); @@ -692,13 +694,14 @@ PRBool nsTablePart::AppendColumn(nsTableCol *aContent) /** protected method for appending a column group to this table */ PRBool nsTablePart::AppendCaption(nsTableCaption *aContent) { + PRInt32 childIndex; NS_PRECONDITION(nsnull!=aContent, "null arg."); if (gsDebug==PR_TRUE) printf ("nsTablePart::AppendCaption -- adding a caption.\n"); // find the last caption and insert this caption after it. // if there is no caption already in the table, make this the first child int childCount = ChildCount (); - for (PRInt32 childIndex = 0; childIndex < childCount; childIndex++) + for (childIndex = 0; childIndex < childCount; childIndex++) { nsTableContent *tableChild = (nsTableContent *)ChildAt(childIndex); const int tableChildType = tableChild->GetType(); diff --git a/mozilla/layout/html/table/src/nsTablePart.h b/mozilla/layout/html/table/src/nsTablePart.h index 76faaeb6cf9..684f4d67a7d 100644 --- a/mozilla/layout/html/table/src/nsTablePart.h +++ b/mozilla/layout/html/table/src/nsTablePart.h @@ -68,15 +68,15 @@ class nsTablePart : public nsHTMLContainer { public: /** known HTML tags */ - static const char *nsTablePart::kCaptionTagString; - static const char *nsTablePart::kRowGroupBodyTagString; - static const char *nsTablePart::kRowGroupHeadTagString; - static const char *nsTablePart::kRowGroupFootTagString; - static const char *nsTablePart::kRowTagString; - static const char *nsTablePart::kColGroupTagString; - static const char *nsTablePart::kColTagString; - static const char *nsTablePart::kDataCellTagString; - static const char *nsTablePart::kHeaderCellTagString; + static const char *kCaptionTagString; + static const char *kRowGroupBodyTagString; + static const char *kRowGroupHeadTagString; + static const char *kRowGroupFootTagString; + static const char *kRowTagString; + static const char *kColGroupTagString; + static const char *kColTagString; + static const char *kDataCellTagString; + static const char *kHeaderCellTagString; /** constructor * @param aTag the HTML tag that caused this content node to be instantiated diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 1af58fe3572..1dc4f2f2325 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1621,6 +1621,7 @@ void nsTableFrame::ShrinkWrapChildren(nsIPresContext* aPresContext, // iterate children, tell all row groups to ShrinkWrap PRBool atLeastOneRowSpanningCell = PR_FALSE; + PRInt32 rowIndex; PRInt32 tableHeight = 0; nsStyleSpacing* spacing = (nsStyleSpacing*) @@ -1657,7 +1658,7 @@ void nsTableFrame::ShrinkWrapChildren(nsIPresContext* aPresContext, rowGroupFrame->ChildCount(numRows); PRInt32 *rowHeights = new PRInt32[numRows]; if (gsDebug==PR_TRUE) printf("Height Step 1...\n"); - for (PRInt32 rowIndex = 0; rowIndex < numRows; rowIndex++) + for (rowIndex = 0; rowIndex < numRows; rowIndex++) { // get the height of the tallest cell in the row (excluding cells that span rows) nsTableRowFrame *rowFrame; diff --git a/mozilla/layout/tables/nsTableFrame.h b/mozilla/layout/tables/nsTableFrame.h index 0292ffa8415..30ed534376c 100644 --- a/mozilla/layout/tables/nsTableFrame.h +++ b/mozilla/layout/tables/nsTableFrame.h @@ -297,7 +297,7 @@ protected: virtual NS_METHOD DidSetStyleContext(nsIPresContext* aPresContext); private: - void nsTableFrame::DebugPrintCount() const; // Debugging routine + void DebugPrintCount() const; // Debugging routine /** table reflow is a multi-pass operation. Use these constants to keep track of diff --git a/mozilla/layout/tables/nsTableOuterFrame.h b/mozilla/layout/tables/nsTableOuterFrame.h index e9369626636..27b4b16cdd0 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.h +++ b/mozilla/layout/tables/nsTableOuterFrame.h @@ -224,7 +224,7 @@ protected: * @param aChild child this child's next-in-flow * @return PR_TRUE if successful and PR_FALSE otherwise */ - PRBool nsTableOuterFrame::DeleteChildsNextInFlow(nsIFrame* aChild); + PRBool DeleteChildsNextInFlow(nsIFrame* aChild); /** create the inner table frame (nsTableFrame) * handles initial creation as well as creation of continuing frames