Grid specification https://www.w3.org/TR/css-grid-2/#z-order defines special painting order for grid items which should be the same as for defined for inline-blocks in CSS2.
internals
Introduces `internals.hitTest(x, y)` that is going to allow us write tests for hit testing :)