Implement a method on the float manager to get the largest width available within a height (rather than just at a point). (Bug 25888) r+sr=roc

This commit is contained in:
L. David Baron
2009-05-20 07:21:34 -04:00
parent 0ed75adb3f
commit 1b30cae7c9
3 changed files with 46 additions and 25 deletions

View File

@@ -346,10 +346,11 @@ nsBlockReflowState::GetFloatAvailableSpaceWithState(
#endif
nsFlowAreaRect result =
mFloatManager->GetBand(aY - BorderPadding().top,
aRelaxHeightConstraint ? nscoord_MAX
: mContentArea.height,
mContentArea.width, aState);
mFloatManager->GetFlowArea(aY - BorderPadding().top,
nsFloatManager::BAND_FROM_POINT,
aRelaxHeightConstraint ? nscoord_MAX
: mContentArea.height,
mContentArea.width, aState);
// Keep the width >= 0 for compatibility with nsSpaceManager.
if (result.mRect.width < 0)
result.mRect.width = 0;