Fix css rotation for canvas and text layer.
Fix the B2G viewer and enable bot preview.
Implement initial CalGray support

Gamma and Whitepoint are supported in this patch for CalGray.
Blackpoint is not supported.
Add missing jsdocs for PDFJS globals.
Inline setScale in parseScale
extract code to own method for faster JPX decoding
Merge pull request #3787 from Snuffleupagus/inline-setScale

Inline setScale in parseScale
Merge pull request #3796 from brendandahl/global-docs

Add missing jsdocs for PDFJS globals.
Minor nit fixes for api.js
Merge pull request #3810 from timvandermeij/nit-fixes

Minor nit fixes for api.js
Merge pull request #3554 from fkaelberer/FasterJPXdecoding

Speed up JPX decoding on Firefox
Merge pull request #3577 from kkujala/calgray

Implement initial CalGray support
[CRX] Change Viewer insertion method

And use split incognito mode

Previous method:
- Rewrite content type to XHTML, followed by a content script
  to cancel and replace the document with the viewer.
  ( https://github.com/mozilla/pdf.js/pull/3017 )

New method:
- Cancel loading of the document, followed by a redirect to the viewer

Disadvantage of new method:
- URLs are no longer "nice". This will be addressed by cherry-picking
  a commit from the crx-using-streams-api branch.

Advantages of new method:
- Idle time is minimal. In some cases (with large documents),
  it took too much time before the content script was activated.
  During this period, the page looked blank, and the contents of
  the PDF file were still retrieved and **discarded**.
  With the new method, the idle time is minimal, because the request
  is immediately cancelled.
- No FOUXEP (Flash of unhidden XML error page), because the XHTML
  Content-Type hack is no longer used.
[CRX] split:incognito is used, so update file:-handler

The current stable Chromium version is 29. Since the critical
bug that prevented use of incognito:split has been fixed, and
incognito:split is actually used, it's safe to drop the code
that disables the extension in incognito mode.

( fixed bug = http:/crbug.com/224094 )
[CRX] Show nicely formatted URL in omnibox

Before commit:
chrome-extension://EXTENSIONID/content/web/viewer.html?file=http%3A%2F%2Fexample.com%2Ffile.pdf

After commit:
chrome-extension://EXTENSIONID/http://example/file.pdf

Technical details:
- The extension's background page uses the webRequest API to intercept
  requests for <extension host>/<real path to pdf>, and redirect it to
  the viewer's URL.
- viewer.js uses history.replaceState to rewrite the URL, so that it's
  easier for users to recognize and copy-paste URLs.
- The fake paths /http:, /https:, /file:, etc. have been added to the
  web_accessible_resources section of the manifest file, in order to
  avoid seeing chrome-extension://invalid/ instead of the actual URL
  when using history back/forward to navigate from/to the PDF viewer.
- Since the relative path resolving doesn't work because relative URLs
  are inaccurate, a <base> tag has been added. This method has already
  been proven to work in the Firefox add-on.

Notes:
- This commit has been cherry-picked from crx-using-streams-api.
- Need to merge https://github.com/mozilla/pdf.js/pull/3582 to deal with
  a bug in Chrome <=30
- In Chrome, getting the contents of a FTP file is not possible, so
  there's no support for FTP files, even though the extension router
  recognizes the ftp: scheme.
Merge pull request #3751 from Rob--W/crx-alternative-loader

[Chrome extension] Change PDF rendering method.
Fix bot breakage caused by Chromium extension PR
Merge pull request #3794 from brendandahl/b2g-fix

Fix the B2G viewer and enable bot preview.
Merge pull request #3822 from Snuffleupagus/fix-chromium-PR-bot-breakage

Fix bot breakage caused by Chromium extension PR
Decrease dependence of SecondaryToolbar on UI buttons