File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
float-pigment-layout/src/algo Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -886,6 +886,7 @@ impl<T: LayoutTreeNode> FlexBox<T> for LayoutUnit<T> {
886886 . map ( |child| {
887887 if child. final_align_self == AlignSelf :: Baseline {
888888 child. first_baseline_ascent . cross_axis ( dir)
889+ + child. margin . cross_axis_start ( dir, cross_dir_rev) . or_zero ( )
889890 } else {
890891 T :: Length :: zero ( )
891892 }
@@ -896,17 +897,17 @@ impl<T: LayoutTreeNode> FlexBox<T> for LayoutUnit<T> {
896897 . items
897898 . iter ( )
898899 . map ( |child| {
899- if child. final_align_self == AlignSelf :: Baseline
900- && child. margin . cross_axis_start ( dir, cross_dir_rev) . is_none ( )
901- && child. margin . cross_axis_end ( dir, cross_dir_rev) . is_none ( )
902- {
900+ dbg ! ( & child. first_baseline_ascent, & child. margin) ;
901+ if child. final_align_self == AlignSelf :: Baseline {
903902 max_baseline - child. first_baseline_ascent . cross_axis ( dir)
904903 + child. hypothetical_outer_size . cross_size ( dir)
904+ + child. margin . cross_axis_end ( dir, cross_dir_rev) . or_zero ( )
905905 } else {
906906 child. hypothetical_outer_size . cross_size ( dir)
907907 }
908908 } )
909909 . fold ( T :: Length :: zero ( ) , |acc, x| acc. max ( x) ) ;
910+ dbg ! ( line. cross_size, max_baseline) ;
910911 }
911912
912913 // If the flex container is single-line, then clamp the line’s cross-size to be within the container’s computed min
You can’t perform that action at this time.
0 commit comments