diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index d38f80481d4..231ea33436d 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -43,39 +43,6 @@ static NS_DEFINE_IID(kIHTMLTableCellElementIID, NS_IHTMLTABLECELLELEMENT_IID); NS_DEF_PTR(nsIStyleContext); -/* ----------- RowReflowState ---------- */ - -struct RowReflowState { - // Our reflow state - const nsHTMLReflowState& reflowState; - - // The body's available size (computed from the body's parent) - nsSize availSize; - - // the running x-offset - nscoord x; - - // Height of tallest cell (excluding cells with rowspan > 1) - nscoord maxCellHeight; // just the height of the cell frame - nscoord maxCellVertSpace; // the maximum MAX(cellheight + topMargin + bottomMargin) - - nsTableFrame *tableFrame; - - RowReflowState(const nsHTMLReflowState& aReflowState, - nsTableFrame* aTableFrame) - : reflowState(aReflowState) - { - availSize.width = reflowState.availableWidth; - availSize.height = reflowState.availableHeight; - maxCellHeight = 0; - maxCellVertSpace = 0; - tableFrame = aTableFrame; - x=0; - } -}; - - - /* ----------- nsTableRowpFrame ---------- */ diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.h b/mozilla/layout/html/table/src/nsTableRowFrame.h index bb1cbb1b538..22e4b944e03 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.h +++ b/mozilla/layout/html/table/src/nsTableRowFrame.h @@ -23,7 +23,37 @@ class nsTableFrame; class nsTableCellFrame; -struct RowReflowState; + +/* ----------- RowReflowState ---------- */ + +struct RowReflowState { + // Our reflow state + const nsHTMLReflowState& reflowState; + + // The body's available size (computed from the body's parent) + nsSize availSize; + + // the running x-offset + nscoord x; + + // Height of tallest cell (excluding cells with rowspan > 1) + nscoord maxCellHeight; // just the height of the cell frame + nscoord maxCellVertSpace; // the maximum MAX(cellheight + topMargin + bottomMargin) + + nsTableFrame *tableFrame; + + RowReflowState(const nsHTMLReflowState& aReflowState, + nsTableFrame* aTableFrame) + : reflowState(aReflowState) + { + availSize.width = reflowState.availableWidth; + availSize.height = reflowState.availableHeight; + maxCellHeight = 0; + maxCellVertSpace = 0; + tableFrame = aTableFrame; + x=0; + } +}; /** * nsTableRowFrame is the frame that maps table rows diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index c6e96d6c0dd..70650db21ba 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -1474,6 +1474,8 @@ NS_METHOD nsTableRowGroupFrame::IR_TargetIsChild(nsIPresContext& aPresConte // Inform the row of its new height. PRBool isJustSingleRow = PR_FALSE; /* how to determine this now? */ if (isJustSingleRow) { + // XXX If someone enables this, note that this is a bad cast, since your + // child could be a nested table row group (the tree widget strikes again). ((nsTableRowFrame*)aNextFrame)->DidResize(aPresContext, aReflowState.reflowState); // Adjust the frames that follow... diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index d38f80481d4..231ea33436d 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -43,39 +43,6 @@ static NS_DEFINE_IID(kIHTMLTableCellElementIID, NS_IHTMLTABLECELLELEMENT_IID); NS_DEF_PTR(nsIStyleContext); -/* ----------- RowReflowState ---------- */ - -struct RowReflowState { - // Our reflow state - const nsHTMLReflowState& reflowState; - - // The body's available size (computed from the body's parent) - nsSize availSize; - - // the running x-offset - nscoord x; - - // Height of tallest cell (excluding cells with rowspan > 1) - nscoord maxCellHeight; // just the height of the cell frame - nscoord maxCellVertSpace; // the maximum MAX(cellheight + topMargin + bottomMargin) - - nsTableFrame *tableFrame; - - RowReflowState(const nsHTMLReflowState& aReflowState, - nsTableFrame* aTableFrame) - : reflowState(aReflowState) - { - availSize.width = reflowState.availableWidth; - availSize.height = reflowState.availableHeight; - maxCellHeight = 0; - maxCellVertSpace = 0; - tableFrame = aTableFrame; - x=0; - } -}; - - - /* ----------- nsTableRowpFrame ---------- */ diff --git a/mozilla/layout/tables/nsTableRowFrame.h b/mozilla/layout/tables/nsTableRowFrame.h index bb1cbb1b538..22e4b944e03 100644 --- a/mozilla/layout/tables/nsTableRowFrame.h +++ b/mozilla/layout/tables/nsTableRowFrame.h @@ -23,7 +23,37 @@ class nsTableFrame; class nsTableCellFrame; -struct RowReflowState; + +/* ----------- RowReflowState ---------- */ + +struct RowReflowState { + // Our reflow state + const nsHTMLReflowState& reflowState; + + // The body's available size (computed from the body's parent) + nsSize availSize; + + // the running x-offset + nscoord x; + + // Height of tallest cell (excluding cells with rowspan > 1) + nscoord maxCellHeight; // just the height of the cell frame + nscoord maxCellVertSpace; // the maximum MAX(cellheight + topMargin + bottomMargin) + + nsTableFrame *tableFrame; + + RowReflowState(const nsHTMLReflowState& aReflowState, + nsTableFrame* aTableFrame) + : reflowState(aReflowState) + { + availSize.width = reflowState.availableWidth; + availSize.height = reflowState.availableHeight; + maxCellHeight = 0; + maxCellVertSpace = 0; + tableFrame = aTableFrame; + x=0; + } +}; /** * nsTableRowFrame is the frame that maps table rows diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index c6e96d6c0dd..70650db21ba 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -1474,6 +1474,8 @@ NS_METHOD nsTableRowGroupFrame::IR_TargetIsChild(nsIPresContext& aPresConte // Inform the row of its new height. PRBool isJustSingleRow = PR_FALSE; /* how to determine this now? */ if (isJustSingleRow) { + // XXX If someone enables this, note that this is a bad cast, since your + // child could be a nested table row group (the tree widget strikes again). ((nsTableRowFrame*)aNextFrame)->DidResize(aPresContext, aReflowState.reflowState); // Adjust the frames that follow...