From df4edf9f5e27788887d6f1c02e727d250a7a424a Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Thu, 5 Aug 2010 21:59:20 -0700 Subject: [PATCH] Don't switch a constrained height to an unconstrained one due to infinite clearance. Fixes layout/reftests/bugs/563584-10b.html . (Bug 563584, patch 29) r=roc --- layout/generic/nsBlockFrame.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/layout/generic/nsBlockFrame.cpp b/layout/generic/nsBlockFrame.cpp index 00a5b8bab13..a449e0d3592 100644 --- a/layout/generic/nsBlockFrame.cpp +++ b/layout/generic/nsBlockFrame.cpp @@ -3087,6 +3087,14 @@ nsBlockFrame::ReflowBlockFrame(nsBlockReflowState& aState, availSpace.y -= topMargin; if (NS_UNCONSTRAINEDSIZE != availSpace.height) { availSpace.height += topMargin; + + // When there is a pushed float, clearance could equal + // NS_UNCONSTRAINEDSIZE (FIXME: is that really a good idea?), but + // we don't want that to change a constrained height to an + // unconstrained one. + if (NS_UNCONSTRAINEDSIZE == availSpace.height) { + --availSpace.height; + } } // Reflow the block into the available space