Files
rust_browser/tests/goldens/expected/072-white-space-pre-line.layout.txt
Zachary D. Rowitsch b1135fbc08 Implement display:contents and fix implicit head insertion to promote 48 WPT tests
Add display:contents support: elements with this display value generate no
box but their children participate in the parent's layout. Fix the HTML
parser to create an implicit <head> for head-only elements (title, style,
link, meta, script), preventing <title> text from rendering visibly in
the body. This was the root cause of most WPT reftest mismatches.

- Add Display::Contents variant and CSS keyword parsing
- Add build_children_into() to flatten display:contents children
- Fix implicit <head>/<body> insertion in HTML tree builder
- Promote 53 tests known_fail→pass, demote 5 false-pass tests
- Regenerate 4 golden expected outputs for shifted node IDs

Net result: 156 → 204 passing WPT tests (+48).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 10:38:11 -05:00

34 lines
1.6 KiB
Plaintext

LayoutBox node=#1 tag=html box=block
content: (0, 0, 800, 35.2)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#6 tag=body box=block
content: (8, 8, 784, 19.2)
padding: 0 0 0 0
border: 0 0 0 0
margin: 8 8 8 8
LayoutBox node=#7 tag=div box=block
content: (8, 8, 784, 19.2)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 1 lines, height=19.2, max_width=349.96768
line[0]: rect=(8, 8, 349.96768, 19.2) fragments=10
frag[0]: rect=(8, 8, 22.449337, 16) text="This" start=false end=false
frag[1]: rect=(33.50367, 8, 19.477238, 16) text="has" start=false end=false
frag[2]: rect=(56.03524, 8, 45.427315, 16) text="multiple" start=false end=false
frag[3]: rect=(104.516884, 8, 37.333336, 16) text="spaces" start=false end=false
frag[4]: rect=(144.90456, 8, 18.725403, 16) text="but" start=false end=false
frag[5]: rect=(166.6843, 8, 23.389135, 16) text="only" start=false end=false
frag[6]: rect=(193.12776, 8, 48.693096, 16) text="newlines" start=false end=false
frag[7]: rect=(244.8752, 8, 37.509544, 16) text="should" start=false end=false
frag[8]: rect=(285.43906, 8, 13.85022, 16) text="be" start=false end=false
frag[9]: rect=(302.3436, 8, 55.62408, 16) text="preserved" start=false end=false
LayoutBox node=#8 tag=anonymous box=anon
content: (0, 0, 349.96768, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "This has multiple sp..."