Skip to content
Merged
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
3 changes: 0 additions & 3 deletions enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@
# Fix flex basis computation to not apply FitContent constraint in the
# main axis for non-measure container nodes
"FixFlexBasisFitContent",
# Measure a leaf's min-content height at the width it is given instead
# of asking for a height of at most zero
"MinContentHeightAtGivenWidth",
],
"Gutter": ["Column", "Row", "All"],
"GridTrackType": ["Auto", "Points", "Percent", "Fr", "Minmax"],
Expand Down
13 changes: 0 additions & 13 deletions gentest/fixtures/YGAutoMinSizeTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,12 @@
<!-- A min-content height is the height of the content at the box's width
(css-sizing-3 §2.1), so text in a column keeps the lines it wraps to. -->
<div id="auto_min_size_text_keeps_wrapped_lines" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 50px; height: 20px;">
<div style="flex-shrink: 1;">aaaa aaaa aaaa</div>
<div style="height: 10px;"></div>
</div>

<div id="auto_min_size_nested_text_keeps_wrapped_lines" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 50px; height: 20px;">
<div style="flex-shrink: 1;">
<div style="margin-bottom: 5px;">aaaa aaaa aaaa</div>
Expand All @@ -269,21 +267,18 @@
<!-- The text wraps at its own content width: the width it states, or the
container's less its margins, less its padding and border. -->
<div id="auto_min_size_text_wraps_inside_margin_and_padding" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 110px; height: 20px;">
<div style="flex-shrink: 1; margin: 0 10px; padding: 0 20px;">aaaa aaaa aaaa</div>
<div style="height: 10px;"></div>
</div>

<div id="auto_min_size_text_wraps_at_stated_width" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 110px; height: 20px;">
<div style="flex-shrink: 1; width: 50%; padding: 0 5px;">aaaa aaaa aaaa</div>
<div style="height: 10px;"></div>
</div>

<div id="auto_min_size_text_wraps_at_stated_content_box_width" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 200px; height: 20px;">
<div style="flex-shrink: 1; box-sizing: content-box; width: 90px; padding: 0 20px;">aaaa aaaa aaaa</div>
<div style="height: 15px;"></div>
Expand All @@ -292,7 +287,6 @@
<!-- The width of each box above the text counts, and the text's own minimum
and maximum. -->
<div id="auto_min_size_text_wraps_inside_padded_parent" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 110px; height: 20px;">
<div style="flex-shrink: 1; padding: 0 30px;">
<div>aaaa aaaa aaaa</div>
Expand All @@ -303,7 +297,6 @@
<!-- A percentage margin below the item resolves against the width of the box
around it: the item's content is 150 wide, so the margin is 15. -->
<div id="auto_min_size_percent_margin_resolves_against_parent_content_width" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 200px; height: 50px;">
<div style="flex-shrink: 1; padding-left: 50px;">
<div style="height: 10px; margin-top: 10%;"></div>
Expand All @@ -312,7 +305,6 @@
</div>

<div id="auto_min_size_text_fits_wider_parent" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 50px; height: 15px;">
<div style="flex-shrink: 1;">
<div style="width: 200px;">
Expand All @@ -323,22 +315,19 @@
</div>

<div id="auto_min_size_text_fits_min_width" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 50px; height: 15px;">
<div style="flex-shrink: 1; min-width: 200px;">aaaa aaaa aaaa</div>
<div style="height: 10px;"></div>
</div>

<div id="auto_min_size_text_wraps_at_max_width" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 200px; height: 20px;">
<div style="flex-shrink: 1; max-width: 50px;">aaaa aaaa aaaa</div>
<div style="height: 10px;"></div>
</div>

