1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-21 20:51:13 +00:00
serenity/Tests/LibWeb/Layout/expected/block-and-inline
Andreas Kling 1041dbb007 LibWeb: Don't lose track of inline margins when collapsing whitespace
When iterating inline level chunks for a piece of text like " hello ",
we will get three separate items from InlineLevelIterator:

- Text " "
- Text "hello"
- Text " "

If the first item also had some leading margin (e.g margin-left: 10px)
we would lose that information when deciding that the whitespace is
collapsible.

This patch fixes the issue by accumulating the amount of leading margin
present in any collapsed whitespace items, and then adding them to the
next non-whitespace item in IFC.

It's a wee bit hackish, but so is the rest of the leading/trailing
margin mechanism.

This makes the header menu on https://www.gimp.org/ look proper. :^)
2024-01-20 23:29:51 +01:00
..
abspos-grid-with-definite-width.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
abspos-only-with-inset-left.txt 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.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
abspos-with-bottom-right-insets-relative-to-box-with-paddings.txt LibWeb: Do not compensate padding for abspos boxes with static position 2023-11-15 23:44:05 +01:00
abspos-with-percentage-height-resolved-against-padding-box-of-containing-block.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
abspos-without-insets-relative-top-box-with-padding-top.txt LibWeb: Do not compensate padding for abspos boxes with static position 2023-11-15 23:44:05 +01:00
abspos-without-insets.txt LibWeb: Do not compensate padding for abspos boxes with static position 2023-11-15 23:44:05 +01:00
atomic-inline-with-percentage-vertical-align.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
atomic-inline-with-white-space-nowrap.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
automatic-size-of-block-container-with-inline-children-and-nonempty-floating-child.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
bfc-consider-all-currently-stacked-floats.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
bfc-float-left-break-vertically-2.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
bfc-float-left-break-vertically.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
block-level-floating-box-with-clearance.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
block-with-fit-content-width-constraints.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
block-with-fit-content-width.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
block-with-hidden-overflow-after-float.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
block-with-hidden-overflow-after-sibling-float.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
block-with-max-content-width.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
block-with-min-content-width.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
block-with-negative-margin-and-no-intruding-floats.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
box-with-clearance-and-margin-top.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
button-baseline-align.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-image-only.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-should-have-vertically-aligned-content.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-width.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-with-abspos-pseudo-element.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-with-after-pseudo.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-with-before-pseudo.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-with-block-content-baseline-align.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-with-multiple-words-text-node-label.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-with-text-node-label-and-font-size.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
button-with-text-node-label.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
clear-both-from-inline-formatting-context.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
clear-both-without-introducing-clearance.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
clearfix.txt LibWeb: Skip out-of-flow boxes when wrapping inlines in anonymous block 2023-12-11 13:19:12 +01:00
columns-33-percent-width.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
flex-container-should-avoid-overlapping-floats.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-1.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-2.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-3.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-4.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-clear-by-line-break.txt LibWeb: Make inline paintables own their fragments 2024-01-13 18:46:41 +01:00
float-left-and-right-with-justified-text-in-between.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-left-and-right-with-text-in-between.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-max-content-containing-block-flex-display.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-max-content-containing-block.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-should-avoid-inline-block.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-stress-1.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-stress-2.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
float-stress-3.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
floats-and-negative-margins.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
floats-with-negative-percentage-margins.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
forced-break-stops-non-whitespace-sequence.txt LibWeb: Make inline paintables own their fragments 2024-01-13 18:46:41 +01:00
grid-container-should-avoid-overlapping-floats.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
html-element-height-quirks-mode-off.txt LibWeb: Bring html element height calculation closer to the spec 2023-08-31 21:43:58 +02:00
html-element-height-quirks-mode-on.txt 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.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-block-baseline-1.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-block-baseline-2.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-block-contained-by-abspos-element.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-block-percentage-max-width.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-block-with-max-width-fit-content.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-block-with-negative-margin-left.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-block-with-negative-margin-right.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-block-with-percentage-height-and-auto-height-of-containing-block.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-box-positioned-with-top-left.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-box-with-vertical-margins-vertical-align-top.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-box-with-vertical-margins.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
inline-node-not-inserted-into-generated-box.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
intrinsic-sizing-with-min-width-specified.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
join-out-of-flow-box-with-previous-sibling-if-wrapped-in-anonymous-box.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
leading-margin-on-inline-content-that-starts-with-collapsible-whitespace.txt LibWeb: Don't lose track of inline margins when collapsing whitespace 2024-01-20 23:29:51 +01:00
list-markers-intruded-by-float.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
margin-collapse-1.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
margin-collapse-2.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
margin-collapse-3.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
margin-collapse-4.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
margin-collapse-5.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
margin-collapse-6.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
margin-must-not-collapse-across-nested-bfc.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
margin-padding-block-inline-start.txt LibWeb: Make inline paintables own their fragments 2024-01-13 18:46:41 +01:00
margin-padding-block-inline.txt LibWeb: Make inline paintables own their fragments 2024-01-13 18:46:41 +01:00
max-width-for-box-with-inline-children.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
max-width-must-not-expand-element.txt LibWeb: Add ViewportPaintable to represent viewports in the paint tree 2023-08-20 05:02:59 +02:00
max-width-on-child-block-with-width-auto-contributes-to-intrinsic-size-of-parent.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
max-width-percentage-100-border-box.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
max-width-percentage-100.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
max-width-percentage-containing-block.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
max-width-wrapped-in-max-content.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
min-width-for-box-with-inline-children.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
narrow-bfc-width-to-avoid-overlap-with-floats.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
percentage-min-height-with-containing-block-padding.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
percentage-min-height.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
percentage-min-width-with-max-content-containing-block-width.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
percentage-padding-on-inline-block-with-indefinite-containing-block-size.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
relpos-block.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
relpos-float.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
relpos-inline-element-js-offsets.txt LibWeb: Make inline paintables own their fragments 2024-01-13 18:46:41 +01:00
relpos-inline-elements.txt LibWeb: Make inline paintables own their fragments 2024-01-13 18:46:41 +01:00
single-br-inline-layout.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
small-percentage-margin.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00
width-auto-margins-set-zero-if-containing-size-smaller.txt LibWeb: Use separate structure to represent fragments in paintable tree 2024-01-13 10:53:38 +01:00