diff --git a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp index 6c73402bc74..f9e2e07f29a 100644 --- a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -676,7 +676,7 @@ PRBool BasicTableLayoutStrategy::AssignPreliminaryColumnWidths() // clean up if (nsnull!=spanList) { - if (gsDebug) printf("BTLS::APCW...space leak, span list not empty"); + if (gsDebug) printf("BTLS::APCW...space leak, span list not empty\n"); delete spanList; } if (nsnull!=colSpanList) diff --git a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp index 334cf34babc..520b2b9de61 100644 --- a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp @@ -267,12 +267,15 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsIPresContext& aPresCont aReflowState.reflowCommand->GetType(type); nsIFrame *objectFrame; aReflowState.reflowCommand->GetChildFrame(objectFrame); - const nsStyleDisplay *childDisplay; - objectFrame->GetStyleData(eStyleStruct_Display, ((nsStyleStruct *&)childDisplay)); + const nsStyleDisplay *childDisplay=nsnull; + if (nsnull!=objectFrame) + objectFrame->GetStyleData(eStyleStruct_Display, ((nsStyleStruct *&)childDisplay)); if (PR_TRUE==gsDebugIR) printf("nTCGF IR: IncrementalReflow_TargetIsMe with type=%d\n", type); switch (type) { case nsIReflowCommand::FrameInserted : + NS_ASSERTION(nsnull!=objectFrame, "bad objectFrame"); + NS_ASSERTION(nsnull!=childDisplay, "bad childDisplay"); if (NS_STYLE_DISPLAY_TABLE_COLUMN == childDisplay->mDisplay) { rv = IR_ColInserted(aPresContext, aDesiredSize, aReflowState, aStatus, @@ -285,6 +288,8 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsIPresContext& aPresCont break; case nsIReflowCommand::FrameAppended : + NS_ASSERTION(nsnull!=objectFrame, "bad objectFrame"); + NS_ASSERTION(nsnull!=childDisplay, "bad childDisplay"); if (NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP == childDisplay->mDisplay) { rv = IR_ColAppended(aPresContext, aDesiredSize, aReflowState, aStatus, @@ -302,6 +307,8 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsIPresContext& aPresCont */ case nsIReflowCommand::FrameRemoved : + NS_ASSERTION(nsnull!=objectFrame, "bad objectFrame"); + NS_ASSERTION(nsnull!=childDisplay, "bad childDisplay"); if (NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP == childDisplay->mDisplay) { rv = IR_ColRemoved(aPresContext, aDesiredSize, aReflowState, aStatus, @@ -471,21 +478,6 @@ NS_METHOD nsTableColGroupFrame::IR_StyleChanged(nsIPresContext& aPresCo tableFrame->InvalidateColumnCache(); tableFrame->InvalidateFirstPassCache(); } - - /* - // we are obligated to pass along the reflow command to our children before doing anything else - nsIFrame *childFrame = mFirstChild; - while (nsnull!=childFrame) - { - nsHTMLReflowState childReflowState(aPresContext, childFrame, aReflowState, - aReflowState.maxSize, eReflowReason_Incremental); - rv = ReflowChild(childFrame, aPresContext, aDesiredSize, childReflowState, aStatus); - if (NS_FAILED(rv)) - break; - // the returned desired size is irrelevant, because we'll do a resize reflow in a moment - childFrame->GetNextSibling(childFrame); - } -*/ return rv; } diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index d5beb89f789..df001dcee98 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -2222,23 +2222,8 @@ NS_METHOD nsTableFrame::IR_StyleChanged(nsIPresContext& aPresContext, // we presume that all the easy optimizations were done in the nsHTMLStyleSheet before we were called here // XXX: we can optimize this when we know which style attribute changed // if something like border changes, we need to do pass1 again - // but if something like width changes, we just need to do pass2 + // but if something like width changes from 100 to 200, we just need to do pass2 InvalidateFirstPassCache(); - - // we are obligated to pass along the reflow command to our children before doing anything else - /* - nsIFrame *childFrame = mFirstChild; - while (nsnull!=childFrame) - { - nsHTMLReflowState childReflowState(aPresContext, childFrame, aReflowState.reflowState, - aReflowState.availSize, eReflowReason_Incremental); - rv = ReflowChild(childFrame, aPresContext, aDesiredSize, childReflowState, aStatus); - if (NS_FAILED(rv)) - break; - // the returned desired size is irrelevant, because we'll do a resize reflow in a moment - childFrame->GetNextSibling(childFrame); - } - */ return rv; } diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index eadf0e37ec9..c359e607f0f 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -1149,21 +1149,6 @@ NS_METHOD nsTableRowFrame::IR_StyleChanged(nsIPresContext& aPresContext, { tableFrame->InvalidateFirstPassCache(); } - - /* - // we are obligated to pass along the reflow command to our children before doing anything else - nsIFrame *childFrame = mFirstChild; - while (nsnull!=childFrame) - { - nsHTMLReflowState childReflowState(aPresContext, childFrame, aReflowState.reflowState, - aReflowState.availSize, eReflowReason_Incremental); - rv = ReflowChild(childFrame, aPresContext, aDesiredSize, childReflowState, aStatus); - if (NS_FAILED(rv)) - break; - // the returned desired size is irrelevant, because we'll do a resize reflow in a moment - childFrame->GetNextSibling(childFrame); - } - */ return rv; } diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index 0f1eecc3f1d..98df6f76ff1 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -1198,21 +1198,6 @@ NS_METHOD nsTableRowGroupFrame::IR_StyleChanged(nsIPresContext& aPresContex { tableFrame->InvalidateFirstPassCache(); } - - /* - // we are obligated to pass along the reflow command to our children before doing anything else - nsIFrame *childFrame = mFirstChild; - while (nsnull!=childFrame) - { - nsHTMLReflowState childReflowState(aPresContext, childFrame, aReflowState.reflowState, - aReflowState.availSize, eReflowReason_Incremental); - rv = ReflowChild(childFrame, aPresContext, aDesiredSize, childReflowState, aStatus); - if (NS_FAILED(rv)) - break; - // the returned desired size is irrelevant, because we'll do a resize reflow in a moment - childFrame->GetNextSibling(childFrame); - } - */ return rv; } diff --git a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index 6c73402bc74..f9e2e07f29a 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp @@ -676,7 +676,7 @@ PRBool BasicTableLayoutStrategy::AssignPreliminaryColumnWidths() // clean up if (nsnull!=spanList) { - if (gsDebug) printf("BTLS::APCW...space leak, span list not empty"); + if (gsDebug) printf("BTLS::APCW...space leak, span list not empty\n"); delete spanList; } if (nsnull!=colSpanList) diff --git a/mozilla/layout/tables/nsTableColGroupFrame.cpp b/mozilla/layout/tables/nsTableColGroupFrame.cpp index 334cf34babc..520b2b9de61 100644 --- a/mozilla/layout/tables/nsTableColGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableColGroupFrame.cpp @@ -267,12 +267,15 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsIPresContext& aPresCont aReflowState.reflowCommand->GetType(type); nsIFrame *objectFrame; aReflowState.reflowCommand->GetChildFrame(objectFrame); - const nsStyleDisplay *childDisplay; - objectFrame->GetStyleData(eStyleStruct_Display, ((nsStyleStruct *&)childDisplay)); + const nsStyleDisplay *childDisplay=nsnull; + if (nsnull!=objectFrame) + objectFrame->GetStyleData(eStyleStruct_Display, ((nsStyleStruct *&)childDisplay)); if (PR_TRUE==gsDebugIR) printf("nTCGF IR: IncrementalReflow_TargetIsMe with type=%d\n", type); switch (type) { case nsIReflowCommand::FrameInserted : + NS_ASSERTION(nsnull!=objectFrame, "bad objectFrame"); + NS_ASSERTION(nsnull!=childDisplay, "bad childDisplay"); if (NS_STYLE_DISPLAY_TABLE_COLUMN == childDisplay->mDisplay) { rv = IR_ColInserted(aPresContext, aDesiredSize, aReflowState, aStatus, @@ -285,6 +288,8 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsIPresContext& aPresCont break; case nsIReflowCommand::FrameAppended : + NS_ASSERTION(nsnull!=objectFrame, "bad objectFrame"); + NS_ASSERTION(nsnull!=childDisplay, "bad childDisplay"); if (NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP == childDisplay->mDisplay) { rv = IR_ColAppended(aPresContext, aDesiredSize, aReflowState, aStatus, @@ -302,6 +307,8 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsMe(nsIPresContext& aPresCont */ case nsIReflowCommand::FrameRemoved : + NS_ASSERTION(nsnull!=objectFrame, "bad objectFrame"); + NS_ASSERTION(nsnull!=childDisplay, "bad childDisplay"); if (NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP == childDisplay->mDisplay) { rv = IR_ColRemoved(aPresContext, aDesiredSize, aReflowState, aStatus, @@ -471,21 +478,6 @@ NS_METHOD nsTableColGroupFrame::IR_StyleChanged(nsIPresContext& aPresCo tableFrame->InvalidateColumnCache(); tableFrame->InvalidateFirstPassCache(); } - - /* - // we are obligated to pass along the reflow command to our children before doing anything else - nsIFrame *childFrame = mFirstChild; - while (nsnull!=childFrame) - { - nsHTMLReflowState childReflowState(aPresContext, childFrame, aReflowState, - aReflowState.maxSize, eReflowReason_Incremental); - rv = ReflowChild(childFrame, aPresContext, aDesiredSize, childReflowState, aStatus); - if (NS_FAILED(rv)) - break; - // the returned desired size is irrelevant, because we'll do a resize reflow in a moment - childFrame->GetNextSibling(childFrame); - } -*/ return rv; } diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index d5beb89f789..df001dcee98 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -2222,23 +2222,8 @@ NS_METHOD nsTableFrame::IR_StyleChanged(nsIPresContext& aPresContext, // we presume that all the easy optimizations were done in the nsHTMLStyleSheet before we were called here // XXX: we can optimize this when we know which style attribute changed // if something like border changes, we need to do pass1 again - // but if something like width changes, we just need to do pass2 + // but if something like width changes from 100 to 200, we just need to do pass2 InvalidateFirstPassCache(); - - // we are obligated to pass along the reflow command to our children before doing anything else - /* - nsIFrame *childFrame = mFirstChild; - while (nsnull!=childFrame) - { - nsHTMLReflowState childReflowState(aPresContext, childFrame, aReflowState.reflowState, - aReflowState.availSize, eReflowReason_Incremental); - rv = ReflowChild(childFrame, aPresContext, aDesiredSize, childReflowState, aStatus); - if (NS_FAILED(rv)) - break; - // the returned desired size is irrelevant, because we'll do a resize reflow in a moment - childFrame->GetNextSibling(childFrame); - } - */ return rv; } diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index eadf0e37ec9..c359e607f0f 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -1149,21 +1149,6 @@ NS_METHOD nsTableRowFrame::IR_StyleChanged(nsIPresContext& aPresContext, { tableFrame->InvalidateFirstPassCache(); } - - /* - // we are obligated to pass along the reflow command to our children before doing anything else - nsIFrame *childFrame = mFirstChild; - while (nsnull!=childFrame) - { - nsHTMLReflowState childReflowState(aPresContext, childFrame, aReflowState.reflowState, - aReflowState.availSize, eReflowReason_Incremental); - rv = ReflowChild(childFrame, aPresContext, aDesiredSize, childReflowState, aStatus); - if (NS_FAILED(rv)) - break; - // the returned desired size is irrelevant, because we'll do a resize reflow in a moment - childFrame->GetNextSibling(childFrame); - } - */ return rv; } diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 0f1eecc3f1d..98df6f76ff1 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -1198,21 +1198,6 @@ NS_METHOD nsTableRowGroupFrame::IR_StyleChanged(nsIPresContext& aPresContex { tableFrame->InvalidateFirstPassCache(); } - - /* - // we are obligated to pass along the reflow command to our children before doing anything else - nsIFrame *childFrame = mFirstChild; - while (nsnull!=childFrame) - { - nsHTMLReflowState childReflowState(aPresContext, childFrame, aReflowState.reflowState, - aReflowState.availSize, eReflowReason_Incremental); - rv = ReflowChild(childFrame, aPresContext, aDesiredSize, childReflowState, aStatus); - if (NS_FAILED(rv)) - break; - // the returned desired size is irrelevant, because we'll do a resize reflow in a moment - childFrame->GetNextSibling(childFrame); - } - */ return rv; }