ladybird/Tests/LibWeb/Layout/expected/table
Jelle Raaijmakers 9e9db9a9dd LibWeb: Store correct text offsets in PaintableFragment
Previously, we were collapsing whitespace in Layout::TextNode and then
passed the resulting string for further processing through ChunkIterator
-> InlineLevelIterator -> InlineFormattingContext -> LineBuilder ->
LineBoxFragment -> PaintableFragment. Our painting tree is where we deal
with things like range offsets into the underlying text nodes, but since
we modified the original string, the offsets were wrong.

This changes the way we generate fragments:

  * Layout::TextNode no longer collapses whitespace as part of its
    stored "text for rendering", but moves this logic to ChunkIterator
    which splits up this text into separate views whenever whitespace
    needs to be collapsed.

  * Layout::LineBox now only extends the last fragment if its end offset
    is equal to the new fragment's start offset. Otherwise, there's a
    gap caused by collapsing whitespace and we need to generate a
    separate fragment for that in order to have a correct start offset.

Some tests need new baselines because of the fixed start offsets.

Fixes #566.
2025-09-12 15:34:09 -04:00
..
absolute-positioning-alignment.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
abspos-pseudo-element-inside-table.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
acid2-reduction.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
align-top-and-bottom.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
auto-height.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
auto-margins.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
avoid-div-by-zero-in-table-measures.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
basic.txt LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
border-attribute-overridden-by-css.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-attribute.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-collapse-is-inherited.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-conflict-resolution-with-cell.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-conflict-resolution-with-col.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-conflict-resolution-with-row.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-conflict-resolution-with-rowgroup.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-conflict-resolutions-with-more-cells-than-cols.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-spacing-and-borders-table-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-spacing-colspan.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-spacing-rowspan.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
border-spacing-with-percentage-width.txt LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
border-spacing.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
borders.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
bottom-caption.txt LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
cell-auto-max-width-table-percentage-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
cell-px-height.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
cell-relative-to-specified-table-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
cell-with-max-width.txt LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
clip-spans-to-table-end.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
col-span-crash.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
colgroup-with-two-cols.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
colspan-overflow-crash.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
colspan-percentage-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
colspan-weighted-width-distribution.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
colspan-width-distribution.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
colspan-with-trailing-characters.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
columns-width-distribution-1.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
display-table-size.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
fixed-layout-percentage-width-all-columns.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
fixed-layout-percentage-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
fixed-layout-pixel-width-all-columns.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
fixed-layout-pixel-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
fixed-layout.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
fixed-margins.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
in-auto-height-flex-item.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
infinite-padding.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
inline-table-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
internal-alignment.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
keyword-value-does-not-constrain-column.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
line-breaking-in-cells.txt LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
long-caption-increases-width.txt LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
missing-cells-with-span.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
missing-cells.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
multi-line-cell.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
nested-table-alignment.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
nested-table-box-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
percentage-width-columns.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
percentage-width-for-nested-table-is-like-auto.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
percentage-width-max-width-columns.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
propagate-style-update-to-wrapper.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
row-outer-size-with-computed-size.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
row-px-height.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
row-span-and-nested-tables.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
rows-height-distribution-1.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
rows-height-distribution-2.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
rows-height-distribution-3.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
rows-height-distribution-4.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
rowspan-with-trailing-characters.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
rowspan.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
size.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
stretch-to-fixed-height.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
style-invalidation-propagation-to-table-wrapper.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
sum-of-percentage-column-widths-less-than-100.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-align-center-with-margin.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-align-center.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-cellpadding.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-fixup-font-size-and-line-height.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-formation-with-rowspan-in-the-middle.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-header-and-footer-groups.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-max-content-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-width-max-content-containing-block.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-width-max-content.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-width-min-content-containing-block.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-width-min-content.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
table-width.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
td-valign.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
th-default-text-align.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
top-caption-with-padding.txt LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
tr-valign.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
vertical-align-baseline.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
vertical-align-middle-td-vs-div.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
vertical-align-middle-vs-top.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
width-distribution-and-constrained-columns-increased-size-on-col.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
width-distribution-and-constrained-columns-size-on-col.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
width-distribution-and-constrained-columns.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
width-distribution-of-max-width-increment.txt LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
wrap-float-in-anonymous-table-cell.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00
zero-columns-gridmax.txt LibWeb: Show inline positioning in layout tree dump 2025-08-27 11:53:45 +01:00