bi-09 step 01 — Display list and paint order
Goal
mini-browser M10: produce a recording rather than pixels, and demonstrate that paint order is not DOM order.
Tasks
- Walk your layout tree in paint order and emit display items (
{type, rect, color, …}). Do not draw yet — the separation is the point. - Implement
z-indexand stacking contexts. Build a test case whose rendering changes when you remove the stacking-context rule. - Implement at least one property that creates a stacking context for purely visual reasons
(
opacity < 1). Demonstrate that adding it changes structure, not just appearance. - Write out the list of stacking-context triggers you support, and name three more from the spec you did not implement.
Done when
- A display list exists, distinct from any raster step
- A z-index case that breaks without stacking contexts
-
You can explain why
opacity: 0.99"fixes" z-index bugs — and why it is a smell