Fix width being ignored when has a value of 0

8f6a96adbc added a test in isDimDefined that checks if `value > 0.0`, but unfortunately, it did not faithfully port the JavaScript version which is `value >= 0.0`. Sadly, no test covered this so it went unnoticed.
This commit is contained in:
Christopher Chedeau
2015-09-25 13:09:58 -07:00
parent 246005cc84
commit e280a577ae
14 changed files with 140 additions and 23 deletions

View File

@@ -440,7 +440,7 @@ static float getDimWithMargin(css_node_t *node, css_flex_direction_t axis) {
static bool isDimDefined(css_node_t *node, css_flex_direction_t axis) {
float value = node->style.dimensions[dim[axis]];
return !isUndefined(value) && value > 0.0;
return !isUndefined(value) && value >= 0.0;
}
static bool isPosDefined(css_node_t *node, css_position_t position) {