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

  1. Hit testing in reverse paint order. Construct a case where the result disagrees with DOM order — a transformed element clickable in its new position.
  2. Paint invalidation. Deliberately skip invalidation for one property and produce a stale-pixels bug.
  3. Layer explosion. Apply will-change: transform to 5,000 elements. Measure memory. Explain why the "optimisation" lost.
  4. Read the real architecture. In core/paint/README.md, find: the two goals of PrePaintTreeWalk, the definition of a PaintChunk, and the two caching layers (display item and subsequence).
  5. Map your toy onto it. Which part of your implementation corresponds to the PaintController? Which to a paint chunk? What do you not have?
  6. 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
  • PaintChunk definition quoted and mapped onto your implementation
  • Layer-explosion memory cost measured