<!-- Below a row the width is unknown, but text still wraps at its max-width. -->
<div id="auto_min_size_text_below_row_wraps_at_max_width" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 200px; height: 20px;">
<div style="flex-shrink: 1; flex-direction: row;">
<div style="max-width: 50px;">aaaa aaaa aaaa</div>
Expand All @@ -349,7 +338,6 @@
<!-- A row's children can be wider than the row, so text below one is not
taken to wrap. -->
<div id="auto_min_size_text_below_row_is_not_wrapped" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 50px; height: 15px;">
<div style="flex-shrink: 1;">
<div style="flex-direction: row;">
Expand All @@ -365,7 +353,6 @@
<!-- A wrapping column's text still takes its height at the column's width,
though its line then stretches it wider. -->
<div id="auto_min_size_text_in_wrapping_column_keeps_wrapped_lines" data-errata="None"
data-experiments="MinContentHeightAtGivenWidth"
style="width: 50px; height: 15px;">
<div style="flex-shrink: 1; flex-wrap: wrap;">
<div>aaaa aaaa aaaa</div>
Expand Down
4 changes: 1 addition & 3 deletions java/com/facebook/yoga/YogaExperimentalFeature.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ package com.facebook.yoga

public enum class YogaExperimentalFeature(public val intValue: Int) {
WEB_FLEX_BASIS(0),
FIX_FLEX_BASIS_FIT_CONTENT(1),
MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH(2);
FIX_FLEX_BASIS_FIT_CONTENT(1);

public fun intValue(): Int = intValue

Expand All @@ -22,7 +21,6 @@ public enum class YogaExperimentalFeature(public val intValue: Int) {
when (value) {
0 -> WEB_FLEX_BASIS
1 -> FIX_FLEX_BASIS_FIT_CONTENT
2 -> MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH
else -> throw IllegalArgumentException("Unknown enum value: $value")
}
}
Expand Down
15 changes: 1 addition & 14 deletions java/tests/generated/com/facebook/yoga/YGAutoMinSizeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<21eb813d9af6d73d4e8f50df15963aa0>>
* @generated SignedSource<<965fc9a5d196883b28ce23727c268e24>>
* generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAutoMinSizeTest.html
*/

Expand Down Expand Up @@ -2070,7 +2070,6 @@ public void test_auto_min_size_wrapping_column_counts_all_children() {
@Test
public void test_auto_min_size_text_keeps_wrapped_lines() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2127,7 +2126,6 @@ public void test_auto_min_size_text_keeps_wrapped_lines() {
@Test
public void test_auto_min_size_nested_text_keeps_wrapped_lines() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2198,7 +2196,6 @@ public void test_auto_min_size_nested_text_keeps_wrapped_lines() {
@Test
public void test_auto_min_size_text_wraps_inside_margin_and_padding() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2259,7 +2256,6 @@ public void test_auto_min_size_text_wraps_inside_margin_and_padding() {
@Test
public void test_auto_min_size_text_wraps_at_stated_width() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2319,7 +2315,6 @@ public void test_auto_min_size_text_wraps_at_stated_width() {
@Test
public void test_auto_min_size_text_wraps_at_stated_content_box_width() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2380,7 +2375,6 @@ public void test_auto_min_size_text_wraps_at_stated_content_box_width() {
@Test
public void test_auto_min_size_text_wraps_inside_padded_parent() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2452,7 +2446,6 @@ public void test_auto_min_size_text_wraps_inside_padded_parent() {
@Test
public void test_auto_min_size_percent_margin_resolves_against_parent_content_width() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2523,7 +2516,6 @@ public void test_auto_min_size_percent_margin_resolves_against_parent_content_wi
@Test
public void test_auto_min_size_text_fits_wider_parent() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2607,7 +2599,6 @@ public void test_auto_min_size_text_fits_wider_parent() {
@Test
public void test_auto_min_size_text_fits_min_width() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2665,7 +2656,6 @@ public void test_auto_min_size_text_fits_min_width() {
@Test
public void test_auto_min_size_text_wraps_at_max_width() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2723,7 +2713,6 @@ public void test_auto_min_size_text_wraps_at_max_width() {
@Test
public void test_auto_min_size_text_below_row_wraps_at_max_width() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2795,7 +2784,6 @@ public void test_auto_min_size_text_below_row_wraps_at_max_width() {
@Test
public void test_auto_min_size_text_below_row_is_not_wrapped() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down Expand Up @@ -2906,7 +2894,6 @@ public void test_auto_min_size_text_below_row_is_not_wrapped() {
@Test
public void test_auto_min_size_text_in_wrapping_column_keeps_wrapped_lines() {
YogaConfig config = YogaConfigFactory.create();
config.setExperimentalFeatureEnabled(YogaExperimentalFeature.MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH, true);
config.setErrata(YogaErrata.NONE);

final YogaNode root = createNode(config);
Expand Down
2 changes: 0 additions & 2 deletions javascript/src/generated/YGEnums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export enum Errata {
export enum ExperimentalFeature {
WebFlexBasis = 0,
FixFlexBasisFitContent = 1,
MinContentHeightAtGivenWidth = 2,
}

export enum FlexDirection {
Expand Down Expand Up @@ -202,7 +201,6 @@ const constants = {
ERRATA_CLASSIC: Errata.Classic,
EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: ExperimentalFeature.WebFlexBasis,
EXPERIMENTAL_FEATURE_FIX_FLEX_BASIS_FIT_CONTENT: ExperimentalFeature.FixFlexBasisFitContent,
EXPERIMENTAL_FEATURE_MIN_CONTENT_HEIGHT_AT_GIVEN_WIDTH: ExperimentalFeature.MinContentHeightAtGivenWidth,
FLEX_DIRECTION_COLUMN: FlexDirection.Column,
FLEX_DIRECTION_COLUMN_REVERSE: FlexDirection.ColumnReverse,
FLEX_DIRECTION_ROW: FlexDirection.Row,
Expand Down
28 changes: 1 addition & 27 deletions javascript/tests/generated/YGAutoMinSizeTest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<020135c5d3f3b3a01d1136f77372bf2f>>
* @generated SignedSource<<5d267528d8e4a6067440bb0d80ab1d02>>
* generated by gentest/src/GentestDriver.ts from gentest/fixtures/YGAutoMinSizeTest.html
*/

Expand Down Expand Up @@ -1999,8 +1999,6 @@ test('auto_min_size_wrapping_column_counts_all_children', () => {
test('auto_min_size_text_keeps_wrapped_lines', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2053,8 +2051,6 @@ test('auto_min_size_text_keeps_wrapped_lines', () => {
test('auto_min_size_nested_text_keeps_wrapped_lines', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2121,8 +2117,6 @@ test('auto_min_size_nested_text_keeps_wrapped_lines', () => {
test('auto_min_size_text_wraps_inside_margin_and_padding', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2179,8 +2173,6 @@ test('auto_min_size_text_wraps_inside_margin_and_padding', () => {
test('auto_min_size_text_wraps_at_stated_width', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2236,8 +2228,6 @@ test('auto_min_size_text_wraps_at_stated_width', () => {
test('auto_min_size_text_wraps_at_stated_content_box_width', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2294,8 +2284,6 @@ test('auto_min_size_text_wraps_at_stated_content_box_width', () => {
test('auto_min_size_text_wraps_inside_padded_parent', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2363,8 +2351,6 @@ test('auto_min_size_text_wraps_inside_padded_parent', () => {
test('auto_min_size_percent_margin_resolves_against_parent_content_width', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2432,8 +2418,6 @@ test('auto_min_size_percent_margin_resolves_against_parent_content_width', () =>
test('auto_min_size_text_fits_wider_parent', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2513,8 +2497,6 @@ test('auto_min_size_text_fits_wider_parent', () => {
test('auto_min_size_text_fits_min_width', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2568,8 +2550,6 @@ test('auto_min_size_text_fits_min_width', () => {
test('auto_min_size_text_wraps_at_max_width', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2623,8 +2603,6 @@ test('auto_min_size_text_wraps_at_max_width', () => {
test('auto_min_size_text_below_row_wraps_at_max_width', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2692,8 +2670,6 @@ test('auto_min_size_text_below_row_wraps_at_max_width', () => {
test('auto_min_size_text_below_row_is_not_wrapped', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down Expand Up @@ -2800,8 +2776,6 @@ test('auto_min_size_text_below_row_is_not_wrapped', () => {
test('auto_min_size_text_in_wrapping_column_keeps_wrapped_lines', () => {
const config = Yoga.Config.create();

config.setExperimentalFeatureEnabled(ExperimentalFeature.MinContentHeightAtGivenWidth, true);

config.setErrata(Errata.None);

const root = Yoga.Node.create(config);
Expand Down
Loading
Loading