ladybird/Tests/LibWeb/Layout/input/block-and-inline
Aliaksandr Kalenik e2eb8716e5 LibWeb: Fix incorrect margin collapsing behavior [BFC]
This change removes premature reset of
`block_container_y_position_update_callback`. Also makes callback
private in `BlockMarginState`, because resetting it independently of
currently accumulated margins is incorrect.

Lots of test expectations are updated, but there is no visual
difference.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/6074
2025-09-08 14:09:06 +02:00
..
abspos-br.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02: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-inline.html LibWeb: Correctly position absolute inline boxes in last line 2025-08-28 13:45:37 +02: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 LibWeb: Take floats into account when measuring automatic width of IFC 2023-05-03 19:49:43 +02:00
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-inside-inline.html LibWeb: Ensure anonymous wrappers inherit inline-block display 2025-05-23 11:16:06 +02: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-and-margin-left.html LibWeb: Overlap float space and left margins for all shared ancestors 2025-05-09 14:13:02 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
button-empty.html Tests: Rename button test to something sensible 2025-08-19 11:12:23 +02:00
button-image-only.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
button-should-have-vertically-aligned-content.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
button-with-text-node-label-and-font-size.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
button-with-text-node-label.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
clear-both-from-inline-formatting-context.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
float-2.html
float-3.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
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-fits-exactly.html LibWeb: Correct the calculation for right float intrusion 2025-05-27 17:31:47 +02: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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
float-left-and-right-with-text-in-between.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
float-max-content-containing-block.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
float-nested-under-eachother.html LibWeb: Correct the calculation for right float intrusion 2025-05-27 17:31:47 +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-under-if-would-fit.html LibWeb: Ensure floats are correctly placed under the preceding float 2025-05-23 10:58:15 +02:00
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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02: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-margin-containing-block.html LibWeb: Allow negative margins to influence inline offset after float 2025-07-28 12:11:56 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
ifc-float-left-and-sibling-with-margin-left.html
img-as-block-with-box-sizing-border-box.html LibWeb: Honor box-sizing for block-level replaced element widths 2025-07-14 11:16:13 +02:00
inline-block-baseline-1.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
inline-block-baseline-2.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +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-leading-and-trailing-metrics.html LibWeb: Prevent time-traveling leading inline metrics 2025-06-20 19:59:32 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
inline-box-with-vertical-margins-vertical-align-top.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
inline-box-with-vertical-margins.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
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 LibWeb: Fix intrinsic sizing when min or max width is specified 2023-05-02 18:50:26 +02:00
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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
margin-collapse-2.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
margin-collapse-3.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
margin-collapse-4.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
margin-collapse-5.html LibWeb: Prevent margin double-counting with "collapse through" boxes 2023-04-27 07:52:12 +02:00
margin-collapse-6.html LibWeb: Make sure collapsed margins are not ignored if box creates FC 2023-05-22 12:51:24 +02:00
margin-collapse-7.html LibWeb: Fix incorrect margin collapsing behavior [BFC] 2025-09-08 14:09:06 +02:00
margin-collapse-8.html LibWeb: Fix incorrect margin collapsing behavior [BFC] 2025-09-08 14:09:06 +02:00
margin-must-not-collapse-across-nested-bfc.html LibWeb: Make sure that margins don't collapse across a nested BFC 2023-05-19 15:09:09 +02:00
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 LibWeb: Remove early resolve to auto while calculating border-box width 2023-05-05 10:01:28 +02:00
max-width-percentage-100.html LibWeb: Remove setting length to 0px if it is not definite 2023-05-05 06:20:44 +02:00
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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
negative-margin-with-padding.html LibWeb: Always set the Y offset of the current block in BFC 2025-05-16 20:33:27 +02:00
no-relocation-of-atomic-inline-fragments.html LibWeb: Don't relocate fragments across atomic inline boundary 2025-08-24 21:00:08 +02:00
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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
percentage-height-in-quirks-mode.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +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 Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
relpos-inline-elements.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
single-br-inline-layout.html Tests: Add doctypes to remaining test cases 2025-06-21 14:09:47 +02:00
small-percentage-margin.html LibWeb: Add Length::resolved() overload for CSSPixels 2023-08-30 20:09:15 +02:00
treat-percentage-width-as-auto-in-non-replaced-min-content-sizing.html LibWeb: Don't treat non-replaced sizes as 0 for min-content contrib 2025-07-23 19:52:59 +02:00
width-auto-margins-set-zero-if-containing-size-smaller.html LibWeb: Zero out margins if width is not 'auto' in BFC's compute_width 2023-05-05 13:26:41 +02:00