Remove rounding from experimental features
Summary: Rounding has been successfully adopted by multiple products and frameworks. Time to move it out of experimental mode. Rounding can still be turned of by setting the point scale factor to 0 on the config. Reviewed By: gkassabli Differential Revision: D4953838 fbshipit-source-id: 3ee5f27d92f95b3ed4a01c98bc35e9157f2e91c5
This commit is contained in:
committed by
Facebook Github Bot
parent
f6b17183c5
commit
3db38f2a80
@@ -43,10 +43,9 @@ module.exports = {
|
||||
EDGE_VERTICAL: 7,
|
||||
EDGE_ALL: 8,
|
||||
|
||||
EXPERIMENTAL_FEATURE_COUNT: 3,
|
||||
EXPERIMENTAL_FEATURE_ROUNDING: 0,
|
||||
EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 1,
|
||||
EXPERIMENTAL_FEATURE_MIN_FLEX_FIX: 2,
|
||||
EXPERIMENTAL_FEATURE_COUNT: 2,
|
||||
EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 0,
|
||||
EXPERIMENTAL_FEATURE_MIN_FLEX_FIX: 1,
|
||||
|
||||
FLEX_DIRECTION_COUNT: 4,
|
||||
FLEX_DIRECTION_COLUMN: 0,
|
||||
|
@@ -14,8 +14,6 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
it("percentage_width_height", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -60,8 +58,6 @@ it("percentage_width_height", function () {
|
||||
it("percentage_position_left_top", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -108,8 +104,6 @@ it("percentage_position_left_top", function () {
|
||||
it("percentage_position_bottom_right", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -156,8 +150,6 @@ it("percentage_position_bottom_right", function () {
|
||||
it("percentage_flex_basis", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -217,8 +209,6 @@ it("percentage_flex_basis", function () {
|
||||
it("percentage_flex_basis_cross", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(200);
|
||||
@@ -277,8 +267,6 @@ it("percentage_flex_basis_cross", function () {
|
||||
it("percentage_flex_basis_cross_min_height", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(200);
|
||||
@@ -337,8 +325,6 @@ it("percentage_flex_basis_cross_min_height", function () {
|
||||
it("percentage_flex_basis_main_max_height", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -400,8 +386,6 @@ it("percentage_flex_basis_main_max_height", function () {
|
||||
it("percentage_flex_basis_cross_max_height", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(200);
|
||||
@@ -462,8 +446,6 @@ it("percentage_flex_basis_cross_max_height", function () {
|
||||
it("percentage_flex_basis_main_max_width", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -525,8 +507,6 @@ it("percentage_flex_basis_main_max_width", function () {
|
||||
it("percentage_flex_basis_cross_max_width", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(200);
|
||||
@@ -587,8 +567,6 @@ it("percentage_flex_basis_cross_max_width", function () {
|
||||
it("percentage_flex_basis_main_min_width", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -650,8 +628,6 @@ it("percentage_flex_basis_main_min_width", function () {
|
||||
it("percentage_flex_basis_cross_min_width", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(200);
|
||||
@@ -712,8 +688,6 @@ it("percentage_flex_basis_cross_min_width", function () {
|
||||
it("percentage_multiple_nested_with_padding_margin_and_percentage_values", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(200);
|
||||
@@ -826,8 +800,6 @@ it("percentage_multiple_nested_with_padding_margin_and_percentage_values", funct
|
||||
it("percentage_margin_should_calculate_based_only_on_width", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(200);
|
||||
@@ -889,8 +861,6 @@ it("percentage_margin_should_calculate_based_only_on_width", function () {
|
||||
it("percentage_padding_should_calculate_based_only_on_width", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(200);
|
||||
@@ -952,8 +922,6 @@ it("percentage_padding_should_calculate_based_only_on_width", function () {
|
||||
it("percentage_absolute_position", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(200);
|
||||
|
@@ -14,8 +14,6 @@ var Yoga = Yoga || require("../../sources/entry-" + process.env.TEST_ENTRY);
|
||||
it("rounding_flex_basis_flex_grow_row_width_of_100", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -87,8 +85,6 @@ it("rounding_flex_basis_flex_grow_row_width_of_100", function () {
|
||||
it("rounding_flex_basis_flex_grow_row_prime_number_width", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -188,8 +184,6 @@ it("rounding_flex_basis_flex_grow_row_prime_number_width", function () {
|
||||
it("rounding_flex_basis_flex_shrink_row", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -262,8 +256,6 @@ it("rounding_flex_basis_flex_shrink_row", function () {
|
||||
it("rounding_flex_basis_overrides_main_size", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(100);
|
||||
@@ -338,8 +330,6 @@ it("rounding_flex_basis_overrides_main_size", function () {
|
||||
it("rounding_total_fractial", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(87.4);
|
||||
@@ -414,8 +404,6 @@ it("rounding_total_fractial", function () {
|
||||
it("rounding_total_fractial_nested", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(87.4);
|
||||
@@ -524,8 +512,6 @@ it("rounding_total_fractial_nested", function () {
|
||||
it("rounding_fractial_input_1", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(100);
|
||||
@@ -600,8 +586,6 @@ it("rounding_fractial_input_1", function () {
|
||||
it("rounding_fractial_input_2", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setWidth(100);
|
||||
@@ -676,8 +660,6 @@ it("rounding_fractial_input_2", function () {
|
||||
it("rounding_fractial_input_3", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setPosition(Yoga.EDGE_TOP, 0.3);
|
||||
@@ -753,8 +735,6 @@ it("rounding_fractial_input_3", function () {
|
||||
it("rounding_fractial_input_4", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setPosition(Yoga.EDGE_TOP, 0.7);
|
||||
@@ -830,8 +810,6 @@ it("rounding_fractial_input_4", function () {
|
||||
it("rounding_inner_node_controversy_horizontal", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
@@ -920,8 +898,6 @@ it("rounding_inner_node_controversy_horizontal", function () {
|
||||
it("rounding_inner_node_controversy_vertical", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setHeight(320);
|
||||
@@ -1009,8 +985,6 @@ it("rounding_inner_node_controversy_vertical", function () {
|
||||
it("rounding_inner_node_controversy_combined", function () {
|
||||
var config = Yoga.Config.create();
|
||||
|
||||
config.setExperimentalFeatureEnabled(Yoga.EXPERIMENTAL_FEATURE_ROUNDING, true);
|
||||
|
||||
try {
|
||||
var root = Yoga.Node.create(config);
|
||||
root.setFlexDirection(Yoga.FLEX_DIRECTION_ROW);
|
||||
|
Reference in New Issue
Block a user