gecko-dev/xpfe/appshell
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
..
test Bug 1644863 - fix trailing whitespace in cross-tree tests, r=emilio,marionette-reviewers,whimboo 2020-06-17 22:45:31 +00:00
AppWindow.cpp Backed out 2 changesets (bug 1656526) for build bustages on EarlyBlankWindow.cpp. CLOSED TREE 2020-08-18 19:10:37 +03:00
AppWindow.h Backed out 2 changesets (bug 1656526) for build bustages on EarlyBlankWindow.cpp. CLOSED TREE 2020-08-18 19:10:37 +03:00
components.conf Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi 2020-07-09 21:42:25 +00:00
LiveResizeListener.h
moz.build
nsAppShellCID.h
nsAppShellService.cpp Bug 1653124 - Use nsDocShell directly in AppWindow; r=nika 2020-07-16 20:41:45 +00:00
nsAppShellService.h
nsAppShellWindowEnumerator.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
nsAppShellWindowEnumerator.h
nsChromeTreeOwner.cpp Bug 1653214 - Part 2: Remove nsIBaseWindow::Create; r=nika 2020-07-16 20:42:20 +00:00
nsChromeTreeOwner.h
nsContentTreeOwner.cpp 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
nsContentTreeOwner.h
nsIAppShellService.idl Bug 1580811 - Make the ContentPage browser work with out-of-process frames, r=nika,zombie 2020-07-10 13:40:51 +00:00
nsIAppWindow.idl
nsIWindowlessBrowser.idl
nsIWindowMediator.idl
nsIWindowMediatorListener.idl
nsIXULBrowserWindow.idl
nsWindowMediator.cpp Bug 1645339 - Use range-based for with nsTObserverArray in xpfe. r=smaug 2020-06-16 10:16:46 +00:00
nsWindowMediator.h