From f1176be74976f64a0fe5e7496584a945af05538a Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 10:57:43 +0100 Subject: [PATCH] build: remove PDF edited saved files patch (#45614) Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- patches/chromium/.patches | 1 - ...x_crash_when_saving_edited_pdf_files.patch | 52 ------------------- 2 files changed, 53 deletions(-) delete mode 100644 patches/chromium/fix_crash_when_saving_edited_pdf_files.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 7a6a6df5bc38..a6874ad37b45 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -73,7 +73,6 @@ feat_add_data_parameter_to_processsingleton.patch load_v8_snapshot_in_browser_process.patch fix_adapt_exclusive_access_for_electron_needs.patch fix_aspect_ratio_with_max_size.patch -fix_crash_when_saving_edited_pdf_files.patch port_autofill_colors_to_the_color_pipeline.patch fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch build_make_libcxx_abi_unstable_false_for_electron.patch diff --git a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch deleted file mode 100644 index 8cb609acd5bc..000000000000 --- a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Mon, 17 Jan 2022 23:47:54 +0100 -Subject: fix: crash when saving edited PDF files - -Originally, this patch contained a code change. Since then, the code has -been upstreamed[1] but placed behind a flag. This patch now enables the -flag by default, therefore using the code fix from the original patch. - -This flag will eventually be removed and the original code fix will be -all that is left behind. When that happens, this patch will be safe to -remove. - -[1]: https://chromium-review.googlesource.com/c/chromium/src/+/6205762 - -Original patch description: - -> This commit fixes a crash that persists any time a user attempts to -> download an edited PDF. This was happening because the logic flow for -> downloading of any edited PDF triggers a call to -> chrome.fileSystem.chooseEntry, which we do not support and which -> therefore causes unmapped page access crashes. -> -> This patch can be removed should we choose to support chrome.fileSystem -> or support it enough to fix the crash. - -diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts -index 0bab3a5c852357bb6dc7758e573093a080e06b79..594d168331eba048b4bc5d25ad6f6834e2e88360 100644 ---- a/chrome/browser/resources/pdf/pdf_viewer.ts -+++ b/chrome/browser/resources/pdf/pdf_viewer.ts -@@ -269,7 +269,7 @@ export class PdfViewerElement extends PdfViewerBaseElement { - // - protected pdfInk2Enabled_: boolean = false; - // -- private pdfUseShowSaveFilePicker_: boolean = false; -+ private pdfUseShowSaveFilePicker_: boolean = true; - private pluginController_: PluginController = PluginController.getInstance(); - protected printingEnabled_: boolean = false; - // -diff --git a/pdf/pdf_features.cc b/pdf/pdf_features.cc -index 387174b3ee8aa39f0e3c4c67274e8c6b738c889f..a8ee6d48009de8fb10eff8689a694ac2e60a3723 100644 ---- a/pdf/pdf_features.cc -+++ b/pdf/pdf_features.cc -@@ -55,7 +55,7 @@ BASE_FEATURE(kPdfTags, "PdfTags", base::FEATURE_DISABLED_BY_DEFAULT); - - BASE_FEATURE(kPdfUseShowSaveFilePicker, - "PdfUseShowSaveFilePicker", -- base::FEATURE_DISABLED_BY_DEFAULT); -+ base::FEATURE_ENABLED_BY_DEFAULT); - - BASE_FEATURE(kPdfUseSkiaRenderer, - "PdfUseSkiaRenderer",