Change mCBReflowState to mean the containing block of _this_ reflow state

instead of the containing block of kids.  Fix the containing block calculations
for various cases of absolutely positioned descendants of relatively positioned
inlines (eg make "right" and "bottom" work in those situations).  Bug 135082,
r+sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@155456 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2004-04-24 17:56:23 +00:00
parent 3abb3a1fa3
commit 7f1f8aacd3
10 changed files with 206 additions and 202 deletions

View File

@@ -1286,8 +1286,13 @@ nsPositionedInlineFrame::Reflow(nsIPresContext* aPresContext,
(eReflowReason_Incremental != aReflowState.reason ||
aReflowState.path->mReflowCommand ||
mRect != oldRect)) {
nscoord containingBlockWidth = -1;
nscoord containingBlockHeight = -1;
// The containing block for the abs pos kids is formed by our content edge.
nscoord containingBlockWidth = aDesiredSize.width -
(aReflowState.mComputedBorderPadding.left +
aReflowState.mComputedBorderPadding.right);
nscoord containingBlockHeight = aDesiredSize.height -
(aReflowState.mComputedBorderPadding.top +
aReflowState.mComputedBorderPadding.bottom);
nsRect childBounds;
rv = mAbsoluteContainer.Reflow(this, aPresContext, aReflowState,