mozilla/pdf.js — pull request #1908 by brendandahl (2012-07-18 18:27:34+00:00)
Title: Fix initial scroll direction detection.

If you had visited a PDF already and were scrolled two the top(first page was below the top bar) then the scroll direction monitoring would think you had scrolled up causing the viewer not to pre-render the second page.

This happened because setHash set the page number which then scrolled the page into view, but then it would scroll up further to account for the offset above the top page. Setting the page isn't needed since that will happen when the offset location is scrolled.