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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 2836293003: Let siblings layout if an adjacent float may no longer affect them (Closed)
Patch Set: bug 711938 Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/float/margin-top-changes.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9fd14255efb568cc83fcfc7da64129b8aba15919..9b3620e03bbc372282379f70bfb8d34e16be3372 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -689,8 +689,10 @@ void LayoutBlockFlow::MarkDescendantsWithFloatsForLayoutIfNeeded(
} else if (!child.AvoidsFloats() || child.ShrinkToAvoidFloats()) {
// If an element might be affected by the presence of floats, then always
// mark it for layout.
- if (std::max(previous_float_logical_bottom, LowestFloatLogicalBottom()) >
- new_logical_top)
+ LayoutUnit lowest_float =
+ std::max(previous_float_logical_bottom, LowestFloatLogicalBottom());
+ lowest_float = std::max(lowest_float, child.LowestFloatLogicalBottom());
+ if (lowest_float > new_logical_top)
mark_descendants_with_floats = true;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/block/float/margin-top-changes.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698