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>
193 lines
7.3 KiB
Plaintext
193 lines
7.3 KiB
Plaintext
LayoutBox node=#1 tag=html box=block
|
|
content: (0, 0, 800, 136)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#9 tag=body box=block
|
|
content: (8, 8, 800, 120)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 8 8 8 8
|
|
LayoutBox node=#11 tag=div box=block
|
|
content: (8, 8, 800, 120)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
inline_context: 2 lines, height=120, max_width=791.38025
|
|
line[0]: rect=(8, 8, 791.38025, 60) fragments=7
|
|
frag[0]: rect=(8, 8, 110, 60) text=(none) start=false end=false
|
|
frag[1]: rect=(121.05433, 8, 110, 60) text=(none) start=false end=false
|
|
frag[2]: rect=(234.10866, 8, 110, 60) text=(none) start=false end=false
|
|
frag[3]: rect=(347.16296, 8, 110, 60) text=(none) start=false end=false
|
|
frag[4]: rect=(460.2173, 8, 110, 60) text=(none) start=false end=false
|
|
frag[5]: rect=(573.2716, 8, 110, 60) text=(none) start=false end=false
|
|
frag[6]: rect=(686.3259, 8, 110, 60) text=(none) start=false end=false
|
|
line[1]: rect=(8, 68, 113.05433, 60) fragments=1
|
|
frag[0]: rect=(8, 68, 110, 60) text=(none) start=false end=false
|
|
LayoutBox node=#12 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=#13 tag=span box=inline-block
|
|
content: (13, 13, 100, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 5 5 5 5
|
|
inline_context: 1 lines, height=19.2, max_width=27.676945
|
|
line[0]: rect=(13, 13, 27.676945, 19.2) fragments=1
|
|
frag[0]: rect=(13, 13, 27.676945, 16) text="Box1" start=false end=false
|
|
LayoutBox node=#14 tag=anonymous box=anon
|
|
content: (0, 0, 27.676945, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "Box1"
|
|
LayoutBox node=#15 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=#16 tag=span box=inline-block
|
|
content: (126.05433, 13, 100, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 5 5 5 5
|
|
inline_context: 1 lines, height=19.2, max_width=27.676945
|
|
line[0]: rect=(126.05433, 13, 27.676945, 19.2) fragments=1
|
|
frag[0]: rect=(126.05433, 13, 27.676945, 16) text="Box2" start=false end=false
|
|
LayoutBox node=#17 tag=anonymous box=anon
|
|
content: (113.05433, 0, 27.676945, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "Box2"
|
|
LayoutBox node=#18 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=#19 tag=span box=inline-block
|
|
content: (239.10866, 13, 100, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 5 5 5 5
|
|
inline_context: 1 lines, height=19.2, max_width=27.676945
|
|
line[0]: rect=(239.10866, 13, 27.676945, 19.2) fragments=1
|
|
frag[0]: rect=(239.10866, 13, 27.676945, 16) text="Box3" start=false end=false
|
|
LayoutBox node=#20 tag=anonymous box=anon
|
|
content: (226.10866, 0, 27.676945, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "Box3"
|
|
LayoutBox node=#21 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=#22 tag=span box=inline-block
|
|
content: (352.16296, 13, 100, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 5 5 5 5
|
|
inline_context: 1 lines, height=19.2, max_width=27.676945
|
|
line[0]: rect=(352.16296, 13, 27.676945, 19.2) fragments=1
|
|
frag[0]: rect=(352.16296, 13, 27.676945, 16) text="Box4" start=false end=false
|
|
LayoutBox node=#23 tag=anonymous box=anon
|
|
content: (339.16296, 0, 27.676945, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "Box4"
|
|
LayoutBox node=#24 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=#25 tag=span box=inline-block
|
|
content: (465.2173, 13, 100, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 5 5 5 5
|
|
inline_context: 1 lines, height=19.2, max_width=27.676945
|
|
line[0]: rect=(465.2173, 13, 27.676945, 19.2) fragments=1
|
|
frag[0]: rect=(465.2173, 13, 27.676945, 16) text="Box5" start=false end=false
|
|
LayoutBox node=#26 tag=anonymous box=anon
|
|
content: (452.2173, 0, 27.676945, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "Box5"
|
|
LayoutBox node=#27 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=#28 tag=span box=inline-block
|
|
content: (578.2716, 13, 100, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 5 5 5 5
|
|
inline_context: 1 lines, height=19.2, max_width=27.676945
|
|
line[0]: rect=(578.2716, 13, 27.676945, 19.2) fragments=1
|
|
frag[0]: rect=(578.2716, 13, 27.676945, 16) text="Box6" start=false end=false
|
|
LayoutBox node=#29 tag=anonymous box=anon
|
|
content: (565.2716, 0, 27.676945, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "Box6"
|
|
LayoutBox node=#30 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=#31 tag=span box=inline-block
|
|
content: (691.3259, 13, 100, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 5 5 5 5
|
|
inline_context: 1 lines, height=19.2, max_width=27.676945
|
|
line[0]: rect=(691.3259, 13, 27.676945, 19.2) fragments=1
|
|
frag[0]: rect=(691.3259, 13, 27.676945, 16) text="Box7" start=false end=false
|
|
LayoutBox node=#32 tag=anonymous box=anon
|
|
content: (678.3259, 0, 27.676945, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "Box7"
|
|
LayoutBox node=#33 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=#34 tag=span box=inline-block
|
|
content: (13, 73, 100, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 5 5 5 5
|
|
inline_context: 1 lines, height=19.2, max_width=27.676945
|
|
line[0]: rect=(13, 73, 27.676945, 19.2) fragments=1
|
|
frag[0]: rect=(13, 73, 27.676945, 16) text="Box8" start=false end=false
|
|
LayoutBox node=#35 tag=anonymous box=anon
|
|
content: (0, 60, 27.676945, 16)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
text: "Box8"
|
|
LayoutBox node=#36 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: " "
|