Import "Fix percent absolute position and size calcuate different with web" behind experimental feature (#1028) (#1201)
Summary: Fixes https://github.com/facebook/yoga/issues/850 https://github.com/facebook/yoga/issues/850 describes a conformance issue where positioning of an absolute child using percentages is not calculated against the correct box size. This takes the fix for that in https://github.com/facebook/yoga/pull/1028, regenerates tests, and fixes tests so that the experimental feature can be enabled. Goal is to run this as an experiment internally to see if we can enable by default. Changelog: [Internal] Pull Request resolved: https://github.com/facebook/yoga/pull/1201 Reviewed By: yungsters Differential Revision: D42282358 Pulled By: NickGerleman fbshipit-source-id: 57c0dd9b0f1c47cb9335ff6e13d44b4646e5fa58
This commit is contained in:
committed by
Facebook GitHub Bot
parent
627255c0e4
commit
7e96b65790
@@ -19,6 +19,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_row_flex_start()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -87,6 +89,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_row_flex_end()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -156,6 +160,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_row_center()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -225,6 +231,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_row_space_between()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -294,6 +302,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_row_space_around()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -363,6 +373,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_column_flex_start()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.Width = 102;
|
||||
@@ -430,6 +442,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_column_flex_end()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.FlexEnd;
|
||||
@@ -498,6 +512,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_column_center()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.Center;
|
||||
@@ -566,6 +582,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_column_space_between()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.SpaceBetween;
|
||||
@@ -634,6 +652,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_column_space_around()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.SpaceAround;
|
||||
@@ -702,6 +722,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_row_min_width_and_margin()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -744,6 +766,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_row_max_width_and_margin()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -787,6 +811,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_column_min_height_and_margin()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.Center;
|
||||
@@ -828,6 +854,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_colunn_max_height_and_margin()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.Center;
|
||||
@@ -870,6 +898,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_column_space_evenly()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.JustifyContent = YogaJustify.SpaceEvenly;
|
||||
@@ -938,6 +968,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_row_space_evenly()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -1007,6 +1039,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_min_width_with_padding_child_width_greater_than_parent()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.AlignContent = YogaAlign.Stretch;
|
||||
@@ -1084,6 +1118,8 @@ namespace Facebook.Yoga
|
||||
public void Test_justify_content_min_width_with_padding_child_width_lower_than_parent()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.AlignContent = YogaAlign.Stretch;
|
||||
|
Reference in New Issue
Block a user