From d14487bc335810148f40d2aa3feeb7d8972b973c Mon Sep 17 00:00:00 2001 From: Joe Vilches Date: Tue, 28 Nov 2023 16:53:58 -0800 Subject: [PATCH] Make position static behave like position static Summary: X-link: https://github.com/facebook/react-native/pull/41685 This is the final step (that I know of) to get the core features of static working. Here we turn on all of the tests and pass down the correct owner size for the call to `calculateLayoutInternal` that is in `layoutAbsoluteChild` Reviewed By: NickGerleman Differential Revision: D51293606 fbshipit-source-id: 9e88116761406f9300c9bd260cd7662b9b25ab5f --- gentest/fixtures/YGStaticPositionTest.html | 68 +++++++++---------- .../facebook/yoga/YGStaticPositionTest.java | 34 ---------- .../generated/YGStaticPositionTest.test.ts | 68 +++++++++---------- tests/generated/YGStaticPositionTest.cpp | 68 ------------------- yoga/algorithm/AbsoluteLayout.cpp | 8 +-- 5 files changed, 72 insertions(+), 174 deletions(-) diff --git a/gentest/fixtures/YGStaticPositionTest.html b/gentest/fixtures/YGStaticPositionTest.html index 30b781172b..3cb5e55599 100644 --- a/gentest/fixtures/YGStaticPositionTest.html +++ b/gentest/fixtures/YGStaticPositionTest.html @@ -10,7 +10,7 @@ -
+
@@ -19,7 +19,7 @@
-
+
@@ -34,7 +34,7 @@
-
+
@@ -43,7 +43,7 @@
-
+
@@ -52,7 +52,7 @@
-
+
@@ -61,7 +61,7 @@
-
+
@@ -70,7 +70,7 @@
-
+
@@ -79,7 +79,7 @@
-
+
@@ -88,7 +88,7 @@
-
+
@@ -97,7 +97,7 @@
-
+
@@ -106,7 +106,7 @@
-
+
@@ -115,7 +115,7 @@
-
+
@@ -124,7 +124,7 @@
-
+
@@ -133,7 +133,7 @@
-
+
@@ -142,7 +142,7 @@
-
+
@@ -151,7 +151,7 @@
-
+
@@ -160,7 +160,7 @@
-
+
@@ -169,7 +169,7 @@
-
+
@@ -178,7 +178,7 @@
-
+
@@ -187,7 +187,7 @@
-
+
@@ -196,7 +196,7 @@
-
+
@@ -205,7 +205,7 @@
-
+
@@ -214,7 +214,7 @@
-
+
@@ -223,7 +223,7 @@
-
+
@@ -232,7 +232,7 @@
-
+
@@ -241,7 +241,7 @@
-
+
@@ -250,7 +250,7 @@
-
+
@@ -259,7 +259,7 @@
-
+
@@ -268,7 +268,7 @@
-
+
@@ -277,7 +277,7 @@
-
+
@@ -286,7 +286,7 @@
-
+
@@ -295,7 +295,7 @@
-
+
@@ -311,14 +311,14 @@
-
+
-
+
diff --git a/java/tests/com/facebook/yoga/YGStaticPositionTest.java b/java/tests/com/facebook/yoga/YGStaticPositionTest.java index 4b9635f973..1bd64b5940 100644 --- a/java/tests/com/facebook/yoga/YGStaticPositionTest.java +++ b/java/tests/com/facebook/yoga/YGStaticPositionTest.java @@ -108,7 +108,6 @@ public void test_static_position_insets_have_no_effect_right_bottom() { } @Test - @Ignore public void test_static_position_absolute_child_insets_relative_to_positioned_ancestor() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -183,7 +182,6 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an } @Test - @Ignore public void test_static_position_absolute_child_insets_relative_to_positioned_ancestor_deep() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -306,7 +304,6 @@ public void test_static_position_absolute_child_insets_relative_to_positioned_an } @Test - @Ignore public void test_static_position_absolute_child_width_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -378,7 +375,6 @@ public void test_static_position_absolute_child_width_percentage() { } @Test - @Ignore public void test_static_position_relative_child_width_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -450,7 +446,6 @@ public void test_static_position_relative_child_width_percentage() { } @Test - @Ignore public void test_static_position_static_child_width_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -521,7 +516,6 @@ public void test_static_position_static_child_width_percentage() { } @Test - @Ignore public void test_static_position_absolute_child_height_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -593,7 +587,6 @@ public void test_static_position_absolute_child_height_percentage() { } @Test - @Ignore public void test_static_position_relative_child_height_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -665,7 +658,6 @@ public void test_static_position_relative_child_height_percentage() { } @Test - @Ignore public void test_static_position_static_child_height_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -736,7 +728,6 @@ public void test_static_position_static_child_height_percentage() { } @Test - @Ignore public void test_static_position_absolute_child_left_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -809,7 +800,6 @@ public void test_static_position_absolute_child_left_percentage() { } @Test - @Ignore public void test_static_position_relative_child_left_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -882,7 +872,6 @@ public void test_static_position_relative_child_left_percentage() { } @Test - @Ignore public void test_static_position_static_child_left_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -954,7 +943,6 @@ public void test_static_position_static_child_left_percentage() { } @Test - @Ignore public void test_static_position_absolute_child_right_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1027,7 +1015,6 @@ public void test_static_position_absolute_child_right_percentage() { } @Test - @Ignore public void test_static_position_relative_child_right_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1100,7 +1087,6 @@ public void test_static_position_relative_child_right_percentage() { } @Test - @Ignore public void test_static_position_static_child_right_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1172,7 +1158,6 @@ public void test_static_position_static_child_right_percentage() { } @Test - @Ignore public void test_static_position_absolute_child_top_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1245,7 +1230,6 @@ public void test_static_position_absolute_child_top_percentage() { } @Test - @Ignore public void test_static_position_relative_child_top_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1318,7 +1302,6 @@ public void test_static_position_relative_child_top_percentage() { } @Test - @Ignore public void test_static_position_static_child_top_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1390,7 +1373,6 @@ public void test_static_position_static_child_top_percentage() { } @Test - @Ignore public void test_static_position_absolute_child_bottom_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1463,7 +1445,6 @@ public void test_static_position_absolute_child_bottom_percentage() { } @Test - @Ignore public void test_static_position_relative_child_bottom_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1536,7 +1517,6 @@ public void test_static_position_relative_child_bottom_percentage() { } @Test - @Ignore public void test_static_position_static_child_bottom_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1608,7 +1588,6 @@ public void test_static_position_static_child_bottom_percentage() { } @Test - @Ignore public void test_static_position_absolute_child_margin_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1684,7 +1663,6 @@ public void test_static_position_absolute_child_margin_percentage() { } @Test - @Ignore public void test_static_position_relative_child_margin_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1760,7 +1738,6 @@ public void test_static_position_relative_child_margin_percentage() { } @Test - @Ignore public void test_static_position_static_child_margin_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1835,7 +1812,6 @@ public void test_static_position_static_child_margin_percentage() { } @Test - @Ignore public void test_static_position_absolute_child_padding_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1911,7 +1887,6 @@ public void test_static_position_absolute_child_padding_percentage() { } @Test - @Ignore public void test_static_position_relative_child_padding_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -1987,7 +1962,6 @@ public void test_static_position_relative_child_padding_percentage() { } @Test - @Ignore public void test_static_position_static_child_padding_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -2062,7 +2036,6 @@ public void test_static_position_static_child_padding_percentage() { } @Test - @Ignore public void test_static_position_absolute_child_border_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -2134,7 +2107,6 @@ public void test_static_position_absolute_child_border_percentage() { } @Test - @Ignore public void test_static_position_relative_child_border_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -2206,7 +2178,6 @@ public void test_static_position_relative_child_border_percentage() { } @Test - @Ignore public void test_static_position_static_child_border_percentage() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -2277,7 +2248,6 @@ public void test_static_position_static_child_border_percentage() { } @Test - @Ignore public void test_static_position_absolute_child_containing_block_padding_box() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -2353,7 +2323,6 @@ public void test_static_position_absolute_child_containing_block_padding_box() { } @Test - @Ignore public void test_static_position_relative_child_containing_block_padding_box() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -2429,7 +2398,6 @@ public void test_static_position_relative_child_containing_block_padding_box() { } @Test - @Ignore public void test_static_position_static_child_containing_block_padding_box() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -2565,7 +2533,6 @@ public void test_static_position_absolute_child_containing_block_content_box() { } @Test - @Ignore public void test_static_position_relative_child_containing_block_content_box() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); @@ -2626,7 +2593,6 @@ public void test_static_position_relative_child_containing_block_content_box() { } @Test - @Ignore public void test_static_position_static_child_containing_block_content_box() { YogaConfig config = YogaConfigFactory.create(); config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true); diff --git a/javascript/tests/generated/YGStaticPositionTest.test.ts b/javascript/tests/generated/YGStaticPositionTest.test.ts index c3628fc8f1..c130ef9b6e 100644 --- a/javascript/tests/generated/YGStaticPositionTest.test.ts +++ b/javascript/tests/generated/YGStaticPositionTest.test.ts @@ -119,7 +119,7 @@ test('static_position_insets_have_no_effect_right_bottom', () => { config.free(); } }); -test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor', () => { +test('static_position_absolute_child_insets_relative_to_positioned_ancestor', () => { const config = Yoga.Config.create(); let root; @@ -199,7 +199,7 @@ test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor config.free(); } }); -test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor_deep', () => { +test('static_position_absolute_child_insets_relative_to_positioned_ancestor_deep', () => { const config = Yoga.Config.create(); let root; @@ -327,7 +327,7 @@ test.skip('static_position_absolute_child_insets_relative_to_positioned_ancestor config.free(); } }); -test.skip('static_position_absolute_child_width_percentage', () => { +test('static_position_absolute_child_width_percentage', () => { const config = Yoga.Config.create(); let root; @@ -404,7 +404,7 @@ test.skip('static_position_absolute_child_width_percentage', () => { config.free(); } }); -test.skip('static_position_relative_child_width_percentage', () => { +test('static_position_relative_child_width_percentage', () => { const config = Yoga.Config.create(); let root; @@ -481,7 +481,7 @@ test.skip('static_position_relative_child_width_percentage', () => { config.free(); } }); -test.skip('static_position_static_child_width_percentage', () => { +test('static_position_static_child_width_percentage', () => { const config = Yoga.Config.create(); let root; @@ -557,7 +557,7 @@ test.skip('static_position_static_child_width_percentage', () => { config.free(); } }); -test.skip('static_position_absolute_child_height_percentage', () => { +test('static_position_absolute_child_height_percentage', () => { const config = Yoga.Config.create(); let root; @@ -634,7 +634,7 @@ test.skip('static_position_absolute_child_height_percentage', () => { config.free(); } }); -test.skip('static_position_relative_child_height_percentage', () => { +test('static_position_relative_child_height_percentage', () => { const config = Yoga.Config.create(); let root; @@ -711,7 +711,7 @@ test.skip('static_position_relative_child_height_percentage', () => { config.free(); } }); -test.skip('static_position_static_child_height_percentage', () => { +test('static_position_static_child_height_percentage', () => { const config = Yoga.Config.create(); let root; @@ -787,7 +787,7 @@ test.skip('static_position_static_child_height_percentage', () => { config.free(); } }); -test.skip('static_position_absolute_child_left_percentage', () => { +test('static_position_absolute_child_left_percentage', () => { const config = Yoga.Config.create(); let root; @@ -865,7 +865,7 @@ test.skip('static_position_absolute_child_left_percentage', () => { config.free(); } }); -test.skip('static_position_relative_child_left_percentage', () => { +test('static_position_relative_child_left_percentage', () => { const config = Yoga.Config.create(); let root; @@ -943,7 +943,7 @@ test.skip('static_position_relative_child_left_percentage', () => { config.free(); } }); -test.skip('static_position_static_child_left_percentage', () => { +test('static_position_static_child_left_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1020,7 +1020,7 @@ test.skip('static_position_static_child_left_percentage', () => { config.free(); } }); -test.skip('static_position_absolute_child_right_percentage', () => { +test('static_position_absolute_child_right_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1098,7 +1098,7 @@ test.skip('static_position_absolute_child_right_percentage', () => { config.free(); } }); -test.skip('static_position_relative_child_right_percentage', () => { +test('static_position_relative_child_right_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1176,7 +1176,7 @@ test.skip('static_position_relative_child_right_percentage', () => { config.free(); } }); -test.skip('static_position_static_child_right_percentage', () => { +test('static_position_static_child_right_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1253,7 +1253,7 @@ test.skip('static_position_static_child_right_percentage', () => { config.free(); } }); -test.skip('static_position_absolute_child_top_percentage', () => { +test('static_position_absolute_child_top_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1331,7 +1331,7 @@ test.skip('static_position_absolute_child_top_percentage', () => { config.free(); } }); -test.skip('static_position_relative_child_top_percentage', () => { +test('static_position_relative_child_top_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1409,7 +1409,7 @@ test.skip('static_position_relative_child_top_percentage', () => { config.free(); } }); -test.skip('static_position_static_child_top_percentage', () => { +test('static_position_static_child_top_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1486,7 +1486,7 @@ test.skip('static_position_static_child_top_percentage', () => { config.free(); } }); -test.skip('static_position_absolute_child_bottom_percentage', () => { +test('static_position_absolute_child_bottom_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1564,7 +1564,7 @@ test.skip('static_position_absolute_child_bottom_percentage', () => { config.free(); } }); -test.skip('static_position_relative_child_bottom_percentage', () => { +test('static_position_relative_child_bottom_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1642,7 +1642,7 @@ test.skip('static_position_relative_child_bottom_percentage', () => { config.free(); } }); -test.skip('static_position_static_child_bottom_percentage', () => { +test('static_position_static_child_bottom_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1719,7 +1719,7 @@ test.skip('static_position_static_child_bottom_percentage', () => { config.free(); } }); -test.skip('static_position_absolute_child_margin_percentage', () => { +test('static_position_absolute_child_margin_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1800,7 +1800,7 @@ test.skip('static_position_absolute_child_margin_percentage', () => { config.free(); } }); -test.skip('static_position_relative_child_margin_percentage', () => { +test('static_position_relative_child_margin_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1881,7 +1881,7 @@ test.skip('static_position_relative_child_margin_percentage', () => { config.free(); } }); -test.skip('static_position_static_child_margin_percentage', () => { +test('static_position_static_child_margin_percentage', () => { const config = Yoga.Config.create(); let root; @@ -1961,7 +1961,7 @@ test.skip('static_position_static_child_margin_percentage', () => { config.free(); } }); -test.skip('static_position_absolute_child_padding_percentage', () => { +test('static_position_absolute_child_padding_percentage', () => { const config = Yoga.Config.create(); let root; @@ -2042,7 +2042,7 @@ test.skip('static_position_absolute_child_padding_percentage', () => { config.free(); } }); -test.skip('static_position_relative_child_padding_percentage', () => { +test('static_position_relative_child_padding_percentage', () => { const config = Yoga.Config.create(); let root; @@ -2123,7 +2123,7 @@ test.skip('static_position_relative_child_padding_percentage', () => { config.free(); } }); -test.skip('static_position_static_child_padding_percentage', () => { +test('static_position_static_child_padding_percentage', () => { const config = Yoga.Config.create(); let root; @@ -2203,7 +2203,7 @@ test.skip('static_position_static_child_padding_percentage', () => { config.free(); } }); -test.skip('static_position_absolute_child_border_percentage', () => { +test('static_position_absolute_child_border_percentage', () => { const config = Yoga.Config.create(); let root; @@ -2280,7 +2280,7 @@ test.skip('static_position_absolute_child_border_percentage', () => { config.free(); } }); -test.skip('static_position_relative_child_border_percentage', () => { +test('static_position_relative_child_border_percentage', () => { const config = Yoga.Config.create(); let root; @@ -2357,7 +2357,7 @@ test.skip('static_position_relative_child_border_percentage', () => { config.free(); } }); -test.skip('static_position_static_child_border_percentage', () => { +test('static_position_static_child_border_percentage', () => { const config = Yoga.Config.create(); let root; @@ -2433,7 +2433,7 @@ test.skip('static_position_static_child_border_percentage', () => { config.free(); } }); -test.skip('static_position_absolute_child_containing_block_padding_box', () => { +test('static_position_absolute_child_containing_block_padding_box', () => { const config = Yoga.Config.create(); let root; @@ -2514,7 +2514,7 @@ test.skip('static_position_absolute_child_containing_block_padding_box', () => { config.free(); } }); -test.skip('static_position_relative_child_containing_block_padding_box', () => { +test('static_position_relative_child_containing_block_padding_box', () => { const config = Yoga.Config.create(); let root; @@ -2595,7 +2595,7 @@ test.skip('static_position_relative_child_containing_block_padding_box', () => { config.free(); } }); -test.skip('static_position_static_child_containing_block_padding_box', () => { +test('static_position_static_child_containing_block_padding_box', () => { const config = Yoga.Config.create(); let root; @@ -2741,7 +2741,7 @@ test.skip('static_position_absolute_child_containing_block_content_box', () => { config.free(); } }); -test.skip('static_position_relative_child_containing_block_content_box', () => { +test('static_position_relative_child_containing_block_content_box', () => { const config = Yoga.Config.create(); let root; @@ -2807,7 +2807,7 @@ test.skip('static_position_relative_child_containing_block_content_box', () => { config.free(); } }); -test.skip('static_position_static_child_containing_block_content_box', () => { +test('static_position_static_child_containing_block_content_box', () => { const config = Yoga.Config.create(); let root; diff --git a/tests/generated/YGStaticPositionTest.cpp b/tests/generated/YGStaticPositionTest.cpp index 3bdade9f47..c28ccfe390 100644 --- a/tests/generated/YGStaticPositionTest.cpp +++ b/tests/generated/YGStaticPositionTest.cpp @@ -96,8 +96,6 @@ TEST(YogaTest, static_position_insets_have_no_effect_right_bottom) { } TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ancestor) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -173,8 +171,6 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance } TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ancestor_deep) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -298,8 +294,6 @@ TEST(YogaTest, static_position_absolute_child_insets_relative_to_positioned_ance } TEST(YogaTest, static_position_absolute_child_width_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -372,8 +366,6 @@ TEST(YogaTest, static_position_absolute_child_width_percentage) { } TEST(YogaTest, static_position_relative_child_width_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -446,8 +438,6 @@ TEST(YogaTest, static_position_relative_child_width_percentage) { } TEST(YogaTest, static_position_static_child_width_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -519,8 +509,6 @@ TEST(YogaTest, static_position_static_child_width_percentage) { } TEST(YogaTest, static_position_absolute_child_height_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -593,8 +581,6 @@ TEST(YogaTest, static_position_absolute_child_height_percentage) { } TEST(YogaTest, static_position_relative_child_height_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -667,8 +653,6 @@ TEST(YogaTest, static_position_relative_child_height_percentage) { } TEST(YogaTest, static_position_static_child_height_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -740,8 +724,6 @@ TEST(YogaTest, static_position_static_child_height_percentage) { } TEST(YogaTest, static_position_absolute_child_left_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -815,8 +797,6 @@ TEST(YogaTest, static_position_absolute_child_left_percentage) { } TEST(YogaTest, static_position_relative_child_left_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -890,8 +870,6 @@ TEST(YogaTest, static_position_relative_child_left_percentage) { } TEST(YogaTest, static_position_static_child_left_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -964,8 +942,6 @@ TEST(YogaTest, static_position_static_child_left_percentage) { } TEST(YogaTest, static_position_absolute_child_right_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1039,8 +1015,6 @@ TEST(YogaTest, static_position_absolute_child_right_percentage) { } TEST(YogaTest, static_position_relative_child_right_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1114,8 +1088,6 @@ TEST(YogaTest, static_position_relative_child_right_percentage) { } TEST(YogaTest, static_position_static_child_right_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1188,8 +1160,6 @@ TEST(YogaTest, static_position_static_child_right_percentage) { } TEST(YogaTest, static_position_absolute_child_top_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1263,8 +1233,6 @@ TEST(YogaTest, static_position_absolute_child_top_percentage) { } TEST(YogaTest, static_position_relative_child_top_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1338,8 +1306,6 @@ TEST(YogaTest, static_position_relative_child_top_percentage) { } TEST(YogaTest, static_position_static_child_top_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1412,8 +1378,6 @@ TEST(YogaTest, static_position_static_child_top_percentage) { } TEST(YogaTest, static_position_absolute_child_bottom_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1487,8 +1451,6 @@ TEST(YogaTest, static_position_absolute_child_bottom_percentage) { } TEST(YogaTest, static_position_relative_child_bottom_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1562,8 +1524,6 @@ TEST(YogaTest, static_position_relative_child_bottom_percentage) { } TEST(YogaTest, static_position_static_child_bottom_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1636,8 +1596,6 @@ TEST(YogaTest, static_position_static_child_bottom_percentage) { } TEST(YogaTest, static_position_absolute_child_margin_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1714,8 +1672,6 @@ TEST(YogaTest, static_position_absolute_child_margin_percentage) { } TEST(YogaTest, static_position_relative_child_margin_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1792,8 +1748,6 @@ TEST(YogaTest, static_position_relative_child_margin_percentage) { } TEST(YogaTest, static_position_static_child_margin_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1869,8 +1823,6 @@ TEST(YogaTest, static_position_static_child_margin_percentage) { } TEST(YogaTest, static_position_absolute_child_padding_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -1947,8 +1899,6 @@ TEST(YogaTest, static_position_absolute_child_padding_percentage) { } TEST(YogaTest, static_position_relative_child_padding_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -2025,8 +1975,6 @@ TEST(YogaTest, static_position_relative_child_padding_percentage) { } TEST(YogaTest, static_position_static_child_padding_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -2102,8 +2050,6 @@ TEST(YogaTest, static_position_static_child_padding_percentage) { } TEST(YogaTest, static_position_absolute_child_border_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -2176,8 +2122,6 @@ TEST(YogaTest, static_position_absolute_child_border_percentage) { } TEST(YogaTest, static_position_relative_child_border_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -2250,8 +2194,6 @@ TEST(YogaTest, static_position_relative_child_border_percentage) { } TEST(YogaTest, static_position_static_child_border_percentage) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -2323,8 +2265,6 @@ TEST(YogaTest, static_position_static_child_border_percentage) { } TEST(YogaTest, static_position_absolute_child_containing_block_padding_box) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -2401,8 +2341,6 @@ TEST(YogaTest, static_position_absolute_child_containing_block_padding_box) { } TEST(YogaTest, static_position_relative_child_containing_block_padding_box) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -2479,8 +2417,6 @@ TEST(YogaTest, static_position_relative_child_containing_block_padding_box) { } TEST(YogaTest, static_position_static_child_containing_block_padding_box) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -2619,8 +2555,6 @@ TEST(YogaTest, static_position_absolute_child_containing_block_content_box) { } TEST(YogaTest, static_position_relative_child_containing_block_content_box) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); @@ -2682,8 +2616,6 @@ TEST(YogaTest, static_position_relative_child_containing_block_content_box) { } TEST(YogaTest, static_position_static_child_containing_block_content_box) { - GTEST_SKIP(); - const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); diff --git a/yoga/algorithm/AbsoluteLayout.cpp b/yoga/algorithm/AbsoluteLayout.cpp index a12db1d120..6e595e61e0 100644 --- a/yoga/algorithm/AbsoluteLayout.cpp +++ b/yoga/algorithm/AbsoluteLayout.cpp @@ -388,8 +388,8 @@ void layoutAbsoluteChild( direction, childWidthSizingMode, childHeightSizingMode, - childWidth, - childHeight, + containingBlockWidth, + containingBlockHeight, false, LayoutPassReason::kAbsMeasureChild, layoutMarkerData, @@ -408,8 +408,8 @@ void layoutAbsoluteChild( direction, SizingMode::StretchFit, SizingMode::StretchFit, - childWidth, - childHeight, + containingBlockWidth, + containingBlockHeight, true, LayoutPassReason::kAbsLayout, layoutMarkerData,