Revert D5874862: [yoga][PR] Fix shrinking in non strech alignments
Summary: This reverts commit 1426aa6b60f6ba42c2be702e6f24cea935ab7acb bypass-lint Differential Revision: D5874862 fbshipit-source-id: 24517d26b18c11fb9f75c6d3b5faae360711ea9e
This commit is contained in:
committed by
Facebook Github Bot
parent
a77aa9a41e
commit
3a0a86788e
@@ -1932,72 +1932,4 @@ public class YGAlignItemsTest {
|
||||
assertEquals(20f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_align_flex_start_with_shrinkin_children() {
|
||||
YogaConfig config = new YogaConfig();
|
||||
|
||||
final YogaNode root = new YogaNode(config);
|
||||
root.setWidth(500f);
|
||||
root.setHeight(500f);
|
||||
|
||||
final YogaNode root_child0 = new YogaNode(config);
|
||||
root_child0.setAlignItems(YogaAlign.FLEX_START);
|
||||
root.addChildAt(root_child0, 0);
|
||||
|
||||
final YogaNode root_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0.setFlexShrink(1f);
|
||||
root_child0.addChildAt(root_child0_child0, 0);
|
||||
|
||||
final YogaNode root_child0_child0_child0 = new YogaNode(config);
|
||||
root_child0_child0_child0.setFlexGrow(1f);
|
||||
root_child0_child0_child0.setFlexShrink(1f);
|
||||
root_child0_child0.addChildAt(root_child0_child0_child0, 0);
|
||||
root.setDirection(YogaDirection.LTR);
|
||||
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
assertEquals(500f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(500f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(500f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
root.setDirection(YogaDirection.RTL);
|
||||
root.calculateLayout(YogaConstants.UNDEFINED, YogaConstants.UNDEFINED);
|
||||
|
||||
assertEquals(0f, root.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root.getLayoutY(), 0.0f);
|
||||
assertEquals(500f, root.getLayoutWidth(), 0.0f);
|
||||
assertEquals(500f, root.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(500f, root_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(500f, root_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0.getLayoutHeight(), 0.0f);
|
||||
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutX(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutY(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutWidth(), 0.0f);
|
||||
assertEquals(0f, root_child0_child0_child0.getLayoutHeight(), 0.0f);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user