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

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

Issue 655053002: Fix incorrect assumption about children's flexBasis (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix test Created 6 years, 2 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 | « LayoutTests/fast/flexbox/relayout-children-when-switching-direction-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderFlexibleBox.cpp
diff --git a/Source/core/rendering/RenderFlexibleBox.cpp b/Source/core/rendering/RenderFlexibleBox.cpp
index faff63cc332575ce84bb1b4cb80c6037e17c17d7..25956e075f1ea29a132543a0ae5fc7ce75e3a8ef 100644
--- a/Source/core/rendering/RenderFlexibleBox.cpp
+++ b/Source/core/rendering/RenderFlexibleBox.cpp
@@ -611,12 +611,11 @@ LayoutUnit RenderFlexibleBox::preferredMainAxisContentExtentForChild(RenderBox&
if (preferredMainAxisExtentDependsOnLayout(flexBasis, hasInfiniteLineLength)) {
LayoutUnit mainAxisExtent;
if (hasOrthogonalFlow(child)) {
- if (child.needsLayout() || relayoutChildren) {
+ if (child.needsLayout() || relayoutChildren || !m_intrinsicSizeAlongMainAxis.contains(&child)) {
m_intrinsicSizeAlongMainAxis.remove(&child);
child.forceChildLayout();
m_intrinsicSizeAlongMainAxis.set(&child, child.logicalHeight());
}
- ASSERT(m_intrinsicSizeAlongMainAxis.contains(&child));
mainAxisExtent = m_intrinsicSizeAlongMainAxis.get(&child);
} else {
mainAxisExtent = child.maxPreferredLogicalWidth();
« no previous file with comments | « LayoutTests/fast/flexbox/relayout-children-when-switching-direction-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698