From 8fcef36616b911a5c774fdff6cc786e21bfba184 Mon Sep 17 00:00:00 2001 From: Pale Moon Date: Wed, 12 Aug 2015 19:37:18 +0200 Subject: [PATCH] Make sure that a block element following left float clears it when it can't fit next to it. (2009 BMO bug) This resolves #732 --- layout/generic/nsBlockReflowContext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/generic/nsBlockReflowContext.cpp b/layout/generic/nsBlockReflowContext.cpp index 28d66d069c..8d034edb9a 100644 --- a/layout/generic/nsBlockReflowContext.cpp +++ b/layout/generic/nsBlockReflowContext.cpp @@ -164,7 +164,8 @@ nsBlockReflowContext::ComputeCollapsedBStartMargin(const nsHTMLReflowState& aRS, availSpace); // Record that we're being optimistic by assuming the kid // has no clearance - if (kid->StyleDisplay()->mBreakType != NS_STYLE_CLEAR_NONE) { + if (kid->StyleDisplay()->mBreakType != NS_STYLE_CLEAR_NONE || + !nsBlockFrame::BlockCanIntersectFloats(kid)) { *aMayNeedRetry = true; } if (ComputeCollapsedBStartMargin(innerReflowState, aMargin,