Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debounces scroll events in web viewer. #5208

Merged
merged 1 commit into from
Aug 19, 2014

Commits on Aug 18, 2014

  1. Debounces scroll events in web viewer.

    As requested in mozilla#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.
    CodingFabian committed Aug 18, 2014
    Configuration menu
    Copy the full SHA
    403a4e2 View commit details
    Browse the repository at this point in the history