From def92d1b8e9d373e2f6f27c366d578d97d8960c6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:50 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- dom/ipc/PBrowser.ipdl | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'dom/ipc/PBrowser.ipdl') diff --git a/dom/ipc/PBrowser.ipdl b/dom/ipc/PBrowser.ipdl index caef472ec2..372a81b139 100644 --- a/dom/ipc/PBrowser.ipdl +++ b/dom/ipc/PBrowser.ipdl @@ -87,7 +87,7 @@ using nsCursor from "nsIWidget.h"; using struct LookAndFeelInt from "mozilla/widget/WidgetMessageUtils.h"; using struct mozilla::DimensionRequest from "mozilla/widget/WidgetMessageUtils.h"; using class mozilla::dom::MessagePort from "mozilla/dom/MessagePort.h"; -using class mozilla::dom::ipc::StructuredCloneData from "mozilla/dom/ipc/StructuredCloneData.h"; +[MoveOnly=data] using class mozilla::dom::ipc::StructuredCloneData from "mozilla/dom/ipc/StructuredCloneData.h"; using mozilla::dom::MaybeDiscardedWindowContext from "mozilla/dom/WindowContext.h"; using mozilla::EventMessage from "mozilla/EventForwards.h"; using nsEventStatus from "mozilla/EventForwards.h"; @@ -960,8 +960,33 @@ child: * * @param aBrowsingContext the browsing context to print. * @param aPrintData the serialized settings to print with + * @param aReturnStaticClone If the document in aBrowsingContext is not a static clone, whether + * to return the static document clone created. + * Note that if you call this with true but do not later call PrintClonedPage(), + * you must call DestroyPrintCache() to avoid leaks. */ - async Print(MaybeDiscardedBrowsingContext aBC, PrintData aPrintData); + async Print(MaybeDiscardedBrowsingContext aBC, PrintData aPrintData, bool aReturnStaticClone) returns(MaybeDiscardedBrowsingContext staticCloneBrowsingContext); + + /** + * Tell the child to print the passed in static clone browsing context with the given settings. + * + * @param aBrowsingContext the browsing context to print. + * @param aPrintData the serialized settings to print with + * @param aStaticCloneBrowsingContext The static clone of aBrowsingContext that + * was created by an earlier call to Print(). This is the page that will actually be + * printed. + */ + async PrintClonedPage(MaybeDiscardedBrowsingContext aBC, PrintData aPrintData, MaybeDiscardedBrowsingContext aStaticCloneBrowsingContext); + + /** + * Destroy the static document clone for printing, if present. See Print() for details. + * For callers' simplicity, it is safe to call this method even if aStaticCloneBrowsingContext + * is null or has already been discarded. + * + * @param aStaticCloneBrowsingContext The static clone that was created by + * an earlier call to Print(). + */ + async DestroyPrintClone(MaybeDiscardedBrowsingContext aStaticCloneBrowsingContext); /** * Update the child with the tab's current top-level native window handle. -- cgit v1.2.3