mozilla/pdf.js — pull request #5004 by CodingFabian (2014-06-25 16:52:18+00:00)
Title: Improving CanvasPixelArray polyfill for Android

The old polyfill was only polyfilling IE which uses the CanvasPixelArray from window.
PR #4997 fixed the issue reported in #4974 that Chrome < 21 does not work.
The CPA used by those Chrome Versions is unfortunately inaccessible and needs to be patched every time it is created.
The same applies to old versions of the mobile browser in Android.
Android < 4.4 does not use Chrome, but a custom webkit based engine which does the same as Chrome < 21.
This PR detects Android 0-4 versions and polyfills them as well. Newer Android versions which use Chrome will still be handled by the check of PR #4997.

I also checked iOS and Mobile FF. iOS 6+7 are fine (they have the set method), iOS 5 does ot work at all, thus I did not bother polyfilling.