mozilla/pdf.js — pull request #4823 by Snuffleupagus (2014-05-21 15:28:35+00:00)
Title: Simplify the interaction with overlays by adding an OverlayManager

The current way that the overlays (`PasswordPrompt` and `DocumentProperties`) are handled are less than ideal for a number of reasons. Among those are:
* Currently the code that is used to open/close an overlay needs to be duplicated for every one. If we want to add more overlays (e.g. #3985), this will only get worse over time.
* The way that the current overlays are implemented also means that adding another overlay would require code changes to all the existing ones.
* There is no way to prevent multiple overlays being opened at the same time, which might lead to "interesting" results.

To avoid the issues described above, and to also unify and simplify how overlays work, this PR introduces the `OverlayManager`.

This PR is thus the one mentioned in https://github.com/mozilla/pdf.js/pull/4777#issue-33316632

/cc @timvandermeij Would you mind reviewing this?