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>
834 B
834 B