Fabian Lange 403a4e2bda Debounces scroll events in web viewer.
As requested in #5178, this change debounces the scroll events.
The reason for doing so is that browsers can event-storm especially on
scroll, communicating hundreds of subpixel changes.

The main reason for this resulting in poor performance is that on each
scroll event `scrollTop` was queried, which forces layouting.

This change will use `requestAnimationFrame` to make sure the browser can
allocate enough time to other tasks. The delay is however quite small, thus
the reduction in executions is less noticeable. Modern browsers however utilize
`requestAnimationFrame` to smoothen out rendering.
2014-08-18 23:23:32 +02:00
..
2014-04-18 12:11:00 -04:00
2014-03-14 16:46:35 -05:00
2014-07-18 22:34:50 +02:00
2014-08-06 10:09:27 -05:00
2014-06-12 10:28:42 -05:00
2014-05-22 13:53:19 -04:00