Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1368)

Unified Diff: Source/core/layout/LayoutBlockFlowLine.cpp

Issue 1102953002: BR styled clear is ignored while partially relayouting. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/LayoutBlockFlowLine.cpp
diff --git a/Source/core/layout/LayoutBlockFlowLine.cpp b/Source/core/layout/LayoutBlockFlowLine.cpp
index f50503df8f4ac7314d450abc495ec79108cc2260..afaf3a8a017148e3f4034ed1b872791deb5fd106 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)
leviw_travelin_and_unemployed 2015/05/14 02:22:19 It's sad that we're doing this whenever there's an
changseok 2015/05/14 16:18:46 Yeah.. Do you have any better idea to reduce itera
+ layoutState.setContainsBRWithClear(true);
+
if (o->isReplaced() || o->isFloating() || o->isOutOfFlowPositioned()) {
LayoutBox* box = toLayoutBox(o);
@@ -1856,7 +1859,7 @@ bool LayoutBlockFlow::checkPaginationAndFloatsAtEndLine(LineLayoutState& layoutS
bool LayoutBlockFlow::matchedEndLine(LineLayoutState& layoutState, const InlineBidiResolver& resolver, const InlineIterator& endLineStart, const BidiStatus& endLineStatus)
{
if (resolver.position() == endLineStart) {
- if (resolver.status() != endLineStatus)
+ if (resolver.status() != endLineStatus || (containsFloats() && layoutState.containsBRWithClear()))
leviw_travelin_and_unemployed 2015/05/14 02:22:19 I think I'd prefer the following: if (resolver.st
changseok 2015/05/14 16:18:46 Make sense.
return false;
return checkPaginationAndFloatsAtEndLine(layoutState);
}
« no previous file with comments | « LayoutTests/fast/block/float/br-with-clear-4-expected.html ('k') | Source/core/layout/line/LineLayoutState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698