Fix sizing of non strech items

Summary:
Fixes the sizing of items so that under most scenarios it calcultes its height by it's content for non exact measurings. This introduces a new useLegacyStretchBehaviour flag on the config to opt out of this change as it is breaking.

See facebook/yoga#505
Closes https://github.com/facebook/yoga/pull/506

Reviewed By: astreet

Differential Revision: D4954016

Pulled By: emilsjolander

fbshipit-source-id: d28bd5d174cd76951fb94df85e3b0cfab7f81ff7
This commit is contained in:
Lukas Wöhrl
2017-04-28 06:13:51 -07:00
committed by Facebook Github Bot
parent e3dbef7cbd
commit 203577724e
25 changed files with 635 additions and 37 deletions

View File

@@ -380,8 +380,6 @@ it("justify_content_overflow_min_max", function () {
it("flex_grow_to_min", function () {
var config = Yoga.Config.create();
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_MIN_FLEX_FIX, true);
try {
var root = Yoga.Node.create(config);
root.setWidth(100);
@@ -440,8 +438,6 @@ it("flex_grow_to_min", function () {
it("flex_grow_in_at_most_container", function () {
var config = Yoga.Config.create();
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_MIN_FLEX_FIX, true);
try {
var root = Yoga.Node.create(config);
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);