mozilla/pdf.js — pull request #2509 by Snuffleupagus (2012-12-27 19:40:52+00:00)
Title: Add various improvements to scroll Thumbnails into view

This PR fixes a number of inconsistencies with regards to scrolling thumbnails into view:

1. If no page is specified on document load, no thumbnail will be highlighted when the sidebar is opened.
2. When inputting a new pageNumber, the thumbnail won't scroll into view. (Issue #2492)
3. When scrolling the document with the outline view visible and then switching back to the thumbnail view, the thumbnail view doesn't update properly.

To make sure that these changes won't affect performance on document load and/or page switches, I've tested this patch with the Profiler in Firebug. As far as I can tell, there doesn't seem to be any performance regressions cause by this patch.