Fix justify content + min dimension when children overflow

Reviewed By: gkassabli

Differential Revision: D4029442

fbshipit-source-id: d28ebd269c452c3359e16ecc5749a415da6e4d75
This commit is contained in:
Emil Sjolander 2016-10-17 08:01:26 -07:00 committed by Facebook Github Bot
parent 72cd12ed13
commit 3e332d9cc8
1 changed files with 3 additions and 2 deletions

View File

@ -1544,9 +1544,10 @@ static void layoutNodeImpl(const CSSNodeRef node,
// If we are using "at most" rules in the main axis. Calculate the remaining space when
// constraint by the min size defined for the main axis.
if (measureModeMainDim == CSSMeasureModeAtMost) {
if (measureModeMainDim == CSSMeasureModeAtMost && remainingFreeSpace > 0) {
if (!CSSValueIsUndefined(node->style.minDimensions[dim[mainAxis]]) && node->style.minDimensions[dim[mainAxis]] >= 0) {
remainingFreeSpace = fmaxf(0, node->style.minDimensions[dim[mainAxis]] - (availableInnerMainDim - remainingFreeSpace));
remainingFreeSpace = fmax(0, node->style.minDimensions[dim[mainAxis]] - (availableInnerMainDim - remainingFreeSpace));
} else {
remainingFreeSpace = 0;
}