Skip to content

Commit

Permalink
Remove YGExperimentalFeatureFixAbsoluteTrailingColumnMargin (#1317)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1317

X-link: facebook/react-native#37374

This is edge-casey enough, and I actually broke this in D42282358 without us noticing (I changed height to width of the bottom usage, instead, copy/pasting the value of the top one).

Reviewed By: yungsters

Differential Revision: D45766764

fbshipit-source-id: b600b79b8436534fe48ef2acbfde8ba64068e593
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Jun 29, 2023
1 parent 5060279 commit 0aec0a1
Show file tree
Hide file tree
Showing 64 changed files with 5 additions and 825 deletions.
2 changes: 0 additions & 2 deletions enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
"WebFlexBasis",
# Conformance fix: https://github.com/facebook/yoga/pull/1028
"AbsolutePercentageAgainstPaddingEdge",
# Conformance fix: https://github.com/facebook/yoga/pull/1028
"FixAbsoluteTrailingColumnMargin",
# fix JNI local ref overflows
"FixJNILocalRefOverflows",
],
Expand Down
1 change: 0 additions & 1 deletion gentest/gentest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

const DEFAULT_EXPERIMENTS = [
'AbsolutePercentageAgainstPaddingEdge',
'FixAbsoluteTrailingColumnMargin',
];

