Inline-block elements now participate in vertical alignment within inline formatting contexts. Previously, inline-blocks were positioned at the parent's content origin regardless of their vertical-align property. Now they are correctly repositioned based on CSS 2.1 §10.8.1 baseline calculation rules. Key changes: - Extended AtomicInline with vertical-align, baseline-offset fields - Create positioning-only InlineFragment for each atomic inline - Reposition inline-block LayoutBoxes after vertical alignment - Compute baseline from last line box (or bottom margin edge) - Made offset_layout_box pub(crate) for reuse across modules - Skip atomic fragments in display list builder - Comprehensive test coverage (23 new tests) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
33 lines
1014 B
Plaintext
33 lines
1014 B
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=#3 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
|
|
inline_context: 1 lines, height=19.2, max_width=5.054332
|
|
line[0]: rect=(8, 8, 5.054332, 19.2) fragments=1
|
|
frag[0]: rect=(8, 18.558002, 2, 2) text=(none) start=false end=false
|
|
LayoutBox node=#4 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=#5 tag=img box=inline-block
|
|
content: (8, 18.558002, 2, 2)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
image: img#0 (intrinsic: 2x2)
|
|
inline_context: 0 lines, height=0, max_width=0
|
|
LayoutBox node=#6 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: " "
|