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

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

Issue 715083002: Avoid blowing away the intrinsicContentLogicalHeight when stretching height in FlexBox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: s/EAE likes/I like/ Created 6 years, 1 month 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 | « Source/core/rendering/RenderBox.h ('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 51454b7179a4eb3ffcc6e7fb45df9a2b67d5c165..1a789c494170efdb4b653ed483ab7c25aac6ea30 100644
--- a/Source/core/rendering/RenderFlexibleBox.cpp
+++ b/Source/core/rendering/RenderFlexibleBox.cpp
@@ -1350,7 +1350,12 @@ void RenderFlexibleBox::applyStretchAlignmentToChild(RenderBox& child, LayoutUni
child.setOverrideLogicalContentHeight(desiredLogicalHeight - child.borderAndPaddingLogicalHeight());
if (childNeedsRelayout) {
child.setLogicalHeight(0);
+ // We cache the child's intrinsic content logical height to avoid it being reset to the stretched height.
+ // FIXME: This is fragile. RenderBoxes should be smart enough to determine their intrinsic content logical
+ // height correctly even when there's an overrideHeight.
+ LayoutUnit childIntrinsicContentLogicalHeight = child.intrinsicContentLogicalHeight();
child.forceChildLayout();
+ child.updateIntrinsicContentLogicalHeight(childIntrinsicContentLogicalHeight);
}
}
} else if (isColumnFlow() && child.style()->logicalWidth().isAuto()) {
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698