mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 22:55:23 +00:00
Added code to honor constrained width
This commit is contained in:
parent
8485228c85
commit
e8f864f12c
@ -116,12 +116,16 @@ nsBodyFrame::Reflow(nsIPresContext& aPresContext,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
("enter nsBodyFrame::Reflow: maxSize=%d,%d reason=%d",
|
||||
aReflowState.maxSize.width,
|
||||
aReflowState.maxSize.height,
|
||||
aReflowState.reason));
|
||||
|
||||
const nsHTMLReflowState* rsp = &aReflowState;
|
||||
nsHTMLReflowState resizeReflowState(aReflowState);
|
||||
resizeReflowState.spaceManager = mSpaceManager;
|
||||
|
||||
NS_FRAME_TRACE_REFLOW_IN("nsBodyFrame::Reflow");
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE; // initialize out parameter
|
||||
|
||||
#if 0
|
||||
@ -496,13 +500,21 @@ nsBodyFrame::GetColumnAvailSpace(nsIPresContext& aPresContext,
|
||||
}
|
||||
else {
|
||||
if (aReflowState.HaveConstrainedWidth()) {
|
||||
result.width -= aBorderPadding.left + aBorderPadding.right;
|
||||
result.width = aReflowState.minWidth +
|
||||
aBorderPadding.left + aBorderPadding.right;
|
||||
}
|
||||
if (aReflowState.HaveConstrainedHeight()) {
|
||||
result.height -= aBorderPadding.top + aBorderPadding.bottom;
|
||||
}
|
||||
}
|
||||
|
||||
NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS,
|
||||
(": nsBodyFrame: columnAvailSpace=%d,%d [%s,%s]\n",
|
||||
result.width, result.height,
|
||||
aReflowState.HaveConstrainedWidth()
|
||||
? "constrained" : "not-constrained",
|
||||
aReflowState.HaveConstrainedHeight()
|
||||
? "constrained" : "not-constrained"));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user