All checks were successful
ci / fast (linux) (push) Successful in 6m52s
Self-collapsing elements (zero height, no padding/border, no BFC, no line boxes) now have their top and bottom margins collapse together, and child margins propagate through parents with auto height and no bottom padding/border. This replaces the pairwise collapse_margins() function with a MarginSet accumulator that tracks max positive and min negative margins separately, correctly resolving chains of 4+ margins. Key changes: - Add is_self_collapsing() post-layout predicate and gather_all_margins() - Add gather_margin_bottom() for bottom margin propagation with a guard against propagation when max-height constrains the parent - Replace prev_margin_bottom with MarginSet-based pending_margins in the sibling layout loop - Handle clearance + self-collapsing interaction correctly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
85 lines
2.8 KiB
Plaintext
85 lines
2.8 KiB
Plaintext
LayoutBox node=#1 tag=html box=block
|
|
content: (0, 0, 800, 75.2)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#2 tag=body box=block
|
|
content: (8, 8, 784, 51.2)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 8 8 8 8
|
|
LayoutBox node=#4 tag=p box=block
|
|
content: (8, 24, 784, 19.2)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 16 0 16 0
|
|
inline_context: 1 lines, height=19.2, max_width=200.35243
|
|
line[0]: rect=(8, 24, 200.35243, 19.2) fragments=5
|
|
frag[0]: rect=(8, 25.6, 41.491924, 16) text="Normal" start=false end=false
|
|
frag[1]: rect=(52.546257, 25.6, 25.69163, 16) text="bold" start=true end=true
|
|
frag[2]: rect=(81.29221, 25.6, 24.986786, 16) text="italic" start=true end=true
|
|
frag[3]: rect=(109.33333, 25.6, 56.14097, 16) text="bold-italic" start=true end=true
|
|
frag[4]: rect=(168.52864, 25.6, 39.823788, 16) text="normal" start=false end=false
|
|
LayoutBox node=#5 tag=anonymous box=anon
|
|
content: (0, 0, 44.546257, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "Normal "
|
|
LayoutBox node=#6 tag=b box=inline
|
|
content: (0, 0, 0, 0)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#7 tag=anonymous box=anon
|
|
content: (0, 0, 25.69163, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "bold"
|
|
LayoutBox node=#8 tag=anonymous box=anon
|
|
content: (0, 0, 3.0543318, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: " "
|
|
LayoutBox node=#9 tag=em box=inline
|
|
content: (0, 0, 0, 0)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#10 tag=anonymous box=anon
|
|
content: (0, 0, 24.986786, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "italic"
|
|
LayoutBox node=#11 tag=anonymous box=anon
|
|
content: (0, 0, 3.0543318, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: " "
|
|
LayoutBox node=#12 tag=b box=inline
|
|
content: (0, 0, 0, 0)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#13 tag=em box=inline
|
|
content: (0, 0, 0, 0)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#14 tag=anonymous box=anon
|
|
content: (0, 0, 56.14097, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "bold-italic"
|
|
LayoutBox node=#15 tag=anonymous box=anon
|
|
content: (0, 0, 42.87812, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: " normal"
|