Files
rust_browser/tests/goldens/expected/197-first-letter-basic.layout.txt
Zachary D. Rowitsch 0863153acd Implement parent-child margin collapsing (CSS 2.1 §8.3.1)
Add parent-first-child top and parent-last-child bottom margin collapsing
using a two-level approach (Level A shifts child inside parent, Level B
adjusts grandparent for effective collapsed margin). Fix pre-existing bug
in shift_subtree_x that incorrectly skipped absolute/fixed children.
Extract shared MARGIN_EPSILON constant, add 9 unit tests and 4 golden
tests (209-212), promote 31 WPT tests to pass. Includes code review
fixes: pub(crate) visibility for is_root_element, known-limitation docs,
and inline-content shift test coverage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 18:41:50 -04:00

46 lines
2.1 KiB
Plaintext

LayoutBox node=#2 tag=html box=block
content: (0, 0, 800, 90.95801)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#10 tag=body box=block
content: (8, 16, 784, 58.958008)
padding: 0 0 0 0
border: 0 0 0 0
margin: 8 8 8 8
LayoutBox node=#12 tag=p box=block
content: (8, 16, 784, 42.958008)
padding: 0 0 0 0
border: 0 0 0 0
margin: 16 0 16 0
inline_context: 1 lines, height=42.958008, max_width=293.721
line[0]: rect=(8, 16, 293.721, 42.958004) fragments=11
frag[0]: rect=(8, 19.2, 17.40969, 32) text="H" start=true end=true
frag[1]: rect=(25.40969, 31.758003, 19.79442, 16) text="ello" start=false end=false
frag[2]: rect=(48.258442, 31.758003, 34.596184, 16) text="world." start=false end=false
frag[3]: rect=(85.90896, 31.758003, 20.417034, 16) text="The" start=false end=false
frag[4]: rect=(109.38032, 31.758003, 21.791481, 16) text="first" start=false end=false
frag[5]: rect=(134.22614, 31.758003, 29.61527, 16) text="letter" start=false end=false
frag[6]: rect=(166.89574, 31.758003, 37.509544, 16) text="should" start=false end=false
frag[7]: rect=(207.45961, 31.758003, 13.85022, 16) text="be" start=false end=false
frag[8]: rect=(224.36417, 31.758003, 28.323053, 16) text="large" start=false end=false
frag[9]: rect=(255.74156, 31.758003, 21.07489, 16) text="and" start=false end=false
frag[10]: rect=(279.8708, 31.758003, 21.85022, 16) text="red." start=false end=false
LayoutBox node=#17 tag=anonymous box=inline
content: (0, -8, 0, 0)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#18 tag=anonymous box=anon
content: (0, -8, 17.40969, 32)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "H"
LayoutBox node=#13 tag=anonymous box=anon
content: (0, -8, 285.01614, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "ello world. The firs..."