Chromium Code Reviews| Index: Source/core/layout/LayoutBlockFlowLine.cpp |
| diff --git a/Source/core/layout/LayoutBlockFlowLine.cpp b/Source/core/layout/LayoutBlockFlowLine.cpp |
| index 90671e46dfb6dd6edd0603c695ac1853c4caf191..d0e70caa2ce2b055049c8664e2afa3857ffba947 100644 |
| --- a/Source/core/layout/LayoutBlockFlowLine.cpp |
| +++ b/Source/core/layout/LayoutBlockFlowLine.cpp |
| @@ -1563,6 +1563,9 @@ void LayoutBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit& pa |
| if (!layoutState.hasInlineChild() && o->isInline()) |
| layoutState.setHasInlineChild(true); |
| + if (o->isBR() && o->style()->clear() != CNONE) |
| + layoutState.setContainsBRWithClear(true); |
| + |
| if (o->isReplaced() || o->isFloating() || o->isOutOfFlowPositioned()) { |
| LayoutBox* box = toLayoutBox(o); |
| @@ -1858,6 +1861,11 @@ bool LayoutBlockFlow::matchedEndLine(LineLayoutState& layoutState, const InlineB |
| if (resolver.position() == endLineStart) { |
| if (resolver.status() != endLineStatus) |
| return false; |
| + |
| + // Be careful not to ignore <br> with clear style for partial layout where the block |
| + // contains floats. It might mislead height of the block into being shorter than expected. |
|
leviw_travelin_and_unemployed
2015/05/19 21:29:52
Can we word this better?
Specifically mention the
changseok
2015/05/20 14:22:24
Updated.
|
| + if (layoutState.containsBRWithClear() && containsFloats()) |
| + return false; |
| return checkPaginationAndFloatsAtEndLine(layoutState); |
| } |