ladybird/Tests/LibWeb/Layout/input/block-and-inline
Jelle Raaijmakers 6f800caeaa LibWeb: Don't mess up the order of nodes when wrapping inline contents
Whenever we introduce a block element in a container that at that point
has only had inline children, we create an anonymous wrapper for all the
inline elements so we can keep the invariant that each container
contains either inline or non-inline children. For some reason, we
ignore all the out-of-flow nodes since they are layed out separately and
it was thought that this shouldn't matter.

However, if we are dealing with inline blocks and floating blocks, the
order of the inline contents _including_ out-of-flow nodes becomes very
important: floating blocks need to take the order of nodes into account
when positioning themselves.

Fix this by simply hoisting the out-of-flow nodes into the anonymous
wrapper as well.

Fixes the order of blocks in #4212. The gap is still not present.
2025-04-24 19:12:50 +02:00
..
abspos-br.html LibWeb: Ignore non-box element while collecting abspos nodes for layout 2025-03-26 00:17:53 +00:00
abspos-grid-with-definite-width.html LibWeb: Use inner available space to calculate auto height of abspos 2023-11-15 11:26:14 +01:00
abspos-only-with-inset-left.html LibWeb: Do not compensate padding for abspos boxes with static position 2023-11-15 23:44:05 +01:00
abspos-with-auto-margins-in-inline-axis.html LibWeb: Resolve auto margins on abspos elements in more cases 2023-06-13 17:47:50 +02:00
abspos-with-bottom-right-insets-relative-to-box-with-paddings.html LibWeb: Do not compensate padding for abspos boxes with static position 2023-11-15 23:44:05 +01:00
abspos-with-insets-and-auto-margins.html LibWeb: Subtract left inset from size_available_for_margins for abspos 2024-07-19 13:29:20 +01:00
abspos-with-percentage-height-resolved-against-padding-box-of-containing-block.html LibWeb: Use correct reference for abspos elements with % height sizes 2023-06-17 20:35:19 +02:00
abspos-with-percentage-padding.html LibWeb: Fix "box-sizing: border-box" resolution for abspos items 2024-09-17 07:56:18 +02:00
abspos-without-insets-relative-top-box-with-padding-top.html LibWeb: Do not compensate padding for abspos boxes with static position 2023-11-15 23:44:05 +01:00
abspos-without-insets.html LibWeb: Do not compensate padding for abspos boxes with static position 2023-11-15 23:44:05 +01:00
aspect-ratio-but-width-and-height-are-auto.html LibWeb: Size box as normal if it has aspect ratio but auto sizes 2025-03-27 23:13:57 +00:00
atomic-inline-with-aspect-ratio-2.html LibWeb: Don't make flex layout responsible for flex container cross size 2024-03-27 16:43:04 +01:00
atomic-inline-with-percentage-vertical-align.html
atomic-inline-with-white-space-nowrap.html LibWeb: Don't break for atomic inline elements in white-space: nowrap 2023-09-16 15:21:16 +02:00
automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.html
bfc-consider-all-currently-stacked-floats.html
bfc-float-left-break-vertically-2.html
bfc-float-left-break-vertically.html
bfc-root-auto-height-expands-for-descendants-with-margin-top.html LibWeb: Account for collapsed top margins in BFC root height calculation 2025-02-22 18:41:42 +01:00
block-level-floating-box-with-clearance.html LibWeb: Allow block level boxes to be floated and have clearance 2023-09-12 12:11:53 +02:00
block-with-fit-content-width-constraints.html LibWeb: Accept fit-content as a value for min-width and max-width 2023-05-27 05:47:54 +02:00
block-with-fit-content-width.html LibWeb: Support fit-content width for block-level boxes 2023-05-27 05:47:54 +02:00
block-with-hidden-overflow-after-float.html LibWeb: Handle overlapping floating box and left margin 2023-07-28 12:44:09 +02:00
block-with-hidden-overflow-after-sibling-float.html LibWeb: Handle overlapping floating box and left margin 2023-07-28 12:44:09 +02:00
block-with-max-content-width.html LibWeb: Support max-content for width, min-width and max-width 2023-05-29 21:29:25 +02:00
block-with-min-content-width.html LibWeb: Support min-content for width, min-width and max-width 2023-05-29 21:29:25 +02:00
block-with-negative-margin-and-no-intruding-floats.html LibWeb: Account for negative margins when calculating float intrusion 2023-06-04 18:14:12 +02:00
box-with-clearance-and-margin-top.html LibWeb: Reset margin collapsing state only if box indeed add clearance 2023-05-26 18:11:35 +02:00
box-with-percentage-height-wrapped-in-anonymous.html LibWeb: Use parent's available space for anonymous blocks in BFC 2025-03-15 13:31:07 +01:00
button-baseline-align.html LibWeb: Derive baseline from rightmost descendant 2023-08-23 05:24:55 +02:00
button-image-only.html LibWeb: Add a table row to the layout tree for buttons 2023-08-24 07:08:21 +02:00
button-should-have-vertically-aligned-content.html LibWeb: Vertically align HTML Button content 2023-08-09 18:34:17 +02:00
button-width.html LibWeb: Use fit-content width if button's computed width is "auto" 2023-09-12 17:26:30 +02:00
button-with-abspos-pseudo-element.html LibWeb: Use flex layout for button content alignment 2023-09-03 12:33:10 +02:00
button-with-after-pseudo.html LibWeb: Add boxes for before/after pseudos post button layout tweak 2023-09-11 15:19:56 +02:00
button-with-before-pseudo.html LibWeb: Add boxes for before/after pseudos post button layout tweak 2023-09-11 15:19:56 +02:00
button-with-block-content-baseline-align.html LibWeb: Derive baseline from rightmost descendant 2023-08-23 05:24:55 +02:00
button-with-min-height.html LibWeb: Make button flex wrapper inherit min-height property 2024-01-28 14:48:33 +01:00
button-with-multiple-words-text-node-label.html LibWeb: Fix buttons with TextNode label 2023-08-11 10:02:27 +02:00
button-with-text-node-label-and-font-size.html LibWeb: Copy button style properties for generated table and cell 2023-08-12 13:36:37 +02:00
button-with-text-node-label.html LibWeb: Fix buttons with TextNode label 2023-08-11 10:02:27 +02:00
clear-both-from-inline-formatting-context.html LibWeb: Better handling of floating boxes from inline formatting context 2023-08-01 07:38:19 +02:00
clear-both-without-introducing-clearance.html LibWeb: Reset margin collapsing state only if box indeed add clearance 2023-05-26 18:11:35 +02:00
clearfix.html
columns-33-percent-width.html LibWeb: Remove rounding division for CSSPixels 2024-01-06 21:40:27 +01:00
flex-container-should-avoid-overlapping-floats.html LibWeb: Boxes that establish FFC or GFC should avoid overlapping floats 2023-09-22 16:48:28 +02:00
float-1.html
float-2.html
float-3.html
float-4.html LibWeb: Fix alternating-sides float positioning 2023-07-02 18:43:20 +02:00
float-clear-by-line-break-at-end-of-block.html LibWeb: Resolve block height correctly after line break with clear: .. 2025-04-01 16:02:53 +02:00
float-clear-by-line-break-followed-by-block.html LibWeb: Resolve block height correctly after line break with clear: .. 2025-04-01 16:02:53 +02:00
float-clear-by-line-break-followed-by-inline.html LibWeb: Apply remaining vertical float clearance to next block level box 2025-03-27 17:21:56 +00:00
float-clear-right-should-not-affect-inline-left.html LibWeb: Remove application of vertical float clearance to BFC Y offset 2025-04-23 13:24:58 +02:00
float-clear-simultaneously.html LibWeb: Do not clear float sides for floating boxes with clear: .. 2025-03-27 00:56:56 +00:00
float-following-trailing-whitespace.html LibWeb: Exclude trailing whitespace from line width when placing floats 2025-03-26 19:35:38 +00:00
float-initial-available-space-vs-height.html LibWeb: Fix and improve float positioning behavior 2025-03-27 10:56:13 +00:00
float-inside-margin-auto-container.html LibWeb: Only apply box offset if the box is not already the ancestor 2025-04-04 15:35:26 +02:00
float-intrusions-relative-coordinates.html LibWeb: Use relative coordinates for available_space_for_line() 2025-04-01 15:26:12 +02:00
float-left-and-right-with-justified-text-in-between.html
float-left-and-right-with-text-in-between.html
float-logical.html LibWeb: Handle inline-start and inline-end as float values 2024-07-10 17:41:18 +02:00
float-max-content-containing-block-flex-display.html LibWeb: Fix handling of max-content containing block for floating box 2023-08-13 14:43:41 +02:00
float-max-content-containing-block.html LibWeb: Fix handling of max-content containing block for floating box 2023-08-13 14:43:41 +02:00
float-should-avoid-inline-block.html LibWeb: Use actual line height to calculate float y in IFC 2023-09-09 17:05:22 +02:00
float-stress-1.html
float-stress-2.html
float-stress-3.html
float-vertical-clearance-for-text-after-break.html LibWeb: Only set line builder's block offset if clearance increases it 2025-03-31 08:11:10 +01:00
float-vertical-clearance-ignores-opposite-side.html LibWeb: Fix and improve float positioning behavior 2025-03-27 10:56:13 +00:00
float-vertical-offset-by-preceding-float.html LibWeb: Set float Y offset using margin box bottom instead of height 2025-01-28 01:12:23 +01:00
float-with-inline-contents-hoisted.html LibWeb: Don't mess up the order of nodes when wrapping inline contents 2025-04-24 19:12:50 +02:00
float-with-negative-margins.html LibWeb: Ignore negative margins for margin box rect 2025-04-11 02:34:28 +01:00
floating-box-with-box-sizing-border-box.html Tests/LibWeb: Add layout test for float box with box-sizing=border-box 2024-09-18 15:49:40 +02:00
floats-and-negative-margins.html
floats-with-negative-percentage-margins.html LibWeb: Ensure preceding offset is non-negative in float_box() 2023-09-12 12:11:53 +02:00
forced-break-stops-non-whitespace-sequence.html LibWeb: Move line breaking test 2023-08-28 10:09:07 +02:00
grid-container-should-avoid-overlapping-floats.html LibWeb: Boxes that establish FFC or GFC should avoid overlapping floats 2023-09-22 16:48:28 +02:00
html-element-height-quirks-mode-off.html LibWeb: Bring html element height calculation closer to the spec 2023-08-31 21:43:58 +02:00
html-element-height-quirks-mode-on.html LibWeb: Bring html element height calculation closer to the spec 2023-08-31 21:43:58 +02:00
ifc-float-left-and-sibling-with-margin-left.html
inline-block-baseline-1.html LibWeb: Derive box baseline from last child *with line boxes* 2023-07-25 13:42:32 +02:00
inline-block-baseline-2.html LibWeb: Derive box baseline from last child *with line boxes* 2023-07-25 13:42:32 +02:00
inline-block-contained-by-abspos-element.html LibWeb: Fix min-content width calculation in dimension_box_on_line() 2023-10-16 21:44:48 +02:00
inline-block-percentage-max-width.html LibWeb: Ignore % max-width if box is sized under max-content constraint 2023-08-18 05:08:52 +02:00
inline-block-vertical-align-middle.html LibWeb: Implement vertical-align: middle correctly for atomic inlines 2024-08-26 15:49:07 +02:00
inline-block-with-max-width-fit-content.html LibWeb: Fully resolve max-width values on inline-block elements 2023-07-15 12:30:07 +02:00
inline-block-with-negative-margin-left.html LibWeb: Honor negative margins on atomic inlines 2023-12-10 11:09:22 +01:00
inline-block-with-negative-margin-right.html LibWeb: Honor negative margins on atomic inlines 2023-12-10 11:09:22 +01:00
inline-block-with-percentage-height-and-auto-height-of-containing-block.html LibWeb: Fix inline-block percentage height calculation 2023-07-16 15:00:30 +02:00
inline-box-positioned-with-top-left.html
inline-box-with-vertical-margins-vertical-align-top.html
inline-box-with-vertical-margins.html
inline-float-clear.html LibWeb: Change inline float clearance to not reset margin collapsing 2024-09-21 01:55:43 +02:00
inline-node-not-inserted-into-generated-box.html LibWeb: Stop inserting inline nodes into a generated wrapper box 2023-10-11 07:05:23 +02:00
intrinsic-sizing-with-min-width-specified.html
join-out-of-flow-box-with-previous-sibling-if-wrapped-in-anonymous-box.html
leading-margin-on-inline-content-that-starts-with-collapsible-whitespace.html LibWeb: Don't lose track of inline margins when collapsing whitespace 2024-01-20 23:29:51 +01:00
list-markers-intruded-by-float.html LibWeb: Account for float intrusions in list marker x offset 2023-08-26 19:07:56 +02:00
margin-collapse-1.html
margin-collapse-2.html
margin-collapse-3.html
margin-collapse-4.html
margin-collapse-5.html
margin-collapse-6.html
margin-must-not-collapse-across-nested-bfc.html
margin-padding-block-inline-start.html LibWeb: Add CSS logical property aliases for margin and padding sides 2023-06-06 21:02:04 +02:00
margin-padding-block-inline.html LibWeb: Add naive support for {margin,padding}-{block,inline} 2023-06-07 11:20:42 +02:00
max-width-for-box-with-inline-children.html LibWeb: Set max-width for inline child boxes after inside layout 2023-08-02 05:27:56 +02:00
max-width-must-not-expand-element.html LibWeb: Prevent max-width expanding the width 2023-07-12 11:44:57 +02:00
max-width-on-block-level-box-that-creates-fc.html LibWeb: Respect min/max-content available size in auto width calculation 2025-03-28 02:13:41 +00:00
max-width-on-child-block-with-width-auto-contributes-to-intrinsic-size-of-parent.html
max-width-percentage-100-border-box.html
max-width-percentage-100.html
max-width-percentage-containing-block.html LibWeb: Resolve block max-width percentage against containing block 2023-10-29 19:35:02 +01:00
max-width-wrapped-in-max-content.html LibWeb: Apply min/max-widths to block container during intrinsic layout 2023-12-26 16:24:51 +01:00
min-width-for-box-with-inline-children.html LibWeb: Set min-width for inline child boxes after inside layout 2023-08-05 09:25:24 +02:00
narrow-bfc-width-to-avoid-overlap-with-floats.html
out-of-flows-not-inserted-into-generated-box.html LibWeb: Don't insert out-of-flow elements into block pseudo elements 2024-07-06 10:02:29 +02:00
percentage-height-abspos-box-with-percentage-height-child.html LibWeb: Mark height as definite before doing inner layout of abspos 2025-03-21 14:46:31 -05:00
percentage-height-box-nested-into-percentage-height-box.html LibWeb: Resolve not auto height before child box layout in BFC 2024-09-27 20:25:25 +02:00
percentage-height-in-quirks-mode.html LibWeb: Implement "The percentage height calculation quirk" in BFC 2024-09-28 14:41:26 +02:00
percentage-min-height-with-containing-block-padding.html LibWeb: Use padding box of containing block to resolve % height size 2023-06-18 20:29:40 +02:00
percentage-min-height.html LibWeb: Use padding box of containing block to resolve % height size 2023-06-18 20:29:40 +02:00
percentage-min-width-with-max-content-containing-block-width.html LibWeb: Treat non-finite containing block width as zero for percentages 2023-07-01 09:06:49 +02:00
percentage-padding-on-inline-block-with-indefinite-containing-block-size.html LibWeb: Resolve inline-block percentage padding against 0, not infinity 2023-07-06 14:25:40 +01:00
relpos-block.html LibWeb: Resolve used insets for floating elements 2023-07-04 06:43:53 +02:00
relpos-float.html LibWeb: Resolve used insets for floating elements 2023-07-04 06:43:53 +02:00
relpos-inline-element-js-offsets.html LibWeb: Make HTMLElement.offset{Left,Top} work on inline elements 2023-08-15 16:37:11 +02:00
relpos-inline-elements.html LibWeb: Resolve relative offsets *once* after layout 2023-08-15 16:37:11 +02:00
single-br-inline-layout.html
small-percentage-margin.html LibWeb: Add Length::resolved() overload for CSSPixels 2023-08-30 20:09:15 +02:00
width-auto-margins-set-zero-if-containing-size-smaller.html