diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index 8dada6327322..a4e1d7141319 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -932,3 +932,19 @@ index 63f170c95050416c595e62f4c460c4cd6b7dbd1c..157e3d046889f9c63fdf0fd5d503890f // Does bookkeeping when an error occurs. virtual mojom::ResultCode OnError(); +diff --git a/printing/printing_context_linux.cc b/printing/printing_context_linux.cc +index fa55d2a1c5f4207cb8eda9305e8bf2af29352c91..13ca65c2c7c3c24882061d8e224bf93899d9a7ab 100644 +--- a/printing/printing_context_linux.cc ++++ b/printing/printing_context_linux.cc +@@ -52,9 +52,8 @@ void PrintingContextLinux::AskUserForSettings(int max_pages, + bool is_scripted, + PrintSettingsCallback callback) { + if (!print_dialog_) { +- // Can only get here if the renderer is sending bad messages. +- // http://crbug.com/341777 +- NOTREACHED(); ++ print_dialog_ = ui::LinuxUi::instance()->CreatePrintDialog(this); ++ print_dialog_->UseDefaultSettings(); + } + + print_dialog_->ShowDialog(delegate_->GetParentView(), has_selection, diff --git a/shell/browser/feature_list.cc b/shell/browser/feature_list.cc index e6249b383fda..676a2fae9e0d 100644 --- a/shell/browser/feature_list.cc +++ b/shell/browser/feature_list.cc @@ -61,14 +61,6 @@ void InitializeFeatureList() { std::string(",") + features::kMacWebContentsOcclusion.name; #endif -#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PRINTING) - disable_features += - // EnableOopPrintDrivers is still a bit half-baked on Linux and - // causes crashes when trying to show dialogs. - // TODO(codebytere): figure out how to re-enable this with our patches. - std::string(",") + printing::features::kEnableOopPrintDrivers.name; -#endif - #if BUILDFLAG(ENABLE_PDF_VIEWER) // Enable window.showSaveFilePicker api for saving pdf files. // Refs https://issues.chromium.org/issues/373852607