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_flex_direction_column_no_height()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.Width = 100;
|
||||
@@ -85,6 +87,8 @@ namespace Facebook.Yoga
|
||||
public void Test_flex_direction_row_no_width()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -152,6 +156,8 @@ namespace Facebook.Yoga
|
||||
public void Test_flex_direction_column()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.Width = 100;
|
||||
@@ -219,6 +225,8 @@ namespace Facebook.Yoga
|
||||
public void Test_flex_direction_row()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
@@ -287,6 +295,8 @@ namespace Facebook.Yoga
|
||||
public void Test_flex_direction_column_reverse()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.ColumnReverse;
|
||||
@@ -355,6 +365,8 @@ namespace Facebook.Yoga
|
||||
public void Test_flex_direction_row_reverse()
|
||||
{
|
||||
YogaConfig config = new YogaConfig();
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.AbsolutePercentageAgainstPaddingEdge, true);
|
||||
config.SetExperimentalFeatureEnabled(YogaExperimentalFeature.FixAbsoluteTrailingColumnMargin, true);
|
||||
|
||||
YogaNode root = new YogaNode(config);
|
||||
root.FlexDirection = YogaFlexDirection.RowReverse;
|
||||
|
Reference in New Issue
Block a user