Scrolling improvements

This makes scrolling work a lot better: the entire page is rendered and it's clamped correctly to the boundaries.

r? @metajack