mozilla/pdf.js — pull request #4786 by mzgol (2014-05-13 01:42:04+00:00)
Title: WIP Use the wheel event instead of DOMMouseScroll

(NOTE: I treat it as work in progress. What's the best way to test how this implementation works?)

DOMMouseScroll is a proprietary Firefox event while wheel is specified
in DOM Level 3 Events:
http://www.w3.org/TR/DOM-Level-3-Events/#event-type-wheel

All major browsers implement the wheel event at least in their latest dev
versions (Fx 17, Chrome 31, IE 9, WebKit Nightly) and all older versions of
these browsers except Firefox implement the non-standard mousewheel event.

IE9+ implements both but it doesn't have wheelDeltaX/wheelDeltaY, only
wheelDelta which makes it impossible to detect the scrolling axis. Its wheel
event implements all 3 axises.

The wheel event specifies the deltaMode parameter; 0 means deltas are given
in pixels; 1 means lines and 2 means pages. All browsers seems to specify 0 but
there's no guarantee it doesn't vary by the input device etc. so it's better
to normalize.

wheelDeltaY is usually larger (after passing through abs) than deltaY, in Chrome
that specifies both on both wheel & mousewheel events wheelDeltaY is 3 times
larger.

In this way, all of the browsers have both horizontal & vertical axis recognized
which may be used in the future (for example on OS X you can scroll in both
directions at the same time using a trackpad, creating an effect of panning
via moving 2 fingers around on the trackpad).