gecko-dev/dom/interfaces
Emilio Cobos Álvarez 044b3c4332 Bug 1636728 - Centralize printing entry points in nsGlobalWindowOuter, and move cloning out of nsPrintJob. r=jwatt,geckoview-reviewers,smaug,agi
This centralizes our print and preview setup in nsGlobalWindowOuter so
that we never re-clone a clone, and so that we reuse the window.open()
codepath to create the browsing context to clone into.

For window.print, for both old print dialog / silent printing and new
print preview UI, we now create a hidden browser (as in with visibility:
collapse, which takes no space but still gets a layout box).

 * In the modern UI case, this browser is swapped with the actual print
   preview clone, and the UI takes care of removing the browser.

 * In the print dialog / silent printing case, the printing code calls
   window.close() from nsDocumentViewer::OnDonePrinting().

 * We don't need to care about the old print preview UI for this case
   because it can't be open from window.print().

We need to fall back to an actual window when there's no
nsIBrowserDOMWindow around for WPT print tests and the like, which don't
have one. That seems fine, we could special-case this code path more if
needed but it doesn't seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D87063
2020-08-25 17:45:12 +00:00
..
base Bug 1636728 - Centralize printing entry points in nsGlobalWindowOuter, and move cloning out of nsPrintJob. r=jwatt,geckoview-reviewers,smaug,agi 2020-08-25 17:45:12 +00:00
events Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
geolocation Bug 1575144 - Update Geolocation implementation to match latest spec r=baku,marcosc 2019-11-06 12:35:42 +00:00
html Bug 1566186: Part 1 - Remove DocShell support for isolated mozbrowsers. r=nika 2019-07-16 16:40:19 -07:00
notification
payments
push
security Bug 1635094 - Cleanup the ReferrerInfo code. r=ckerschb 2020-05-04 18:50:20 +00:00
sidebar Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
storage Bug 1558420 - Part 1: Add an API for creating a sessionstorage manager and a cache object; r=baku 2019-11-12 15:40:02 +00:00
xul Bug 1626539 - Remove the dlgType property from XUL buttons. r=bgrins 2020-04-01 15:08:08 +00:00