Fix bugs around align-content
Summary: @public Regenerating the “golden master” tests with chrome surfaced different bugs around `align-content`: - a misunderstanding that values in `align-content` only applied *if there is only one line.* In fact, it applies *every time* a container is set to `flex-wrap: wrap`. Chrome had this wrong, and as such our tests were generated with incorrect parameters. - empty children growing to the cross axis size of the container, even when `align-content` is different from `stretch`. This was implemented incorrectly in Chrome as well. Here, we fix it with an extra check. Reviewed By: SidharthGuglani Differential Revision: D14725402 fbshipit-source-id: a45bebdadb9c694dc0eb7e27cb52b3d247f81c50
This commit is contained in:
committed by
Facebook Github Bot
parent
3d8afa9e90
commit
bc7e504b29
@@ -529,12 +529,12 @@ namespace Facebook.Yoga
|
||||
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
||||
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(50f, root_child1.LayoutX);
|
||||
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(100f, root_child1.LayoutHeight);
|
||||
Assert.AreEqual(0f, root_child1.LayoutHeight);
|
||||
|
||||
root.StyleDirection = YogaDirection.RTL;
|
||||
root.CalculateLayout();
|
||||
@@ -547,12 +547,12 @@ namespace Facebook.Yoga
|
||||
Assert.AreEqual(100f, root_child0.LayoutX);
|
||||
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||
Assert.AreEqual(50f, root_child0.LayoutWidth);
|
||||
Assert.AreEqual(100f, root_child0.LayoutHeight);
|
||||
Assert.AreEqual(0f, root_child0.LayoutHeight);
|
||||
|
||||
Assert.AreEqual(50f, root_child1.LayoutX);
|
||||
Assert.AreEqual(0f, root_child1.LayoutY);
|
||||
Assert.AreEqual(50f, root_child1.LayoutWidth);
|
||||
Assert.AreEqual(100f, root_child1.LayoutHeight);
|
||||
Assert.AreEqual(0f, root_child1.LayoutHeight);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Reference in New Issue
Block a user