Incorrect width of children when using align baseline and child in row as reference #1358
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Report
Issues and Steps to Reproduce
In the following test:
31b6c0ddc9/tests/YGAlignBaselineTest.cpp (L418)
The expected
left
position ofroot_child1_child1
is 500px while it should be 250px:31b6c0ddc9/tests/YGAlignBaselineTest.cpp (L453-L454)
Because its parent's (
root_child1
) width is 500px withflexDirection: row
and 2 children of width500px
each:31b6c0ddc9/tests/YGAlignBaselineTest.cpp (L428-L437)
Since the parent's width is only 500px, both children can only take 250px to remain within the bounds of the parent element. This is exactly how Firefox & Chrome layout this combination in this HTML:
Note: you'll have to use the DevTools to find the width of
root_child1_child0
androot_child1_child1
but it is 250px each.Expected Behavior
The width of
root_child1_child0
androot_child1_child1
should be 250px each.Actual Behavior
The width of
root_child1_child0
androot_child1_child1
is 500px each and overflows the parent.Link to Code
Here's a fiddle: https://jsfiddle.net/0pLaox48/
hi, can I work on this?
Yes please feel free to debug the logic in "CalculateLayout.cpp" for laying out a box with baseline alignment.