diff --git a/src/Layout.c b/src/Layout.c index 5fbbd594..d0aac101 100644 --- a/src/Layout.c +++ b/src/Layout.c @@ -693,19 +693,6 @@ static void layoutNodeImpl(css_node_t *node, float parentMaxWidth) { } } - float containerMainAxis = node->layout.dimensions[dim[mainAxis]]; - // If the user didn't specify a width or height, and it has not been set - // by the container, then we set it via the children. - if (isUndefined(containerMainAxis)) { - containerMainAxis = fmaxf( - // We're missing the last padding at this point to get the final - // dimension - boundAxis(node, mainAxis, mainDim + getPaddingAndBorder(node, trailing[mainAxis])), - // We can never assign a width smaller than the padding and borders - getPaddingAndBorderAxis(node, mainAxis) - ); - } - float containerCrossAxis = node->layout.dimensions[dim[crossAxis]]; if (isUndefined(node->layout.dimensions[dim[crossAxis]])) { containerCrossAxis = fmaxf( diff --git a/src/Layout.js b/src/Layout.js index 652dc891..cf8353b8 100755 --- a/src/Layout.js +++ b/src/Layout.js @@ -584,19 +584,6 @@ var computeLayout = (function() { } } - var/*float*/ containerMainAxis = node.layout[dim[mainAxis]]; - // If the user didn't specify a width or height, and it has not been set - // by the container, then we set it via the children. - if (isUndefined(containerMainAxis)) { - containerMainAxis = fmaxf( - // We're missing the last padding at this point to get the final - // dimension - boundAxis(node, mainAxis, mainDim + getPaddingAndBorder(node, trailing[mainAxis])), - // We can never assign a width smaller than the padding and borders - getPaddingAndBorderAxis(node, mainAxis) - ); - } - var/*float*/ containerCrossAxis = node.layout[dim[crossAxis]]; if (isUndefined(node.layout[dim[crossAxis]])) { containerCrossAxis = fmaxf( diff --git a/src/java/src/com/facebook/csslayout/LayoutEngine.java b/src/java/src/com/facebook/csslayout/LayoutEngine.java index 2518bb00..c7283a14 100644 --- a/src/java/src/com/facebook/csslayout/LayoutEngine.java +++ b/src/java/src/com/facebook/csslayout/LayoutEngine.java @@ -638,19 +638,6 @@ public class LayoutEngine { } } - float containerMainAxis = getLayoutDimension(node, getDim(mainAxis)); - // If the user didn't specify a width or height, and it has not been set - // by the container, then we set it via the children. - if (CSSConstants.isUndefined(containerMainAxis)) { - containerMainAxis = Math.max( - // We're missing the last padding at this point to get the final - // dimension - boundAxis(node, mainAxis, mainDim + getPaddingAndBorder(node, getTrailing(mainAxis))), - // We can never assign a width smaller than the padding and borders - getPaddingAndBorderAxis(node, mainAxis) - ); - } - float containerCrossAxis = getLayoutDimension(node, getDim(crossAxis)); if (CSSConstants.isUndefined(getLayoutDimension(node, getDim(crossAxis)))) { containerCrossAxis = Math.max(