backport changes to C

This commit is contained in:
Christopher Chedeau
2014-04-25 15:46:56 -07:00
parent f97230d418
commit 6fdd724820
2 changed files with 189 additions and 95 deletions

View File

@@ -146,7 +146,6 @@ var computeLayout = (function() {
return 0;
}
// When the user specifically sets a value for width or height
function setDimensionFromStyle(node, axis) {
// The parent already computed us a width or height. We just skip it
@@ -165,21 +164,6 @@ var computeLayout = (function() {
);
}
// The user didn't specify width or height, we use the computed values from
// the children
function setDimensionFromLayout(node, axis, dimension) {
if (!isUndefined(node.layout[dim[axis]])) {
return;
}
node.layout[dim[axis]] = fmaxf(
// In our previous computation, we're missing the trailing part
dimension + getPaddingAndBorder(node, trailing[axis]),
// We can never be smaller than the specified padding + border
getPaddingAndBorderAxis(node, axis)
);
}
// If both left and right are defined, then use left. Otherwise return
// +left or -right depending on which is defined.
function getRelativePosition(node, axis) {