Bug 1666827 - Mark browsing contexts where we host static documents as "printing". r=smaug
This prevents e.g. navigating the print preview document. I can try to come up with a test for this, though testing for something not happening is always a bit more annoying... :) Depends on D91438 Differential Revision: https://phabricator.services.mozilla.com/D91439
This commit is contained in:
@@ -5357,6 +5357,8 @@ Nullable<WindowProxyHolder> nsGlobalWindowOuter::Print(
|
||||
aError.ThrowNotAllowedError("No browsing context");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Unused << bc->Top()->SetIsPrinting(true);
|
||||
nsCOMPtr<nsIDocShell> cloneDocShell = bc->GetDocShell();
|
||||
MOZ_DIAGNOSTIC_ASSERT(cloneDocShell);
|
||||
cloneDocShell->GetContentViewer(getter_AddRefs(cv));
|
||||
|
||||
Reference in New Issue
Block a user