Files
rust_browser/tests/goldens/expected/198-first-letter-float.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

53 lines
2.6 KiB
Plaintext

LayoutBox node=#2 tag=html box=block
content: (0, 0, 800, 86.4)
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, 54.4)
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, 300, 38.4)
padding: 0 0 0 0
border: 0 0 0 0
margin: 16 0 16 0
inline_context: 2 lines, height=38.4, max_width=271.20114
line[0]: rect=(37.72687, 16, 271.20114, 19.2) fragments=10
frag[0]: rect=(37.72687, 17.6, 19.183552, 16) text="rop" start=false end=false
frag[1]: rect=(59.964756, 17.6, 19.453743, 16) text="cap" start=false end=false
frag[2]: rect=(82.47283, 17.6, 28.663733, 16) text="style." start=false end=false
frag[3]: rect=(114.190895, 17.6, 20.417034, 16) text="The" start=false end=false
frag[4]: rect=(137.66226, 17.6, 21.791481, 16) text="first" start=false end=false
frag[5]: rect=(162.50807, 17.6, 29.61527, 16) text="letter" start=false end=false
frag[6]: rect=(195.17767, 17.6, 37.509544, 16) text="should" start=false end=false
frag[7]: rect=(235.74156, 17.6, 25.010277, 16) text="float" start=false end=false
frag[8]: rect=(263.80615, 17.6, 17.938326, 16) text="left" start=false end=false
frag[9]: rect=(284.7988, 17.6, 21.07489, 16) text="and" start=false end=false
line[1]: rect=(37.72687, 35.2, 99.70044, 19.2) fragments=4
frag[0]: rect=(37.72687, 36.800003, 13.85022, 16) text="be" start=false end=false
frag[1]: rect=(54.631424, 36.800003, 28.323053, 16) text="large" start=false end=false
frag[2]: rect=(86.008804, 36.800003, 21.07489, 16) text="and" start=false end=false
frag[3]: rect=(110.13802, 36.800003, 27.289282, 16) text="blue." start=false end=false
LayoutBox node=#17 tag=anonymous box=block
content: (8, 16, 25.726871, 57.600006)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 4 0 0
inline_context: 1 lines, height=57.600006, max_width=25.726871
line[0]: rect=(8, 16, 25.726871, 57.600002) fragments=1
frag[0]: rect=(8, 20.8, 25.726871, 48) text="D" start=false end=false
LayoutBox node=#18 tag=anonymous box=anon
content: (0, -8, 0, 0)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "D"
LayoutBox node=#13 tag=anonymous box=anon
content: (0, -8, 379.47723, 16)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "rop cap style. The f..."