diff --git a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp index f1a908cad5c..56fa28e6eb5 100644 --- a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -154,9 +154,6 @@ PRBool BasicTableLayoutStrategy::Initialize(nsIPresContext* aPresContex #ifdef DEBUG_TABLE_REFLOW_TIMING nsTableFrame::DebugTimeMethod(nsTableFrame::eInit, *mTableFrame, (nsHTMLReflowState&)aReflowState, PR_FALSE); -#endif -#ifdef DEBUG_TABLE_REFLOW - printf("Initialized min=%d des=%d pref=%d\n", minWidth, desWidth, prefWidth); #endif return result; } diff --git a/mozilla/layout/html/table/src/Makefile.in b/mozilla/layout/html/table/src/Makefile.in index 9d813f37a55..462af631d64 100644 --- a/mozilla/layout/html/table/src/Makefile.in +++ b/mozilla/layout/html/table/src/Makefile.in @@ -61,7 +61,7 @@ FORCE_STATIC_LIB = 1 include $(topsrcdir)/config/rules.mk -DEFINES += -D_IMPL_NS_HTML -DDEBUG_TABLE_REFLOW_off +DEFINES += -D_IMPL_NS_HTML -DDEBUG_TABLE_REFLOW_TIMING_off ifeq ($(OS_ARCH),WINNT) DEFINES += -DWIN32_LEAN_AND_MEAN diff --git a/mozilla/layout/html/table/src/makefile.win b/mozilla/layout/html/table/src/makefile.win index 64cf28a9d19..e93f3128214 100644 --- a/mozilla/layout/html/table/src/makefile.win +++ b/mozilla/layout/html/table/src/makefile.win @@ -37,7 +37,7 @@ REQUIRES = xpcom \ $(NULL) -DEFINES =-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN -DoffDEBUG_TABLE_REFLOW \ +DEFINES =-D_IMPL_NS_HTML -DWIN32_LEAN_AND_MEAN \ -DoffDEBUG_TABLE_REFLOW_TIMING -DoffDEBUG_TABLE_REFLOW_TIMING_DETAIL \ -DoffDEBUG_TABLE_STRATEGY \ $(NULL) diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 4032ddfc460..178cc5cf73e 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -159,7 +159,7 @@ struct nsTableReflowState { /******************************************************************************** ** nsTableFrame ** ********************************************************************************/ -#if defined DEBUG_TABLE_REFLOW | DEBUG_TABLE_REFLOW_TIMING +#if defined DEBUG_TABLE_REFLOW_TIMING static PRInt32 gRflCount = 0; #endif @@ -3459,14 +3459,6 @@ void nsTableFrame::BalanceColumnWidths(nsIPresContext* aPresContext, SetDesiredWidth(desWidth); SetPreferredWidth(prefWidth); -#ifdef DEBUG_TABLE_REFLOW - printf("Balanced min=%d des=%d pref=%d cols=", minWidth, desWidth, prefWidth); - for (PRInt32 colX = 0; colX < GetColCount(); colX++) { - printf("%d ", GetColumnWidth(colX)); - } - printf("\n"); -#endif - } // This width is based on the column widths array of the table. @@ -7062,7 +7054,7 @@ nsTableFrame::PaintBCBorders(nsIPresContext* aPresContext, } /******************************************************************************** - ** DEBUG_TABLE_REFLOW and DEBUG_TABLE_REFLOW_TIMING ** + ** DEBUG_TABLE_REFLOW_TIMING ** ********************************************************************************/ #ifdef DEBUG @@ -7093,7 +7085,7 @@ GetFrameTypeName(nsIAtom* aFrameType, } #endif -#if defined DEBUG_TABLE_REFLOW | DEBUG_TABLE_REFLOW_TIMING +#if defined DEBUG_TABLE_REFLOW_TIMING #define INDENT_PER_LEVEL 1 @@ -7108,105 +7100,6 @@ void PrettyUC(nscoord aSize, } } - -#ifdef DEBUG_TABLE_REFLOW - -void DebugGetIndent(const nsIFrame* aFrame, - char* aBuf) -{ - PRInt32 numLevels = 0; - nsIFrame* parent = nsnull; - aFrame->GetParent(&parent); - while (parent) { - nsCOMPtr frameType; - parent->GetFrameType(getter_AddRefs(frameType)); - if ((nsLayoutAtoms::tableOuterFrame == frameType.get()) || - (nsLayoutAtoms::tableFrame == frameType.get()) || - (nsLayoutAtoms::tableRowGroupFrame == frameType.get()) || - (nsLayoutAtoms::tableRowFrame == frameType.get()) || - IS_TABLE_CELL(frameType.get())) { - numLevels++; - } - if (nsLayoutAtoms::blockFrame == frameType.get()) { - // only count blocks that are children of cells - nsIFrame* grandParent; - parent->GetParent(&grandParent); - nsCOMPtr gFrameType; - grandParent->GetFrameType(getter_AddRefs(gFrameType)); - if (IS_TABLE_CELL(gFrameType.get())) { - numLevels++; - } - } - parent->GetParent(&parent); - } - PRInt32 indent = INDENT_PER_LEVEL * numLevels; - memset (aBuf, ' ', indent); - aBuf[indent] = 0; -} - -void nsTableFrame::DebugReflow(nsIFrame* aFrame, - nsHTMLReflowState& aState, - nsHTMLReflowMetrics* aMetrics, - nsReflowStatus aStatus) -{ - // get the frame type - nsCOMPtr fType; - aFrame->GetFrameType(getter_AddRefs(fType)); - char fName[128]; - GetFrameTypeName(fType.get(), fName); - - char indent[256]; - DebugGetIndent(aFrame, indent); - printf("%s%s %p ", indent, fName, aFrame); - char width[16]; - char height[16]; - if (!aMetrics) { // start - PrettyUC(aState.availableWidth, width); - PrettyUC(aState.availableHeight, height); - printf("r=%d ", aState.reason); - if (aState.mFlags.mSpecialHeightReflow) { - printf("special "); - } - printf("a=%s,%s ", width, height); - PrettyUC(aState.mComputedWidth, width); - PrettyUC(aState.mComputedHeight, height); - printf("c=%s,%s ", width, height); - nsIFrame* inFlow; - aFrame->GetPrevInFlow(&inFlow); - if (inFlow) { - printf("pif=%p ", inFlow); - } - aFrame->GetNextInFlow(&inFlow); - if (inFlow) { - printf("nif=%p ", inFlow); - } - printf("cnt=%d \n", gRflCount); - gRflCount++; - //if (32 == gRflCount) { - // NS_ASSERTION(PR_FALSE, "stop"); - //} - } - if (aMetrics) { // stop - PrettyUC(aMetrics->width, width); - PrettyUC(aMetrics->height, height); - printf("d=%s,%s ", width, height); - if (aMetrics->maxElementSize) { - PrettyUC(aMetrics->maxElementSize->width, width); - printf("me=%s ", width); - } - if (aMetrics->mFlags & NS_REFLOW_CALC_MAX_WIDTH) { - PrettyUC(aMetrics->mMaximumWidth, width); - printf("m=%s ", width); - } - if (NS_FRAME_IS_NOT_COMPLETE(aStatus)) { - printf("status=%d", aStatus); - } - printf("\n"); - } -} - -#else - nsReflowTimer* GetFrameTimer(nsIFrame* aFrame, nsIAtom* aFrameType) { @@ -7483,9 +7376,7 @@ void nsTableFrame::DebugReflowDone(nsIFrame* aFrame) } } -#endif - -#endif +#endif //DEBUG_TABLE_REFLOW_TIMING PRBool nsTableFrame::RowHasSpanningCells(PRInt32 aRowIndex) diff --git a/mozilla/layout/html/table/src/nsTableFrame.h b/mozilla/layout/html/table/src/nsTableFrame.h index fe039d84ba9..fa2ab522ae4 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.h +++ b/mozilla/layout/html/table/src/nsTableFrame.h @@ -952,14 +952,13 @@ protected: // DEBUG REFLOW -#if defined DEBUG_TABLE_REFLOW | DEBUG_TABLE_REFLOW_TIMING +#if defined DEBUG_TABLE_REFLOW_TIMING public: static void DebugReflow(nsIFrame* aFrame, nsHTMLReflowState& aReflowState, nsHTMLReflowMetrics* aMetrics = nsnull, nsReflowStatus aStatus = NS_FRAME_COMPLETE); -#ifdef DEBUG_TABLE_REFLOW_TIMING static void DebugReflowDone(nsIFrame* aFrame); enum nsMethod {eInit=0, eBalanceCols, eNonPctCols, eNonPctColspans, ePctCols}; @@ -969,7 +968,6 @@ public: PRBool aStart); nsReflowTimer* mTimer; #endif -#endif }; diff --git a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index f1a908cad5c..56fa28e6eb5 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp @@ -154,9 +154,6 @@ PRBool BasicTableLayoutStrategy::Initialize(nsIPresContext* aPresContex #ifdef DEBUG_TABLE_REFLOW_TIMING nsTableFrame::DebugTimeMethod(nsTableFrame::eInit, *mTableFrame, (nsHTMLReflowState&)aReflowState, PR_FALSE); -#endif -#ifdef DEBUG_TABLE_REFLOW - printf("Initialized min=%d des=%d pref=%d\n", minWidth, desWidth, prefWidth); #endif return result; } diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 4032ddfc460..178cc5cf73e 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -159,7 +159,7 @@ struct nsTableReflowState { /******************************************************************************** ** nsTableFrame ** ********************************************************************************/ -#if defined DEBUG_TABLE_REFLOW | DEBUG_TABLE_REFLOW_TIMING +#if defined DEBUG_TABLE_REFLOW_TIMING static PRInt32 gRflCount = 0; #endif @@ -3459,14 +3459,6 @@ void nsTableFrame::BalanceColumnWidths(nsIPresContext* aPresContext, SetDesiredWidth(desWidth); SetPreferredWidth(prefWidth); -#ifdef DEBUG_TABLE_REFLOW - printf("Balanced min=%d des=%d pref=%d cols=", minWidth, desWidth, prefWidth); - for (PRInt32 colX = 0; colX < GetColCount(); colX++) { - printf("%d ", GetColumnWidth(colX)); - } - printf("\n"); -#endif - } // This width is based on the column widths array of the table. @@ -7062,7 +7054,7 @@ nsTableFrame::PaintBCBorders(nsIPresContext* aPresContext, } /******************************************************************************** - ** DEBUG_TABLE_REFLOW and DEBUG_TABLE_REFLOW_TIMING ** + ** DEBUG_TABLE_REFLOW_TIMING ** ********************************************************************************/ #ifdef DEBUG @@ -7093,7 +7085,7 @@ GetFrameTypeName(nsIAtom* aFrameType, } #endif -#if defined DEBUG_TABLE_REFLOW | DEBUG_TABLE_REFLOW_TIMING +#if defined DEBUG_TABLE_REFLOW_TIMING #define INDENT_PER_LEVEL 1 @@ -7108,105 +7100,6 @@ void PrettyUC(nscoord aSize, } } - -#ifdef DEBUG_TABLE_REFLOW - -void DebugGetIndent(const nsIFrame* aFrame, - char* aBuf) -{ - PRInt32 numLevels = 0; - nsIFrame* parent = nsnull; - aFrame->GetParent(&parent); - while (parent) { - nsCOMPtr frameType; - parent->GetFrameType(getter_AddRefs(frameType)); - if ((nsLayoutAtoms::tableOuterFrame == frameType.get()) || - (nsLayoutAtoms::tableFrame == frameType.get()) || - (nsLayoutAtoms::tableRowGroupFrame == frameType.get()) || - (nsLayoutAtoms::tableRowFrame == frameType.get()) || - IS_TABLE_CELL(frameType.get())) { - numLevels++; - } - if (nsLayoutAtoms::blockFrame == frameType.get()) { - // only count blocks that are children of cells - nsIFrame* grandParent; - parent->GetParent(&grandParent); - nsCOMPtr gFrameType; - grandParent->GetFrameType(getter_AddRefs(gFrameType)); - if (IS_TABLE_CELL(gFrameType.get())) { - numLevels++; - } - } - parent->GetParent(&parent); - } - PRInt32 indent = INDENT_PER_LEVEL * numLevels; - memset (aBuf, ' ', indent); - aBuf[indent] = 0; -} - -void nsTableFrame::DebugReflow(nsIFrame* aFrame, - nsHTMLReflowState& aState, - nsHTMLReflowMetrics* aMetrics, - nsReflowStatus aStatus) -{ - // get the frame type - nsCOMPtr fType; - aFrame->GetFrameType(getter_AddRefs(fType)); - char fName[128]; - GetFrameTypeName(fType.get(), fName); - - char indent[256]; - DebugGetIndent(aFrame, indent); - printf("%s%s %p ", indent, fName, aFrame); - char width[16]; - char height[16]; - if (!aMetrics) { // start - PrettyUC(aState.availableWidth, width); - PrettyUC(aState.availableHeight, height); - printf("r=%d ", aState.reason); - if (aState.mFlags.mSpecialHeightReflow) { - printf("special "); - } - printf("a=%s,%s ", width, height); - PrettyUC(aState.mComputedWidth, width); - PrettyUC(aState.mComputedHeight, height); - printf("c=%s,%s ", width, height); - nsIFrame* inFlow; - aFrame->GetPrevInFlow(&inFlow); - if (inFlow) { - printf("pif=%p ", inFlow); - } - aFrame->GetNextInFlow(&inFlow); - if (inFlow) { - printf("nif=%p ", inFlow); - } - printf("cnt=%d \n", gRflCount); - gRflCount++; - //if (32 == gRflCount) { - // NS_ASSERTION(PR_FALSE, "stop"); - //} - } - if (aMetrics) { // stop - PrettyUC(aMetrics->width, width); - PrettyUC(aMetrics->height, height); - printf("d=%s,%s ", width, height); - if (aMetrics->maxElementSize) { - PrettyUC(aMetrics->maxElementSize->width, width); - printf("me=%s ", width); - } - if (aMetrics->mFlags & NS_REFLOW_CALC_MAX_WIDTH) { - PrettyUC(aMetrics->mMaximumWidth, width); - printf("m=%s ", width); - } - if (NS_FRAME_IS_NOT_COMPLETE(aStatus)) { - printf("status=%d", aStatus); - } - printf("\n"); - } -} - -#else - nsReflowTimer* GetFrameTimer(nsIFrame* aFrame, nsIAtom* aFrameType) { @@ -7483,9 +7376,7 @@ void nsTableFrame::DebugReflowDone(nsIFrame* aFrame) } } -#endif - -#endif +#endif //DEBUG_TABLE_REFLOW_TIMING PRBool nsTableFrame::RowHasSpanningCells(PRInt32 aRowIndex) diff --git a/mozilla/layout/tables/nsTableFrame.h b/mozilla/layout/tables/nsTableFrame.h index fe039d84ba9..fa2ab522ae4 100644 --- a/mozilla/layout/tables/nsTableFrame.h +++ b/mozilla/layout/tables/nsTableFrame.h @@ -952,14 +952,13 @@ protected: // DEBUG REFLOW -#if defined DEBUG_TABLE_REFLOW | DEBUG_TABLE_REFLOW_TIMING +#if defined DEBUG_TABLE_REFLOW_TIMING public: static void DebugReflow(nsIFrame* aFrame, nsHTMLReflowState& aReflowState, nsHTMLReflowMetrics* aMetrics = nsnull, nsReflowStatus aStatus = NS_FRAME_COMPLETE); -#ifdef DEBUG_TABLE_REFLOW_TIMING static void DebugReflowDone(nsIFrame* aFrame); enum nsMethod {eInit=0, eBalanceCols, eNonPctCols, eNonPctColspans, ePctCols}; @@ -969,7 +968,6 @@ public: PRBool aStart); nsReflowTimer* mTimer; #endif -#endif };