The display list builder only categorized direct children into CSS paint-order buckets. Stacking-context elements nested inside normal-flow intermediaries (like <body>) rendered in document order instead of at the correct steps 2/7 per CSS 2.1 Appendix E. This caused elements with explicit z-index to paint incorrectly relative to siblings. Add a recursive tree walk (collect_stacking_participants) that collects stacking-context descendants from the entire subtree, tracking ancestor overflow:hidden clip rects. Hoisted elements render with preserved clips via render_with_ancestor_clips. Skip guards in render_layout_box_normal and render_non_inline_descendants prevent double-rendering. Scope is limited to stacking contexts (positioned + z-index) to avoid regressions with float paint ordering. Positioned-auto deep hoisting and stacking contexts inside floats are documented follow-ups. Promotes 4 WPT tests, demotes 1 (pre-existing step 3/5 limitation). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.5 KiB
Plaintext
50 lines
1.5 KiB
Plaintext
LayoutBox node=#2 tag=html box=block
|
|
content: (0, 0, 800, 200)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#10 tag=body box=block
|
|
content: (0, 0, 800, 200)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#14 tag=div box=block
|
|
content: (0, 0, 200, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
inline_context: 0 lines, height=0, max_width=0
|
|
LayoutBox node=#16 tag=div box=block
|
|
content: (0, 50, 800, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#18 tag=div box=block
|
|
content: (0, 50, 200, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
inline_context: 0 lines, height=0, max_width=0
|
|
LayoutBox node=#21 tag=div box=block
|
|
content: (0, 100, 200, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
inline_context: 0 lines, height=0, max_width=0
|
|
LayoutBox node=#23 tag=div box=block
|
|
content: (0, 150, 800, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#25 tag=div box=block
|
|
content: (0, 150, 800, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
LayoutBox node=#27 tag=div box=block
|
|
content: (0, 150, 200, 50)
|
|
padding: 0 0 0 0
|
|
border: 0 0 0 0
|
|
margin: 0 0 0 0
|
|
inline_context: 0 lines, height=0, max_width=0
|