mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 10:25:01 +00:00
044b3c4332
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 |
||
---|---|---|
.. | ||
test | ||
AppWindow.cpp | ||
AppWindow.h | ||
components.conf | ||
LiveResizeListener.h | ||
moz.build | ||
nsAppShellCID.h | ||
nsAppShellService.cpp | ||
nsAppShellService.h | ||
nsAppShellWindowEnumerator.cpp | ||
nsAppShellWindowEnumerator.h | ||
nsChromeTreeOwner.cpp | ||
nsChromeTreeOwner.h | ||
nsContentTreeOwner.cpp | ||
nsContentTreeOwner.h | ||
nsIAppShellService.idl | ||
nsIAppWindow.idl | ||
nsIWindowlessBrowser.idl | ||
nsIWindowMediator.idl | ||
nsIWindowMediatorListener.idl | ||
nsIXULBrowserWindow.idl | ||
nsWindowMediator.cpp | ||
nsWindowMediator.h |