Bug 794693, part 1: Refactor nsHTMLReflowState constructor to allow initialization to be done by caller. [r=dbaron]
This commit is contained in:
@@ -28,9 +28,9 @@ struct nsTableCellReflowState : public nsHTMLReflowState
|
||||
const nsHTMLReflowState& aParentReflowState,
|
||||
nsIFrame* aFrame,
|
||||
const nsSize& aAvailableSpace,
|
||||
bool aInit = true)
|
||||
uint32_t aFlags = 0)
|
||||
: nsHTMLReflowState(aPresContext, aParentReflowState, aFrame,
|
||||
aAvailableSpace, -1, -1, aInit)
|
||||
aAvailableSpace, -1, -1, aFlags)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -810,7 +810,8 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
|
||||
// it's an unknown frame type, give it a generic reflow and ignore the results
|
||||
nsTableCellReflowState kidReflowState(aPresContext, aReflowState,
|
||||
kidFrame, nsSize(0,0), false);
|
||||
kidFrame, nsSize(0,0),
|
||||
nsHTMLReflowState::CALLER_WILL_INIT);
|
||||
InitChildReflowState(*aPresContext, nsSize(0,0), false, kidReflowState);
|
||||
nsHTMLReflowMetrics desiredSize;
|
||||
nsReflowStatus status;
|
||||
@@ -889,7 +890,8 @@ nsTableRowFrame::ReflowChildren(nsPresContext* aPresContext,
|
||||
|
||||
// Reflow the child
|
||||
nsTableCellReflowState kidReflowState(aPresContext, aReflowState,
|
||||
kidFrame, kidAvailSize, false);
|
||||
kidFrame, kidAvailSize,
|
||||
nsHTMLReflowState::CALLER_WILL_INIT);
|
||||
InitChildReflowState(*aPresContext, kidAvailSize, borderCollapse,
|
||||
kidReflowState);
|
||||
|
||||
@@ -1083,7 +1085,8 @@ nsTableRowFrame::ReflowCellFrame(nsPresContext* aPresContext,
|
||||
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
|
||||
bool borderCollapse = tableFrame->IsBorderCollapse();
|
||||
nsTableCellReflowState cellReflowState(aPresContext, aReflowState,
|
||||
aCellFrame, availSize, false);
|
||||
aCellFrame, availSize,
|
||||
nsHTMLReflowState::CALLER_WILL_INIT);
|
||||
InitChildReflowState(*aPresContext, availSize, borderCollapse, cellReflowState);
|
||||
cellReflowState.mFlags.mIsTopOfPage = aIsTopOfPage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user