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

Unified Diff: Source/core/rendering/RenderBlockFlow.cpp

Issue 195363007: Avoid unnecessary descents into nested boxes with floats. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 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
Index: Source/core/rendering/RenderBlockFlow.cpp
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp
index 1cf8fe1be07ffea7f5bec28804addcbb4dcd723c..7bbe7331802534f0a3b86e5500cdf4a926e59412 100644
--- a/Source/core/rendering/RenderBlockFlow.cpp
+++ b/Source/core/rendering/RenderBlockFlow.cpp
@@ -448,6 +448,7 @@ inline bool RenderBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
// Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway).
computeOverflow(oldClientAfterEdge);
+ m_descendantsWithFloatsMarkedForLayout = false;
return true;
}
@@ -1692,6 +1693,10 @@ void RenderBlockFlow::markAllDescendantsWithFloatsForLayout(RenderBox* floatToRe
if (!everHadLayout() && !containsFloats())
return;
+ if (m_descendantsWithFloatsMarkedForLayout && !floatToRemove)
+ return;
+ m_descendantsWithFloatsMarkedForLayout = m_descendantsWithFloatsMarkedForLayout || !floatToRemove;
+
MarkingBehavior markParents = inLayout ? MarkOnlyThis : MarkContainingBlockChain;
setChildNeedsLayout(markParents);
« Source/core/rendering/RenderBlock.h ('K') | « Source/core/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698