Calling document().paintable() asserts layout_is_up_to_date(), which
can fail when the handler is destroyed during a navigation.
Guard the repaint call so the destructor is safe to run regardless of
layout state.
We previously supported autoscroll while the middle mouse button was
pressed. We now also support clicking the middle mouse button in-place
to begin autoscroll. Pressing any mouse button or the escape key will
exit this mode.
When the middle mouse button is pressed, we can now scroll the pressed
container while moving the mouse around. We paint an indicator at the
pressed origin (as an overlay), as the scroll speed will depend upon the
distance between the moved mouse and that origin.