bi-09 step 03 — Hit testing, invalidation, and the real thing
Goal
Close the loop from your toy to Blink's PrePaintTreeWalk and PaintController.
Tasks
- Hit testing in reverse paint order. Construct a case where the result disagrees with DOM order — a transformed element clickable in its new position.
- Paint invalidation. Deliberately skip invalidation for one property and produce a stale-pixels bug.
- Layer explosion. Apply
will-change: transformto 5,000 elements. Measure memory. Explain why the "optimisation" lost. - Read the real architecture. In
core/paint/README.md, find: the two goals ofPrePaintTreeWalk, the definition of aPaintChunk, and the two caching layers (display item and subsequence). - Map your toy onto it. Which part of your implementation corresponds to the
PaintController? Which to a paint chunk? What do you not have? - In DevTools, enable paint flashing and layer borders; find one change that repaints and one that does not.
Done when
- Hit-test/DOM-order disagreement demonstrated
-
PaintChunkdefinition quoted and mapped onto your implementation - Layer-explosion memory cost measured