Bug 1898184 - Don't set the forPreview flag if the prefer_system_dialog pref is set, to avoid blocking forever in nsGlobalWindowOuter::Print. a=dmeehan

Original Revision: https://phabricator.services.mozilla.com/D224950

Differential Revision: https://phabricator.services.mozilla.com/D226807
This commit is contained in:
Jonathan Kew 2024-10-30 13:44:50 +00:00
parent 14e09f3679
commit d3ce586511

View file

@ -5005,7 +5005,9 @@ void nsGlobalWindowOuter::PrintOuter(ErrorResult& aError) {
} }
}); });
const bool forPreview = !StaticPrefs::print_always_print_silent(); const bool forPreview =
!StaticPrefs::print_always_print_silent() &&
!Preferences::GetBool("print.prefer_system_dialog", false);
Print(nullptr, nullptr, nullptr, nullptr, IsPreview(forPreview), Print(nullptr, nullptr, nullptr, nullptr, IsPreview(forPreview),
IsForWindowDotPrint::Yes, nullptr, nullptr, aError); IsForWindowDotPrint::Yes, nullptr, nullptr, aError);
#endif #endif