Files
rust_browser/tests/goldens/expected/195-abspos-inline-ifc-with-offset.layout.txt
Zachary D. Rowitsch 1ca50684c8
All checks were successful
ci / fast (linux) (push) Successful in 7m2s
Fix float+SC invisible elements and abs-pos inline IFC rendering
Three display list / layout bugs fixed:

1. Float+stacking-context elements were invisible ("triple skip"):
   collect_stacking_participants unconditionally skipped all floats,
   even those creating stacking contexts. Now only skips simple floats.
   (CSS 2.1 Appendix E steps 2/7)

2. Abs-pos inline children inside IFCs were never laid out or rendered:
   - Layout: FormattingContext::Inline now collects abs-pos/fixed children
     into pending_absolutes for deferred layout
   - Display list: render_non_inline_descendants renders abs-pos/fixed
     inline children via render_layout_box_normal

3. Stacking context anonymous text children were double-painted:
   render_stacking_context now skips Anonymous children when the parent
   has an IFC (they're already rendered by the IFC fragment system)

Also adds guards against abs-pos inline + z-index double-render, and
promotes WPT test static-position-inline-level-absolute-in-block-level-
context-013 from known_fail to pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 09:30:17 -05:00

46 lines
1.7 KiB
Plaintext

LayoutBox node=#2 tag=html box=block
content: (0, 0, 800, 100.8)
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, 100.8)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#12 tag=div box=block
content: (20, 20, 300, 60.800003)
padding: 20 20 20 20
border: 0 0 0 0
margin: 0 0 0 0
LayoutBox node=#14 tag=span box=inline
content: (10, 5, 45.671806, 13.200001)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
inline_context: 1 lines, height=13.200001, max_width=45.671806
line[0]: rect=(10, 5, 45.671806, 13.200001) fragments=2
frag[0]: rect=(10, 6.1000004, 23.203377, 11) text="Offset" start=false end=false
frag[1]: rect=(35.30323, 6.1000004, 20.368574, 11) text="Label" start=false end=false
LayoutBox node=#15 tag=anonymous box=anon
content: (0, 0, 0, 0)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Offset Label"
LayoutBox node=#17 tag=p box=block
content: (20, 50, 300, 16.800003)
padding: 0 0 0 0
border: 0 0 0 0
margin: 30 0 14 0
inline_context: 1 lines, height=16.800003, max_width=45.792953
line[0]: rect=(20, 50, 45.792953, 16.800001) fragments=2
frag[0]: rect=(20, 51.4, 24.464024, 14) text="Body" start=false end=false
frag[1]: rect=(47.136562, 51.4, 18.65639, 14) text="text" start=false end=false
LayoutBox node=#18 tag=anonymous box=anon
content: (0, 0, 45.792953, 14)
padding: 0 0 0 0
border: 0 0 0 0
margin: 0 0 0 0
text: "Body text"