instanceof HTMLElement does not work in jsdom node.js module.
Add the viewBookmark button to the secondary toolbar
Proper glyph selection for CIDFontType0C fonts.
Fix external links in Presentation Mode (issue #3755)
Merge pull request #3750 from brendandahl/cidfonttype0c

Proper glyph selection for CIDFontType0C fonts.
Merge pull request #3582 from Rob--W/pushState

Set URL in history.replaceState/pushState
Merge pull request #3739 from Snuffleupagus/bug-921162

Add the viewBookmark button to the Secondary Toolbar
Merge pull request #3759 from Snuffleupagus/issue-3755

Fix external links in Presentation Mode (issue 3755)
Refactor Presentation Mode code
Merge pull request #3763 from Snuffleupagus/refactor-PresentationMode

Refactor Presentation Mode code
Update ja locale
Update zh-TW locale
Merge pull request #3778 from Haebaru/master

Update ja locale
Merge pull request #3779 from xavier114fch/zh-TW

Update zh-TW locale
Merge pull request #3416 from peerlibrary/noHTMLElement

instanceof HTMLElement does not work in jsdom node.js module.
Add mozPrintCallback shim

This shim does the following:
1. Intercept window.print()
2. For a window.print() call (if allowed, ie. no previous print job):
   1. Dispatch the beforeprint event.
   2. Render a printg progress dialog.
   3. For each canvas, call mozPrintCallback if existent (one at a time, async).
   4. During each mozPrintCallback callback, update the progress dialog.
   5. When all <canvas>es have been rendered, invoke the real window.print().
   6. Dispatch the afterprint event.

The shim is not included in Firefox through the preprocessor.

Keyboard shortcuts (Ctrl/Cmd + P) are intercepted and default behavior
(i.e. printing) is prevented, and the steps for window.print() are run.
window.attachEvent is used, in order to cancel printing in IE10 and
earlier (courtesy of Stack Overflow - http://stackoverflow.com/a/15302847).
Unfortunately, this doesn't work in IE11 - if Ctrl + P is used, the
print dialog will be shown twice: Once because of Ctrl + P, and again
when all pages have finished rendering.
Resolved severe memory leak (mozPrintCallback)

Do NOT save the temporary <canvas> element as `this.canvas`.
`PDFViewer.pages[i].canvas` appears to be used to generate the thumbnail
icons. Well, that's no justification for preventing GC of those
temporary <canvas> elements used during mozPrintCallback.

With a document consisting of 79 pages, this resulted in a 600-700MB
leaked memory.
Wrap printed <canvas> in <div> for Chrome

Otherwise one page (canvas) will consume two (printed) pages in Chrome.
This method has no side-effects in Firefox.