mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Changed it so we get the computed width from the first-in-flow
This commit is contained in:
parent
4e4dc0f626
commit
0cbeed3e6c
@ -2495,9 +2495,15 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
|
||||
SetTableWidth(aPresContext);
|
||||
}
|
||||
|
||||
// Constrain our reflow width to the computed table width
|
||||
// Constrain our reflow width to the computed table width. Note: this is based
|
||||
// on the width of the first-in-flow
|
||||
nsHTMLReflowState reflowState(aReflowState);
|
||||
reflowState.availableWidth = mRect.width;
|
||||
if (mPrevInFlow) {
|
||||
nsTableFrame* table = (nsTableFrame*)GetFirstInFlow();
|
||||
reflowState.availableWidth = table->mRect.width;
|
||||
} else {
|
||||
reflowState.availableWidth = mRect.width;
|
||||
}
|
||||
rv = ResizeReflowPass2(aPresContext, aDesiredSize, reflowState, aStatus);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
@ -2495,9 +2495,15 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
|
||||
SetTableWidth(aPresContext);
|
||||
}
|
||||
|
||||
// Constrain our reflow width to the computed table width
|
||||
// Constrain our reflow width to the computed table width. Note: this is based
|
||||
// on the width of the first-in-flow
|
||||
nsHTMLReflowState reflowState(aReflowState);
|
||||
reflowState.availableWidth = mRect.width;
|
||||
if (mPrevInFlow) {
|
||||
nsTableFrame* table = (nsTableFrame*)GetFirstInFlow();
|
||||
reflowState.availableWidth = table->mRect.width;
|
||||
} else {
|
||||
reflowState.availableWidth = mRect.width;
|
||||
}
|
||||
rv = ResizeReflowPass2(aPresContext, aDesiredSize, reflowState, aStatus);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
Loading…
Reference in New Issue
Block a user