Truly independent web browser
LibWeb: Clamp flex lines by percentage max size of the container
Andreas Klingdde578d78dcc
diff --git a/Libraries/LibWeb/Rust/src/layout/flex_formatting_context.rs b/Libraries/LibWeb/Rust/src/layout/flex_formatting_context.rsindex f9825b6d01c..2cba201b454 100644--- a/Libraries/LibWeb/Rust/src/layout/flex_formatting_context.rs+++ b/Libraries/LibWeb/Rust/src/layout/flex_formatting_context.rs@@ -948,7 +948,7 @@ impl<'pass> FlexFormattingContext<'pass> {self.facts(self.run.box_).is_replaced_box(),self.cross_axis_is_horizontal(),self.available_space_for_items.unwrap().cross,- self.item_containing_block_constraints(),+ self.layout_input.as_ref().unwrap().containing_block_constraints,)}diff --git a/Tests/LibWeb/Layout/expected/abspos-auto-height-flex-and-grid-roots.txt b/Tests/LibWeb/Layout/expected/abspos-auto-height-flex-and-grid-roots.txtindex 24309c084be..e676a5b2edc 100644--- a/Tests/LibWeb/Layout/expected/abspos-auto-height-flex-and-grid-roots.txt+++ b/Tests/LibWeb/Layout/expected/abspos-auto-height-flex-and-grid-roots.txt@@ -26,8 +26,8 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] childrenBlockContainer <div.cb> at [0,1200] positioned [0+0+0 400 0+0+400] [0+0+0 300 0+0+0] children: not-inlineBox <div#rowMaxPercent.root.row> at [3,1203] positioned flex-container(row) [0+0+3 200 3+0+0] [0+0+3 30 3+0+0] [FFC] children: not-inlineBlockContainer <div.item> at [3,1203] flex-item [0+0+0 20 0+0+0] [0+0+0 50 0+0+0] [BFC] children: not-inline- BlockContainer <div> at [23,1203] flex-item [0+0+0 20 0+0+0] [0+0+0 50 0+0+0] [BFC] children: not-inline- BlockContainer <div.half> at [23,1203] [0+0+0 10 0+0+10] [0+0+0 25 0+0+0] children: not-inline+ BlockContainer <div> at [23,1203] flex-item [0+0+0 20 0+0+0] [0+0+0 30 0+0+0] [BFC] children: not-inline+ BlockContainer <div.half> at [23,1203] [0+0+0 10 0+0+10] [0+0+0 15 0+0+0] children: not-inlineBlockContainer <div.cb> at [0,1500] positioned [0+0+0 400 0+0+400] [0+0+0 300 0+0+0] children: not-inlineBox <div#gridRows.root.grid> at [0,1500] positioned [0+0+0 200 0+0+0] [0+0+0 80 0+0+0] [GFC] children: not-inlineBlockContainer <div.item> at [0,1500] [0+0+0 20 0+0+0] [0+0+0 20 0+0+0] [BFC] children: not-inlinediff --git a/Tests/LibWeb/Layout/expected/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.txt b/Tests/LibWeb/Layout/expected/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.txtindex 9dbbb2cd322..ce515692a4e 100644--- a/Tests/LibWeb/Layout/expected/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.txt+++ b/Tests/LibWeb/Layout/expected/flex/single-line-clamped-by-percentage-max-height-of-auto-height-container.txt@@ -2,9 +2,9 @@ Viewport <#document> at [0,0] [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] childrenBlockContainer <html> at [0,0] [0+0+0 800 0+0+0] [0+0+0 0 0+0+0] [BFC] children: not-inlineBlockContainer <body> at [0,0] [0+0+0 800 0+0+0] [0+0+0 0 0+0+0] children: not-inlineBlockContainer <div.fixed> at [0,0] positioned [0+0+0 800 0+0+0] [0+0+0 600 0+0+0] [BFC] children: not-inline- Box <div.sheet> at [0,0] flex-container(row) [0+0+0 800 0+0+0] [0+0+0 300 0+0+0] [FFC] children: not-inline overflow: [0,0 800x3000]- Box <div.layer> at [0,0] flex-container(row) flex-item [0+0+0 100 0+0+0] [0+0+0 3000 0+0+0] [FFC] children: not-inline- BlockContainer <div.column> at [0,0] flex-item [0+0+0 100 0+0+0] [0+0+0 3000 0+0+0] [BFC] children: not-inline+ Box <div.sheet> at [0,0] flex-container(row) [0+0+0 800 0+0+0] [0+0+0 300 0+0+0] [FFC] children: not-inline+ Box <div.layer> at [0,0] flex-container(row) flex-item [0+0+0 100 0+0+0] [0+0+0 300 0+0+0] [FFC] children: not-inline+ BlockContainer <div.column> at [0,0] flex-item [0+0+0 100 0+0+0] [0+0+0 300 0+0+0] [BFC] children: not-inline overflow: [0,0 100x3000]BlockContainer <div.content> at [0,0] [0+0+0 100 0+0+0] [0+0+0 3000 0+0+0] children: not-inlineSC for Viewport<#document> [0,0 800x600] (z-index: auto)