Index: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
index 3f9c12f381a38e37c3da6530c8d553774887fc86..0e1a6b06a6ea29b89ef1827cdc57527b7da61b3f 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp |
@@ -429,6 +429,8 @@ inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit & |
// TODO(robhogan): We should exclude blocks that create formatting contexts, not just out of flow or floating blocks. |
if (child->isLayoutBlockFlow() && !child->isFloatingOrOutOfFlowPositioned()) { |
LayoutBlockFlow* block = toLayoutBlockFlow(child); |
+ if (!block->containsFloats()) |
+ continue; |
lowestBlock = block; |
if (oldHeight <= newHeight || block->lowestFloatLogicalBottom() + block->logicalTop() <= newHeight) |
break; |
@@ -436,6 +438,8 @@ inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit & |
addedOverhangingFloats = true; |
} |
} |
+ // If we have no overhanging floats we still pass a record of the lowest non-overhanging float up the tree so we can enclose it if |
+ // we are a formatting context and allow siblings to avoid it if they have negative margin and find themselves in its vicinity. |
if (!addedOverhangingFloats) |
addLowestFloatFromChildren(lowestBlock); |
} |