ladybird/Tests/LibWeb/Text/expected/wpt-import/html
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
..
browsers LibWeb: Ensure parser cannot change the mode is handled 2025-09-07 11:11:43 +01:00
canvas LibWeb: Add initial support for bitmap cropping to createImageBitmap 2025-08-04 23:39:11 +02:00
dom LibWeb: Store correct text offsets in PaintableFragment 2025-09-12 15:34:09 -04:00
editing LibWeb: Implement DataTransferItemList.remove() 2025-09-12 12:30:33 +02:00
infrastructure LibWeb: Implement {,de}serialization steps for ImageBitmap 2025-07-20 12:30:43 +12:00
obsolete/requirements-for-implementations/the-marquee-element-0 LibWeb/CSS: Add overflow hidden to UA stylesheet for marquee element 2024-12-28 11:18:25 +00:00
rendering LibWeb: Remove UA styles for h1 in article, aside, nav and section 2025-07-11 08:24:32 +02:00
semantics LibWeb: Use intrinsic size for current_image_bitmap 2025-08-30 15:49:11 +02:00
syntax/parsing LibWeb: Parse and propagate the iframe sandbox attribute 2025-08-07 19:24:39 +02:00
webappapis LibWeb: Implement {,de}serialization steps for ImageBitmap 2025-07-20 12:30:43 +12:00