Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove YGExperimentalFeatureFixAbsoluteTrailingColumnMargin #1317

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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