Files
rust_browser/tests/goldens/expected/072-white-space-pre-line.dl.txt
Zachary D. Rowitsch 627e2d4839 Implement white-space: pre-line and complete pre-wrap support
Fix pre-line text normalization in box_tree.rs: newlines were being
stripped during box tree construction because pre-line routed through
the normal whitespace collapse branch. Add a preserves_newlines()
branch that splits on \n, collapses spaces within each line, and
rejoins with \n so the inline engine can produce correct line breaks.

Guard is_whitespace_only_run in normalize.rs to preserve \n-containing
text nodes under pre-line, preventing them from being discarded at
block boundaries.

Add 21 unit tests covering pre-line (newline preservation, space
collapsing, wrapping, inheritance, consecutive newlines, whitespace-only
lines, vertical stacking, normalize guard) and pre-wrap (newline/space
preservation, wrapping, tabs). Update golden test 072 expected output.
Promote WPT white-space-letter-spacing-001 from known_fail to pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 00:29:46 -05:00

834 B