window.onload = function() {
Expand Down
6 changes: 2 additions & 4 deletions java/com/facebook/yoga/YogaExperimentalFeature.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
public enum YogaExperimentalFeature {
WEB_FLEX_BASIS(0),
ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE(1),
FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN(2),
FIX_JNILOCAL_REF_OVERFLOWS(3);
FIX_JNILOCAL_REF_OVERFLOWS(2);

private final int mIntValue;

Expand All @@ -29,8 +28,7 @@ public static YogaExperimentalFeature fromInt(int value) {
switch (value) {
case 0: return WEB_FLEX_BASIS;
case 1: return ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE;
case 2: return FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN;
case 3: return FIX_JNILOCAL_REF_OVERFLOWS;
case 2: return FIX_JNILOCAL_REF_OVERFLOWS;
default: throw new IllegalArgumentException("Unknown enum value: " + value);
}
}
Expand Down
24 changes: 0 additions & 24 deletions java/tests/com/facebook/yoga/YGAbsolutePositionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ public static Iterable<TestParametrization.NodeFactory> nodeFactories() {
public void test_absolute_layout_width_height_start_top() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setWidth(100f);
Expand Down Expand Up @@ -73,7 +72,6 @@ public void test_absolute_layout_width_height_start_top() {
public void test_absolute_layout_width_height_end_bottom() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setWidth(100f);
Expand Down Expand Up @@ -117,7 +115,6 @@ public void test_absolute_layout_width_height_end_bottom() {
public void test_absolute_layout_start_top_end_bottom() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setWidth(100f);
Expand Down Expand Up @@ -161,7 +158,6 @@ public void test_absolute_layout_start_top_end_bottom() {
public void test_absolute_layout_width_height_start_top_end_bottom() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setWidth(100f);
Expand Down Expand Up @@ -207,7 +203,6 @@ public void test_absolute_layout_width_height_start_top_end_bottom() {
public void test_do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_hidden_parent() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setFlexDirection(YogaFlexDirection.ROW);
Expand Down Expand Up @@ -266,7 +261,6 @@ public void test_do_not_clamp_height_of_absolute_node_to_height_of_its_overflow_
public void test_absolute_layout_within_border() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setMargin(YogaEdge.LEFT, 10f);
Expand Down Expand Up @@ -384,7 +378,6 @@ public void test_absolute_layout_within_border() {
public void test_absolute_layout_align_items_and_justify_content_center() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setJustifyContent(YogaJustify.CENTER);
Expand Down Expand Up @@ -429,7 +422,6 @@ public void test_absolute_layout_align_items_and_justify_content_center() {
public void test_absolute_layout_align_items_and_justify_content_flex_end() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setJustifyContent(YogaJustify.FLEX_END);
Expand Down Expand Up @@ -474,7 +466,6 @@ public void test_absolute_layout_align_items_and_justify_content_flex_end() {
public void test_absolute_layout_justify_content_center() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setJustifyContent(YogaJustify.CENTER);
Expand Down Expand Up @@ -518,7 +509,6 @@ public void test_absolute_layout_justify_content_center() {
public void test_absolute_layout_align_items_center() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setAlignItems(YogaAlign.CENTER);
Expand Down Expand Up @@ -562,7 +552,6 @@ public void test_absolute_layout_align_items_center() {
public void test_absolute_layout_align_items_center_on_child_only() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setFlexGrow(1f);
Expand Down Expand Up @@ -606,7 +595,6 @@ public void test_absolute_layout_align_items_center_on_child_only() {
public void test_absolute_layout_align_items_and_justify_content_center_and_top_position() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setJustifyContent(YogaJustify.CENTER);
Expand Down Expand Up @@ -652,7 +640,6 @@ public void test_absolute_layout_align_items_and_justify_content_center_and_top_
public void test_absolute_layout_align_items_and_justify_content_center_and_bottom_position() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setJustifyContent(YogaJustify.CENTER);
Expand Down Expand Up @@ -698,7 +685,6 @@ public void test_absolute_layout_align_items_and_justify_content_center_and_bott
public void test_absolute_layout_align_items_and_justify_content_center_and_left_position() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setJustifyContent(YogaJustify.CENTER);
Expand Down Expand Up @@ -744,7 +730,6 @@ public void test_absolute_layout_align_items_and_justify_content_center_and_left
public void test_absolute_layout_align_items_and_justify_content_center_and_right_position() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setJustifyContent(YogaJustify.CENTER);
Expand Down Expand Up @@ -790,7 +775,6 @@ public void test_absolute_layout_align_items_and_justify_content_center_and_righ
public void test_position_root_with_rtl_should_position_withoutdirection() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setPosition(YogaEdge.LEFT, 72f);
Expand All @@ -817,7 +801,6 @@ public void test_position_root_with_rtl_should_position_withoutdirection() {
public void test_absolute_layout_percentage_bottom_based_on_parent_height() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setWidth(100f);
Expand Down Expand Up @@ -894,7 +877,6 @@ public void test_absolute_layout_percentage_bottom_based_on_parent_height() {
public void test_absolute_layout_in_wrap_reverse_column_container() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setWrap(YogaWrap.WRAP_REVERSE);
Expand Down Expand Up @@ -937,7 +919,6 @@ public void test_absolute_layout_in_wrap_reverse_column_container() {
public void test_absolute_layout_in_wrap_reverse_row_container() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setFlexDirection(YogaFlexDirection.ROW);
Expand Down Expand Up @@ -981,7 +962,6 @@ public void test_absolute_layout_in_wrap_reverse_row_container() {
public void test_absolute_layout_in_wrap_reverse_column_container_flex_end() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setWrap(YogaWrap.WRAP_REVERSE);
Expand Down Expand Up @@ -1025,7 +1005,6 @@ public void test_absolute_layout_in_wrap_reverse_column_container_flex_end() {
public void test_absolute_layout_in_wrap_reverse_row_container_flex_end() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setFlexDirection(YogaFlexDirection.ROW);
Expand Down Expand Up @@ -1070,7 +1049,6 @@ public void test_absolute_layout_in_wrap_reverse_row_container_flex_end() {
public void test_percent_absolute_position_infinite_height() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setWidth(300f);
Expand Down Expand Up @@ -1127,7 +1105,6 @@ public void test_percent_absolute_position_infinite_height() {
public void test_absolute_layout_percentage_height_based_on_padded_parent() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setPadding(YogaEdge.TOP, 10);
Expand Down Expand Up @@ -1171,7 +1148,6 @@ public void test_absolute_layout_percentage_height_based_on_padded_parent() {
public void test_absolute_layout_percentage_height_based_on_padded_parent_and_align_items_center() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE, true);
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN, true);

final YogaNode root = createNode(config);
root.setJustifyContent(YogaJustify.CENTER);
Expand Down
Loading

0 comments on commit 0aec0a1

Please sign in to comment.