From 68c541380ecf4a8e67d23fab9bb0fa66cf700289 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Mon, 28 Feb 2022 14:37:30 -0500 Subject: [PATCH] chore: bump chromium to 100.0.4894.0 (18-x-y) (#33093) * chore: bump chromium to 100.0.4857.0 (main) (#32419) * chore: bump chromium in DEPS to 99.0.4819.0 * chore: update patches * chore: bump chromium in DEPS to 99.0.4824.0 * chore: update patches * chore: bump chromium in DEPS to 99.0.4827.0 * chore: update patches * 3352511: PiP: Add inkdrop and pointer cursor to PiP window buttons https://chromium-review.googlesource.com/c/chromium/src/+/3352511 * 3309164: webhid: Show FIDO devices in the chooser if allowed https://chromium-review.googlesource.com/c/chromium/src/+/3309164 * 3297868: hid: Add experimental HIDDevice.forget() https://chromium-review.googlesource.com/c/chromium/src/+/3297868 * 3362491: [Extensions] Move i18n API to //extensions https://chromium-review.googlesource.com/c/chromium/src/+/3362491 * MCC Refactor step0: Allow embedders to register associated_interface binders with RenderFrameHostImpl::associated_registry_. https://chromium-review.googlesource.com/c/chromium/src/+/3281481 * 3352616: [Gtk] Remove libgtk from the link-line https://chromium-review.googlesource.com/c/chromium/src/+/3352616 * 3249211: Clear-Site-Data support for partitioned cookies https://chromium-review.googlesource.com/c/chromium/src/+/3249211 * [Extensions][COIL] Use [allow|block]list in //extensions/common https://chromium-review.googlesource.com/c/chromium/src/+/3372668 * Begin ScopedUserPrefUpdate migration to modern base::Value https://chromium-review.googlesource.com/c/chromium/src/+/3376154 * [Code Health] Refactor PrefService GetDict + GetList to use base::Value https://chromium-review.googlesource.com/c/chromium/src/+/3343526 * 3354997: [CodeHealth] Remove deprecated SetDictionary method https://chromium-review.googlesource.com/c/chromium/src/+/3354997 * 3287323: Add LacrosPrefStore for lacros settings https://chromium-review.googlesource.com/c/chromium/src/+/3287323 * 3365916: [PA] Clean up remaining lazy commit code https://chromium-review.googlesource.com/c/chromium/src/+/3365916 * [MPArch] Target the external protocol error at the responsible frame. https://chromium-review.googlesource.com/c/chromium/src/+/3011560 * Pass origin to RegisterNonNetworkSubresourceURLLoaderFactories https://chromium-review.googlesource.com/c/chromium/src/+/3350608 * Linux: Send OSCrypt raw encryption key to the Network Service https://chromium-review.googlesource.com/c/chromium/src/+/3320484 * [PlzServiceWorker] Remove remaining references to PlzServiceWorker. https://chromium-review.googlesource.com/c/chromium/src/+/3359441 * chore: fixup for lint * 3327621: Fix tablet mode detection for Win 11. https://chromium-review.googlesource.com/c/chromium/src/+/3327621 * 3342428: ax_mac: move AXTextMarker conversion utils under ui umbrella https://chromium-review.googlesource.com/c/chromium/src/+/3342428 * 3353974: Mac: Use base::Feature for overlay features https://chromium-review.googlesource.com/c/chromium/src/+/3353974 * chore: bump chromium in DEPS to 99.0.4828.0 * chore: update patches * chore: bump chromium in DEPS to 99.0.4837.0 * chore: update patches * chore: update patches * 3379142: Drop FALLTHROUGH macro Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3379142 * 3381749: C++17: Allow use of std::map::try_emplace and std::map::insert_or_assign Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3381749 * chore: bump chromium in DEPS to 99.0.4839.0 * chore: update patches * chore: bump chromium in DEPS to 99.0.4840.0 * chore: bump chromium in DEPS to 99.0.4844.0 * 3395881: [api] Deprecate Local v8::Object::CreationContext() Ref: https://chromium-review.googlesource.com/c/v8/v8/+/3395881 * chore: update patches * chore: bump chromium in DEPS to 100.0.4845.0 * chore: update patches * chore: bump chromium in DEPS to 100.0.4847.0 * chore: update patches * chore: bump chromium in DEPS to 100.0.4849.0 * chore: update patches * chore: bump chromium in DEPS to 100.0.4851.0 * chore: bump chromium in DEPS to 100.0.4853.0 * update patches * chore: update patches * update patches * 3383599: Fonts Access: Remove prototype that uses a font picker. https://chromium-review.googlesource.com/c/chromium/src/+/3383599 * 3404768: Remove ALLOW_UNUSED macros https://chromium-review.googlesource.com/c/chromium/src/+/3404768 * 3374762: Remove ignore_result.h https://chromium-review.googlesource.com/c/chromium/src/+/3374762 * 3399305: [unseasoned-pdf] Apply proper frame offsets for touch selections https://chromium-review.googlesource.com/c/chromium/src/+/3399305 * 3402210: [Extensions] Don't trigger unload event for already unloaded extension https://chromium-review.googlesource.com/c/chromium/src/+/3402210 * 3410912: Combine URLLoaderClient OnReceiveResponse and OnStartLoadingResponseBody. https://chromium-review.googlesource.com/c/chromium/src/+/3410912 * 3370428: Make the AuthSchemes policy support dynamic refresh https://chromium-review.googlesource.com/c/chromium/src/+/3370428 * 3407603: Finish ScopedUserPrefUpdate migration to modern base::Value https://chromium-review.googlesource.com/c/chromium/src/+/3407603 * 3378352: ozone/x11: move code from //ui/p/x11 to //ui/ozone/p/x11 https://chromium-review.googlesource.com/c/chromium/src/+/3378352 * 3370810: Delete chrome/service, AKA the Cloud Print service process. https://chromium-review.googlesource.com/c/chromium/src/+/3370810 * chore: bump chromium in DEPS to 100.0.4855.0 * chore: update patches * fixup! 3370810: Delete chrome/service, AKA the Cloud Print service process. * revert 3348007 to fix windows build * 3318572: [Code health] Fix gn check errors in //extensions/browser:* https://chromium-review.googlesource.com/c/chromium/src/+/3318572 * fix printing.patch * fix iwyu issue * 3408515: win: Make ShorcutOperation an enum class and modernize names https://chromium-review.googlesource.com/c/chromium/src/+/3408515 * 3388333: [UIA] Remove dead code accessibility_misc_utils.h/cc https://chromium-review.googlesource.com/c/chromium/src/+/3388333 * fix windows build? i hope * patch gn visibility of //ui/ozone/platform/x11 * missing include base/logging.h * use BUILDFLAG for USE_NSS_CERTS https://chromium-review.googlesource.com/c/chromium/src/+/3379123 * defined(OS_*) ==> BUILDFLAG(IS_*) https://bugs.chromium.org/p/chromium/issues/detail?id=1234043 * fixup! 3404768: Remove ALLOW_UNUSED macros * another attempt to fix windows build * temporarily disable the custom scheme service worker test https://github.com/electron/electron/issues/32664 * fix loading mv3 extensions not sure what cl broke this unfort. * fixup! 3404768: Remove ALLOW_UNUSED macros * patch nan https://chromium-review.googlesource.com/c/v8/v8/+/3395880 * fix node test * fix nullptr in FindPdfFrame * patch perfetto to fix build issue on win-ia32 https://source.chromium.org/chromium/_/android/platform/external/perfetto.git/+/bc44c3c7533c00e56f88c06c592d634aecc884be * fix build for linux-x64-testing-no-run-as-node * fix patch * skip .capturePage() test https://github.com/electron/electron/issues/32705 * test: fix failing tests of focus/blur events of WebContents (#32711) * inherit stdio from app module test child processes this prevents them from timing out due to full stdout buffers * test to see if we can get better logs on windows ci * try again for appveyor log things * skip contentTracing tests on ia32 * ci: disable gpu compositing * drop applied patch * fix merge fail * Revert "ci: disable gpu compositing" This reverts commit 0344129fcb19ea3e87e06c1110d751f22eba3fec. Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt Co-authored-by: VerteDinde Co-authored-by: VerteDinde Co-authored-by: Jeremy Rose Co-authored-by: Jeremy Rose Co-authored-by: Cheng Zhao Co-authored-by: deepak1556 (cherry picked from commit 28ada6ea8bd2abeca8812e6d284c1f5f3974286b) * chore: bump chromium to 100.0.4894.0 (main) (#32852) * chore: bump chromium in DEPS to 100.0.4880.0 * resolve conflicts * chore: update patches * fix patch * PIP20: add a new DocumentOverlayWindowViews subtype https://chromium-review.googlesource.com/c/chromium/src/+/3252789 * Clean up PictureInPictureWindowManager::EnterPictureInPicture() https://chromium-review.googlesource.com/c/chromium/src/+/3424145 * Remove StoragePartitionId. https://chromium-review.googlesource.com/c/chromium/src/+/2811120 * Remove FLoC code https://chromium-review.googlesource.com/c/chromium/src/+/3424359 * media: Make AddSupportedKeySystems() Async https://chromium-review.googlesource.com/c/chromium/src/+/3430502 * [Extensions] Move some l10n file util methods to //extensions/browser https://chromium-review.googlesource.com/c/chromium/src/+/3408192 * chore: IWYU * Reland "webhid: Grant permissions for policy-allowed devices" https://chromium-review.googlesource.com/c/chromium/src/+/3444147 * Migrate base::Value::GetList() to base::Value::GetListDeprecated(): 2/N. https://chromium-review.googlesource.com/c/chromium/src/+/3435727 https://chromium-review.googlesource.com/c/chromium/src/+/3440910 https://chromium-review.googlesource.com/c/chromium/src/+/3440088 * [text blink period] Cache blink period instead of fetching from defaults https://chromium-review.googlesource.com/c/chromium/src/+/3419059 * chore: update picture-in-picture.patch https://chromium-review.googlesource.com/c/chromium/src/+/3252789 * ci: update to Xcode 13.2.1 https://chromium-review.googlesource.com/c/chromium/src/+/3437552 * chore: bump chromium in DEPS to 100.0.4882.1 * chore: update patches * chore: bump chromium in DEPS to 100.0.4884.0 * chore: update patches * chore: bump chromium in DEPS to 100.0.4886.0 * chore: update patches * Refactor DownloadManager to use StoragePartitionConfig https://chromium-review.googlesource.com/c/chromium/src/+/3222011 * Remove ToWebInputElement() in favor of new WebNode::DynamicTo<> helpers. https://chromium-review.googlesource.com/c/chromium/src/+/3433852 * refactor: autofill to use the color pipeline https://bugs.chromium.org/p/chromium/issues/detail?id=1249558 https://bugs.chromium.org/p/chromium/issues/detail?id=1003612 * [ProcessSingleton] Add many more trace events to cover all scenarios https://chromium-review.googlesource.com/c/chromium/src/+/3429325 * fixup! PIP20: add a new DocumentOverlayWindowViews subtype * chore: bump chromium in DEPS to 100.0.4888.0 * chore: update patches * chore: update picture-in-picture.patch * fixup! refactor: autofill to use the color pipeline * ci: fixup fix sync (cherry picked from commit c1e3e395465739bce5ca8e1c5ec1f5bd72b99ebd) * chore: bump chromium in DEPS to 100.0.4889.0 * chore: update patches * chore: fix feat_add_data_transfer_to_requestsingleinstancelock.patch * fixup! PIP20: add a new DocumentOverlayWindowViews subtype * Remove remaining NativeTheme::GetSystemColor() machinery. https://chromium-review.googlesource.com/c/chromium/src/+/3421719 * ci: fetch proper esbuild for macos * ci: fixup fetch proper esbuild for macos * fix: failing Node.js test on outdated CurrentValueSerializerFormatVersion * chore: bump chromium in DEPS to 100.0.4892.0 * 3460365: Set V8 fatal error callbacks during Isolate initialization https://chromium-review.googlesource.com/c/chromium/src/+/3460365 * 3454343: PIP20: use permanent top controls https://chromium-review.googlesource.com/c/chromium/src/+/3454343 * 3465574: Move most of GTK color mixers to ui/color/. https://chromium-review.googlesource.com/c/chromium/src/+/3465574 * chore: fixup patch indices * 3445327: [locales] Remove locales reference https://chromium-review.googlesource.com/c/chromium/src/+/3445327 * 3456548: [DBB][#7] Blue border falls back to all tab if cropped-to zero pixels https://chromium-review.googlesource.com/c/chromium/src/+/3456548 * 3441196: Convert GuestView's remaining legacy IPC messages to Mojo https://chromium-review.googlesource.com/c/chromium/src/+/3441196 * 3455491: Don't include run_loop.h in thread_task_runner_handle.h https://chromium-review.googlesource.com/c/chromium/src/+/3455491 * fixup! 3454343: PIP20: use permanent top controls * 3442501: Add missing includes of //base/observer_list.h https://chromium-review.googlesource.com/c/chromium/src/+/3442501 * 3437552: mac: Deploy a new hermetic build of Xcode 13.2.1 13C100 https://chromium-review.googlesource.com/c/chromium/src/+/3437552 * chore: bump chromium in DEPS to 100.0.4894.0 * fixup! 3460365: Set V8 fatal error callbacks during Isolate initialization * chore: update patches * 3425231: Use DnsOverHttpsConfig where appropriate https://chromium-review.googlesource.com/c/chromium/src/+/3425231 * test: disable test-heapsnapshot-near-heap-limit-worker.js As a result of CLs linked in https://bugs.chromium.org/p/v8/issues/detail?id=12503, heap snapshotting near the heap limit DCHECKS in Node.js specs. This will likely require a larger refactor in Node.js so i've disabled the test for now and opened an upstream issue on node-v8 issue at https://github.com/nodejs/node-v8/issues/218. * Port all usage of NativeTheme color IDs to color pipeline https://bugs.chromium.org/p/chromium/issues/detail?id=1249558 * chore: update patches after rebase * ci: use gen2 machine for more disk space * ci: don't try to make root volume writeable * ci: use older xcode/macos for tests * fix: html fullscreen transitions stacking (cherry picked from commit 5e10965cdd7b2a024def5fc568912cefd0f05b44) * ci: speed up woa testing (cherry picked from commit 75c33c48b032137794f5734348a9ee3daa60d9de) (cherry picked from commit e81996234029669663bf0daaababd34684dcbb17) * ci: disable flaky tests on WOA * ci: run remote tests separately to isolate issue there * tests: disable node test parallel/test-worker-debug for now * revert: fix: html fullscreen transitions stacking * tests: disable flaky test on macOS arm64 * fixup circleci config so build tools can find xcode version * make sure the workspace is clean before job runs (cherry picked from commit 75f713c9748ac1a356846c39f268886130554fd6) * tests: disable flaky test on Linux * ci: debug why windows i32 is crashing * Revert "ci: debug why windows i32 is crashing" This reverts commit 4c4bba87ea76f16ef3b304dadff59ad4d366f60f. Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Jeremy Rose Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 Co-authored-by: John Kleinschmidt Co-authored-by: Shelley Vohr (cherry picked from commit 3da598015bccb8f9ab6833d1163c2fe2b0f2b058) Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> --- .circleci/build_config.yml | 121 +++-- BUILD.gn | 7 +- DEPS | 2 +- appveyor.yml | 8 +- azure-pipelines-woa.yml | 69 +-- chromium_src/BUILD.gn | 19 +- electron_paks.gni | 4 +- filenames.gni | 4 - patches/boringssl/expose_ripemd160.patch | 2 +- patches/chromium/.patches | 6 +- patches/chromium/accelerator.patch | 8 +- ...client_precreatemessageloop_callback.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 30 +- ...pedcliboardwriter_writeunsaferawdata.patch | 12 +- ..._scheduler_throttling_per_renderview.patch | 22 +- ..._windows_to_have_different_web_prefs.patch | 20 +- ...leges_in_unsandboxed_child_processes.patch | 2 +- patches/chromium/blink_file_path.patch | 4 +- patches/chromium/blink_local_frame.patch | 10 +- patches/chromium/boringssl_build_gn.patch | 4 +- ..._node_processes_as_browser_processes.patch | 4 +- .../build_add_electron_tracing_category.patch | 4 +- ..._depend_on_packed_resource_integrity.patch | 22 +- .../build_libc_as_static_library.patch | 6 +- patches/chromium/can_create_window.patch | 50 +- ..._v8_initialization_isolate_callbacks.patch | 4 +- ...screationoverridden_with_full_params.patch | 50 +- ...esources_not_chrome_for_spellchecker.patch | 14 +- patches/chromium/chrome_key_systems.patch | 4 +- patches/chromium/command-ismediakey.patch | 4 +- ...allow_disabling_compression_on_linux.patch | 8 +- .../crash_allow_setting_more_options.patch | 20 +- patches/chromium/dcheck.patch | 7 +- patches/chromium/desktop_media_list.patch | 14 +- patches/chromium/disable-redraw-lock.patch | 6 +- .../disable_color_correct_rendering.patch | 63 ++- .../disable_compositor_recycling.patch | 2 +- patches/chromium/disable_hidden.patch | 10 +- patches/chromium/disable_unload_metrics.patch | 6 +- ...ythreadcreated_if_pcscan_is_disabled.patch | 24 +- ...ll_getwebframe_-_view_when_get_blink.patch | 4 +- ...ingcontext_calls_to_newpage_pagedone.patch | 511 ------------------ patches/chromium/dump_syms.patch | 4 +- .../chromium/enable_reset_aspect_ratio.patch | 6 +- ...locator_for_usage_outside_of_the_gin.patch | 2 +- ...xpose_setuseragent_on_networkcontext.patch | 20 +- .../extend_apply_webpreferences.patch | 10 +- ...ransfer_to_requestsingleinstancelock.patch | 76 +-- ...dd_set_theme_source_to_allow_apps_to.patch | 21 +- ..._registry_to_multibuffer_data_source.patch | 4 +- ...g_the_base_spellchecker_download_url.patch | 4 +- ...to_add_observers_on_created_hunspell.patch | 8 +- ...screen_rendering_with_viz_compositor.patch | 56 +- ..._raw_response_headers_from_urlloader.patch | 48 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...x_crash_when_saving_edited_pdf_files.patch | 6 +- ...ed_windows_when_calling_showinactive.patch | 42 -- ...ete_SerialPortManager_on_main_thread.patch | 2 +- ...ntcapturercount_in_web_contents_impl.patch | 10 +- ...media_key_usage_with_globalshortcuts.patch | 4 +- ...rmissions_checks_in_exclusive_access.patch | 4 +- ...out_profile_refs_in_accessibility_ui.patch | 20 +- ..._properly_honor_printing_page_ranges.patch | 4 +- ...fix_use_electron_generated_resources.patch | 2 +- patches/chromium/frame_host_manager.patch | 8 +- .../gin_enable_disable_v8_platform.patch | 14 +- ...gpu_notify_when_dxdiag_request_fails.patch | 12 +- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/chromium/gtk_visibility.patch | 32 +- ...nse_interceptor_to_point_to_electron.patch | 4 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 6 +- patches/chromium/isolate_holder.patch | 32 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- ...reate_a_console_if_logging_to_stderr.patch | 6 +- ...clude_of_stack_trace_h_unconditional.patch | 24 - patches/chromium/mas-cfisobjc.patch | 8 +- .../mas-cgdisplayusesforcetogray.patch | 4 +- .../mas_disable_remote_accessibility.patch | 48 +- .../chromium/mas_disable_remote_layer.patch | 36 +- patches/chromium/mas_no_private_api.patch | 32 +- ...emote_certificate_verification_logic.patch | 26 +- .../chromium/notification_provenance.patch | 6 +- patches/chromium/pepper_plugin_support.patch | 28 +- patches/chromium/picture-in-picture.patch | 217 ++++++-- ...utofill_colors_to_the_color_pipeline.patch | 97 ++++ patches/chromium/printing.patch | 145 ++--- patches/chromium/process_singleton.patch | 74 +-- patches/chromium/proxy_config_monitor.patch | 2 +- ...put_back_deleted_colors_for_autofill.patch | 117 ---- ...r_changes_to_the_webcontentsobserver.patch | 16 +- ...store_base_adaptcallbackforrepeating.patch | 2 +- ...f_incognito_apis_in_the_spellchecker.patch | 4 +- .../render_widget_host_view_base.patch | 6 +- .../render_widget_host_view_mac.patch | 14 +- patches/chromium/resource_file_conflict.patch | 6 +- ..._using_nsrunloop_in_renderer_process.patch | 28 - patches/chromium/scroll_bounce_flag.patch | 4 +- .../chromium/skip_atk_toolchain_check.patch | 4 +- .../support_mixed_sandbox_with_zygote.patch | 14 +- patches/chromium/ui_gtk_public_header.patch | 10 +- ...andboxed_ppapi_processes_skip_zygote.patch | 10 +- .../v8_context_snapshot_generator.patch | 4 +- patches/chromium/web_contents.patch | 12 +- patches/chromium/webview_cross_drag.patch | 4 +- patches/chromium/webview_fullscreen.patch | 4 +- .../worker_context_will_destroy.patch | 16 +- ...feat_add_hook_to_notify_script_ready.patch | 22 +- patches/config.json | 4 + ...bals_to_allow_patching_devtools_dock.patch | 4 +- patches/nan/.patches | 1 + ...use_new_constructor_for_scriptorigin.patch | 42 ++ patches/node/.patches | 2 + ...fix_failing_node_js_test_on_outdated.patch | 35 ++ patches/node/fix_serdes_test.patch | 36 ++ patches/perfetto/.patches | 1 + ...size_t_to_be_intptr_t_to_match_libuv.patch | 26 + patches/v8/.patches | 2 +- patches/v8/build_gn.patch | 8 +- patches/v8/dcheck.patch | 8 +- ...export_private_v8_symbols_on_windows.patch | 4 +- ...ort_symbols_needed_for_windows_build.patch | 4 +- patches/v8/expose_mksnapshot.patch | 4 +- ...ed_attirbute_for_older_msvc_versions.patch | 2 +- ...dcheck_for_node_stream_array_buffers.patch | 4 +- ...in_v8_scriptormodule_legacy_lifetime.patch | 56 -- ...eleted_cstors_in_cppheapcreateparams.patch | 21 + ...workaround_an_undefined_symbol_error.patch | 8 +- script/node-disabled-tests.json | 2 + .../zip_manifests/dist_zip.mac.arm64.manifest | 4 +- .../zip_manifests/dist_zip.mac.x64.manifest | 4 +- .../dist_zip.mac_mas.arm64.manifest | 4 +- .../dist_zip.mac_mas.x64.manifest | 4 +- shell/app/electron_content_client.cc | 4 +- shell/app/electron_crash_reporter_client.cc | 18 +- shell/app/electron_crash_reporter_client.h | 10 +- shell/app/electron_library_main.h | 4 +- shell/app/electron_main_delegate.cc | 48 +- shell/app/electron_main_delegate.h | 4 +- shell/app/electron_main_linux.cc | 13 +- shell/app/electron_main_mac.cc | 2 +- shell/app/electron_main_win.cc | 2 +- shell/app/node_main.cc | 14 +- shell/app/uv_stdio_fix.cc | 12 +- shell/app/uv_task_runner.cc | 1 + shell/app/uv_task_runner.h | 3 +- shell/browser/api/electron_api_app.cc | 114 ++-- shell/browser/api/electron_api_app.h | 21 +- shell/browser/api/electron_api_base_window.cc | 24 +- shell/browser/api/electron_api_base_window.h | 8 +- .../api/electron_api_browser_window.cc | 24 +- .../browser/api/electron_api_browser_window.h | 2 +- .../api/electron_api_crash_reporter.cc | 18 +- .../browser/api/electron_api_crash_reporter.h | 2 +- .../api/electron_api_desktop_capturer.cc | 14 +- .../api/electron_api_desktop_capturer.h | 4 +- shell/browser/api/electron_api_dialog.cc | 2 +- .../api/electron_api_global_shortcut.cc | 8 +- .../api/electron_api_in_app_purchase.cc | 4 +- shell/browser/api/electron_api_menu.cc | 10 +- shell/browser/api/electron_api_menu.h | 4 +- .../browser/api/electron_api_native_theme.cc | 6 +- shell/browser/api/electron_api_native_theme.h | 2 +- shell/browser/api/electron_api_net.cc | 1 + .../browser/api/electron_api_power_monitor.cc | 8 +- .../browser/api/electron_api_power_monitor.h | 10 +- shell/browser/api/electron_api_screen.cc | 6 +- shell/browser/api/electron_api_session.cc | 8 +- .../api/electron_api_system_preferences.cc | 10 +- .../api/electron_api_system_preferences.h | 16 +- shell/browser/api/electron_api_tray.cc | 16 +- shell/browser/api/electron_api_url_loader.cc | 11 +- shell/browser/api/electron_api_url_loader.h | 10 +- .../browser/api/electron_api_web_contents.cc | 88 +-- shell/browser/api/electron_api_web_contents.h | 10 +- .../api/electron_api_web_contents_view.cc | 6 +- shell/browser/api/frame_subscriber.cc | 2 + shell/browser/api/frame_subscriber.h | 1 + shell/browser/api/gpu_info_enumerator.cc | 18 +- shell/browser/api/gpuinfo_manager.cc | 2 +- shell/browser/api/process_metric.cc | 14 +- shell/browser/api/process_metric.h | 12 +- shell/browser/auto_updater.cc | 2 +- shell/browser/browser.cc | 6 +- shell/browser/browser.h | 40 +- shell/browser/browser_linux.cc | 4 +- shell/browser/browser_observer.h | 2 +- shell/browser/browser_process_impl.cc | 11 +- shell/browser/browser_process_impl.h | 5 +- shell/browser/electron_browser_client.cc | 204 ++++--- shell/browser/electron_browser_client.h | 30 +- shell/browser/electron_browser_context.cc | 2 +- shell/browser/electron_browser_main_parts.cc | 79 ++- shell/browser/electron_browser_main_parts.h | 16 +- .../electron_download_manager_delegate.cc | 4 +- shell/browser/electron_gpu_client.cc | 4 +- ...electron_pdf_web_contents_helper_client.cc | 11 + .../electron_pdf_web_contents_helper_client.h | 2 + shell/browser/electron_permission_manager.cc | 8 +- shell/browser/extensions/api/BUILD.gn | 1 - .../cryptotoken_private_api.cc | 10 +- shell/browser/extensions/api/i18n/i18n_api.cc | 24 - shell/browser/extensions/api/i18n/i18n_api.h | 20 - .../electron_extension_host_delegate.cc | 4 +- .../electron_extension_host_delegate.h | 4 +- .../electron_extension_message_filter.cc | 8 +- .../extensions/electron_extension_system.cc | 3 +- .../extensions/electron_extension_system.h | 3 +- ...lectron_extensions_browser_api_provider.cc | 2 +- .../electron_extensions_browser_client.cc | 4 +- shell/browser/feature_list.cc | 8 +- shell/browser/file_select_helper.cc | 14 +- shell/browser/file_select_helper.h | 4 +- .../font/electron_font_access_delegate.cc | 42 -- .../font/electron_font_access_delegate.h | 31 -- shell/browser/font_defaults.cc | 8 +- shell/browser/hid/electron_hid_delegate.cc | 11 +- shell/browser/hid/electron_hid_delegate.h | 6 +- shell/browser/javascript_environment.cc | 10 +- shell/browser/native_window.cc | 20 +- shell/browser/native_window.h | 8 +- shell/browser/native_window_observer.h | 4 +- shell/browser/native_window_views.cc | 132 ++--- shell/browser/native_window_views.h | 18 +- shell/browser/native_window_views_win.cc | 4 +- shell/browser/net/asar/asar_url_loader.cc | 3 +- .../net/electron_url_loader_factory.cc | 8 +- shell/browser/net/network_context_service.cc | 5 +- shell/browser/net/node_stream_loader.cc | 3 +- .../net/proxying_url_loader_factory.cc | 7 +- .../browser/net/proxying_url_loader_factory.h | 4 +- .../net/system_network_context_manager.cc | 71 +-- shell/browser/net/url_pipe_loader.cc | 3 +- .../win/windows_toast_notification.cc | 1 + shell/browser/osr/osr_host_display_client.cc | 4 +- shell/browser/osr/osr_host_display_client.h | 4 +- .../osr/osr_render_widget_host_view.cc | 2 +- .../browser/osr/osr_render_widget_host_view.h | 10 +- shell/browser/osr/osr_video_consumer.cc | 2 + shell/browser/osr/osr_video_consumer.h | 1 + shell/browser/osr/osr_web_contents_view.cc | 10 +- shell/browser/osr/osr_web_contents_view.h | 8 +- shell/browser/pref_store_delegate.h | 1 + shell/browser/protocol_registry.cc | 4 +- shell/browser/relauncher.cc | 16 +- shell/browser/relauncher.h | 6 +- .../browser/serial/serial_chooser_context.cc | 24 +- shell/browser/serial/serial_chooser_context.h | 8 +- .../serial/serial_chooser_controller.cc | 4 +- shell/browser/ui/autofill_popup.cc | 9 +- shell/browser/ui/autofill_popup.h | 4 +- shell/browser/ui/electron_menu_model.cc | 4 +- shell/browser/ui/electron_menu_model.h | 8 +- shell/browser/ui/gtk/app_indicator_icon.cc | 1 + shell/browser/ui/inspectable_web_contents.cc | 10 +- .../ui/inspectable_web_contents_view.h | 2 +- .../inspectable_web_contents_view_delegate.h | 2 +- shell/browser/ui/tray_icon.h | 6 +- shell/browser/ui/views/autofill_popup_view.cc | 18 +- .../ui/views/electron_views_delegate.cc | 8 +- .../ui/views/electron_views_delegate.h | 6 +- .../inspectable_web_contents_view_views.cc | 2 +- shell/browser/ui/views/menu_bar.cc | 29 +- shell/browser/ui/views/menu_bar.h | 2 +- shell/browser/ui/views/root_view.cc | 2 +- shell/browser/ui/views/submenu_button.cc | 2 +- shell/browser/web_contents_preferences.cc | 8 +- shell/browser/web_contents_preferences.h | 2 +- shell/browser/web_contents_zoom_controller.h | 1 + shell/browser/window_list.cc | 2 +- shell/browser/zoom_level_delegate.cc | 43 +- shell/common/api/electron_api_clipboard.cc | 8 +- shell/common/api/electron_api_native_image.cc | 24 +- shell/common/api/electron_api_native_image.h | 10 +- shell/common/api/electron_api_shell.cc | 15 +- shell/common/api/electron_api_v8_util.cc | 1 + shell/common/api/electron_bindings.cc | 12 +- shell/common/application_info.h | 6 +- shell/common/asar/archive.cc | 20 +- shell/common/asar/asar_util.cc | 2 +- shell/common/asar/scoped_temporary_file.cc | 4 +- shell/common/crash_keys.cc | 12 +- shell/common/electron_command_line.cc | 4 +- shell/common/electron_command_line.h | 2 +- shell/common/electron_paths.h | 14 +- shell/common/extensions/api/BUILD.gn | 2 - .../extensions/electron_extensions_client.cc | 2 +- .../extensions/electron_extensions_client.h | 2 +- shell/common/gin_converters/base_converter.h | 2 +- shell/common/gin_converters/guid_converter.h | 8 +- shell/common/gin_converters/net_converter.cc | 2 +- shell/common/gin_converters/std_converter.h | 6 +- shell/common/gin_helper/callback.h | 6 +- shell/common/keyboard_util.cc | 44 +- shell/common/logging.cc | 11 +- shell/common/node_bindings.cc | 12 +- shell/common/node_bindings.h | 2 +- shell/common/platform_util.h | 6 +- shell/common/platform_util_linux.cc | 1 + shell/common/skia_util.cc | 4 +- shell/common/skia_util.h | 2 +- shell/common/v8_value_converter.cc | 10 +- .../api/electron_api_context_bridge.cc | 9 +- shell/renderer/electron_api_service_impl.cc | 3 +- shell/renderer/electron_autofill_agent.cc | 25 +- .../electron_sandboxed_renderer_client.cc | 4 +- shell/renderer/renderer_client_base.cc | 12 +- shell/renderer/renderer_client_base.h | 4 +- .../electron_content_utility_client.cc | 30 +- .../utility/electron_content_utility_client.h | 8 - spec-main/api-app-spec.ts | 4 +- spec-main/api-content-tracing-spec.ts | 4 +- spec-main/api-protocol-spec.ts | 5 +- spec-main/api-web-frame-main-spec.ts | 5 +- spec-main/chromium-spec.ts | 6 +- spec-main/extensions-spec.ts | 6 +- spec-main/webview-spec.ts | 3 +- spec/webview-spec.js | 5 +- 317 files changed, 2446 insertions(+), 2817 deletions(-) delete mode 100644 patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch delete mode 100644 patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch delete mode 100644 patches/chromium/make_include_of_stack_trace_h_unconditional.patch create mode 100644 patches/chromium/port_autofill_colors_to_the_color_pipeline.patch delete mode 100644 patches/chromium/put_back_deleted_colors_for_autofill.patch delete mode 100644 patches/chromium/revert_stop_using_nsrunloop_in_renderer_process.patch create mode 100644 patches/nan/.patches create mode 100644 patches/nan/use_new_constructor_for_scriptorigin.patch create mode 100644 patches/node/fix_failing_node_js_test_on_outdated.patch create mode 100644 patches/node/fix_serdes_test.patch create mode 100644 patches/perfetto/.patches create mode 100644 patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch delete mode 100644 patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch create mode 100644 patches/v8/revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch delete mode 100644 shell/browser/extensions/api/i18n/i18n_api.cc delete mode 100644 shell/browser/extensions/api/i18n/i18n_api.h delete mode 100644 shell/browser/font/electron_font_access_delegate.cc delete mode 100644 shell/browser/font/electron_font_access_delegate.h diff --git a/.circleci/build_config.yml b/.circleci/build_config.yml index ff88d9a5188c6..92786e1398706 100644 --- a/.circleci/build_config.yml +++ b/.circleci/build_config.yml @@ -52,11 +52,17 @@ executors: parameters: size: description: "macOS executor size" - default: large + default: macos.x86.medium.gen2 type: enum - enum: ["medium", "large"] + enum: ["macos.x86.medium.gen2", "large"] + xcode: + description: "xcode version" + default: "12.4.0" + type: enum + enum: ["12.4.0", "13.2.1"] + macos: - xcode: "12.4.0" + xcode: << parameters.xcode >> resource_class: << parameters.size >> # Electron Runners @@ -349,10 +355,6 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac command: | if [ "`uname`" == "Darwin" ]; then sudo mkdir -p $TMPDIR/del-target - if [ "$TARGET_ARCH" == "arm64" ]; then - # Remount the root volume as writable, don't ask questions plz - sudo mount -uw / - fi tmpify() { if [ -d "$1" ]; then sudo mv "$1" $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1) @@ -394,33 +396,32 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac tmpify /usr/local/Homebrew sudo rm -rf $TMPDIR/del-target - if [ "$TARGET_ARCH" == "arm64" ]; then - sudo rm -rf "/System/Library/Desktop Pictures" - sudo rm -rf /System/Library/Templates/Data - sudo rm -rf /System/Library/Speech/Voices - sudo rm -rf "/System/Library/Screen Savers" - sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs - sudo rm -rf "/System/Volumes/Data/Library/Application Support/Apple/Photos/Print Products" - sudo rm -rf /System/Volumes/Data/Library/Java - sudo rm -rf /System/Volumes/Data/Library/Ruby - sudo rm -rf /System/Volumes/Data/Library/Printers - sudo rm -rf /System/iOSSupport - sudo rm -rf /System/Applications/*.app - sudo rm -rf /System/Applications/Utilities/*.app - sudo rm -rf /System/Library/LinguisticData - sudo rm -rf /System/Volumes/Data/private/var/db/dyld/* - # sudo rm -rf /System/Library/Fonts/* - # sudo rm -rf /System/Library/PreferencePanes - sudo rm -rf /System/Library/AssetsV2/* - sudo rm -rf /Applications/Safari.app - sudo rm -rf ~/project/src/build/linux - sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data - sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS - - # lipo off some huge binaries arm64 versions to save space - strip_arm_deep $(xcode-select -p)/../SharedFrameworks - strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr - fi + # sudo rm -rf "/System/Library/Desktop Pictures" + # sudo rm -rf /System/Library/Templates/Data + # sudo rm -rf /System/Library/Speech/Voices + # sudo rm -rf "/System/Library/Screen Savers" + # sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs + # sudo rm -rf "/System/Volumes/Data/Library/Application Support/Apple/Photos/Print Products" + # sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/ + # sudo rm -rf /System/Volumes/Data/Library/Java + # sudo rm -rf /System/Volumes/Data/Library/Ruby + # sudo rm -rf /System/Volumes/Data/Library/Printers + # sudo rm -rf /System/iOSSupport + # sudo rm -rf /System/Applications/*.app + # sudo rm -rf /System/Applications/Utilities/*.app + # sudo rm -rf /System/Library/LinguisticData + # sudo rm -rf /System/Volumes/Data/private/var/db/dyld/* + # sudo rm -rf /System/Library/Fonts/* + # sudo rm -rf /System/Library/PreferencePanes + # sudo rm -rf /System/Library/AssetsV2/* + sudo rm -rf /Applications/Safari.app + sudo rm -rf ~/project/src/build/linux + sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data + sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS + + # lipo off some huge binaries arm64 versions to save space + strip_arm_deep $(xcode-select -p)/../SharedFrameworks + # strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr fi background: true @@ -461,10 +462,18 @@ step-fix-sync: &step-fix-sync # Fix Clang Install (wrong binary) rm -rf src/third_party/llvm-build python3 src/tools/clang/scripts/update.py + + # Fix esbuild (wrong binary) + echo 'infra/3pp/tools/esbuild/${platform}' `gclient getdep --deps-file=src/third_party/devtools-frontend/src/DEPS -r 'third_party/esbuild:infra/3pp/tools/esbuild/${platform}'` > esbuild_ensure_file + cipd ensure --root src/third_party/devtools-frontend/src/third_party/esbuild -ensure-file esbuild_ensure_file fi cd src/third_party/angle + rm .git/objects/info/alternates git remote set-url origin https://chromium.googlesource.com/angle/angle.git + cp .git/config .git/config.backup + git remote remove origin + mv .git/config.backup .git/config git fetch step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac @@ -1893,7 +1902,9 @@ jobs: checkout: true osx-testing-x64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-testing-build @@ -1910,14 +1921,16 @@ jobs: osx-testing-x64-gn-check: executor: name: macos - size: medium + xcode: "13.2.1" environment: <<: *env-machine-mac <<: *env-testing-build <<: *steps-electron-gn-check osx-publish-x64-skip-checkout: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large-release <<: *env-release-build @@ -1936,7 +1949,9 @@ jobs: checkout: false osx-publish-arm64-skip-checkout: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large-release <<: *env-release-build @@ -1956,7 +1971,9 @@ jobs: checkout: false osx-testing-arm64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-testing-build @@ -1973,7 +1990,9 @@ jobs: attach: true mas-testing-x64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-mas @@ -1991,7 +2010,7 @@ jobs: mas-testing-x64-gn-check: executor: name: macos - size: medium + xcode: "13.2.1" environment: <<: *env-machine-mac <<: *env-mas @@ -1999,7 +2018,9 @@ jobs: <<: *steps-electron-gn-check mas-publish-x64-skip-checkout: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large-release <<: *env-mas @@ -2018,7 +2039,9 @@ jobs: checkout: false mas-publish-arm64-skip-checkout: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large-release <<: *env-mas-apple-silicon @@ -2038,7 +2061,9 @@ jobs: checkout: false mas-testing-arm64: - executor: macos + executor: + name: macos + xcode: "13.2.1" environment: <<: *env-mac-large <<: *env-testing-build @@ -2225,9 +2250,7 @@ jobs: <<: *steps-tests osx-testing-x64-tests: - executor: - name: macos - size: medium + executor: macos environment: <<: *env-mac-large <<: *env-stack-dumping @@ -2243,9 +2266,7 @@ jobs: <<: *steps-tests mas-testing-x64-tests: - executor: - name: macos - size: medium + executor: macos environment: <<: *env-mac-large <<: *env-stack-dumping diff --git a/BUILD.gn b/BUILD.gn index a2d9691301c2e..1738d10b14053 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -361,6 +361,7 @@ source_set("electron_lib") { "//components/network_hints/common:mojo_bindings", "//components/network_hints/renderer", "//components/network_session_configurator/common", + "//components/omnibox/browser:buildflags", "//components/os_crypt", "//components/pref_registry", "//components/prefs", @@ -472,8 +473,8 @@ source_set("electron_lib") { if (is_linux) { deps += [ - "//build/config/linux/gtk:gtkprint", "//components/crash/content/browser", + "//ui/gtk:gtk_config", ] } @@ -549,7 +550,7 @@ source_set("electron_lib") { sources += filenames.lib_sources_linux_x11 public_deps += [ "//ui/base/x", - "//ui/platform_window/x11", + "//ui/ozone/platform/x11", ] } configs += [ ":gio_unix" ] @@ -1186,7 +1187,7 @@ if (is_mac) { if (enable_hidpi) { data += [ "$root_out_dir/chrome_200_percent.pak" ] } - foreach(locale, locales) { + foreach(locale, platform_pak_locales) { data += [ "$root_out_dir/locales/$locale.pak" ] } diff --git a/DEPS b/DEPS index 858f9f05f58f6..790da2014c4de 100644 --- a/DEPS +++ b/DEPS @@ -15,7 +15,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '99.0.4767.0', + '100.0.4894.0', 'node_version': 'v16.13.2', 'nan_version': diff --git a/appveyor.yml b/appveyor.yml index 64b906aa0c010..fab35e3bc66d2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,6 +34,7 @@ environment: GIT_CACHE_PATH: C:\Users\electron\libcc_cache ELECTRON_OUT_DIR: Default ELECTRON_ENABLE_STACK_DUMPING: 1 + ELECTRON_ALSO_LOG_TO_STDERR: 1 MOCHA_REPORTER: mocha-multi-reporters MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap GOMA_FALLBACK_ON_AUTH_FAILURE: true @@ -209,7 +210,9 @@ test_script: } - cd electron # CalculateNativeWinOcclusion is disabled due to https://bugs.chromium.org/p/chromium/issues/detail?id=1139022 - - if "%RUN_TESTS%"=="true" ( echo Running test suite & node script/yarn test -- --trace-uncaught --enable-logging --disable-features=CalculateNativeWinOcclusion ) + - if "%RUN_TESTS%"=="true" ( echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging=file --log-file=%cd%\electron.log --disable-features=CalculateNativeWinOcclusion ) + - if "%RUN_TESTS%"=="true" ( echo Running remote test suite & node script/yarn test -- --trace-uncaught --runners=remote --runTestFilesSeperately --enable-logging=file --log-file=%cd%\electron.log --disable-features=CalculateNativeWinOcclusion ) + - if "%RUN_TESTS%"=="true" ( echo Running native test suite & node script/yarn test -- --trace-uncaught --runners=native --enable-logging=file --log-file=%cd%\electron.log --disable-features=CalculateNativeWinOcclusion ) - cd .. - if "%RUN_TESTS%"=="true" ( echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg ) - echo "About to verify mksnapshot" @@ -217,6 +220,7 @@ test_script: - echo "Done verifying mksnapshot" - if "%RUN_TESTS%"=="true" ( echo Verifying chromedriver & python electron\script\verify-chromedriver.py --build-dir out\Default --source-root %cd% ) - echo "Done verifying chromedriver" + - if exist %cd%\electron.log ( appveyor-retry appveyor PushArtifact %cd%\electron.log ) deploy_script: - cd electron - ps: >- @@ -231,3 +235,5 @@ deploy_script: } elseif (Test-Path Env:\TEST_WOA) { node script/release/ci-release-build.js --job=electron-woa-testing --ci=VSTS --armTest --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH } +on_finish: + - if exist src\electron\electron.log ( appveyor-retry appveyor PushArtifact src\electron\electron.log ) diff --git a/azure-pipelines-woa.yml b/azure-pipelines-woa.yml index 62cf7232f8296..9942f97f79dc3 100644 --- a/azure-pipelines-woa.yml +++ b/azure-pipelines-woa.yml @@ -1,11 +1,11 @@ +workspace: + clean: all + steps: -- task: CopyFiles@2 - displayName: 'Copy Files to: src\electron' - inputs: - TargetFolder: src\electron +- checkout: self + path: src\electron - script: | - cd src\electron node script/yarn.js install --frozen-lockfile displayName: 'Yarn install' @@ -13,13 +13,13 @@ steps: $localArtifactPath = "$pwd\dist.zip" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/dist.zip" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } - & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\Default -y $localArtifactPath + & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -o$(Pipeline.Workspace)\src\out\Default -y $localArtifactPath displayName: 'Download and extract dist.zip for test' env: APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - powershell: | - $localArtifactPath = "$pwd\src\out\Default\shell_browser_ui_unittests.exe" + $localArtifactPath = "$(Pipeline.Workspace)\src\out\Default\shell_browser_ui_unittests.exe" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/shell_browser_ui_unittests.exe" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } displayName: 'Download and extract native test executables for test' @@ -30,56 +30,57 @@ steps: $localArtifactPath = "$pwd\ffmpeg.zip" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/ffmpeg.zip" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } - & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -osrc\out\ffmpeg $localArtifactPath + & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -o$(Pipeline.Workspace)\src\out\ffmpeg $localArtifactPath displayName: 'Download and extract ffmpeg.zip for test' env: APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - powershell: | - $localArtifactPath = "$pwd\src\node_headers.zip" + $localArtifactPath = "$(Pipeline.Workspace)\src\node_headers.zip" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/node_headers.zip" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } - cd src + cd $(Pipeline.Workspace)\src & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y node_headers.zip displayName: 'Download node headers for test' env: APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - powershell: | - $localArtifactPath = "$pwd\src\out\Default\electron.lib" + $localArtifactPath = "$(Pipeline.Workspace)\src\out\Default\electron.lib" $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/electron.lib" Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } displayName: 'Download electron.lib for test' env: APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) -- powershell: | - try { - $localArtifactPath = "$pwd\src\pdb.zip" - $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/pdb.zip" - Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } - cd src - & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y pdb.zip - } catch { - Write-Host "There was an exception encountered while downloading pdb files:" $_.Exception.Message - } finally { - $global:LASTEXITCODE = 0 - } - displayName: 'Download pdb files for detailed stacktraces' - env: - APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) +# Uncomment the following block if pdb files are needed to debug issues +# - powershell: | +# try { +# $localArtifactPath = "$(Pipeline.Workspace)\src\pdb.zip" +# $serverArtifactPath = "$env:APPVEYOR_URL/buildjobs/$env:APPVEYOR_JOB_ID/artifacts/pdb.zip" +# Invoke-RestMethod -Method Get -Uri $serverArtifactPath -OutFile $localArtifactPath -Headers @{ "Authorization" = "Bearer $env:APPVEYOR_TOKEN" } +# cd $(Pipeline.Workspace)\src +# & "${env:ProgramFiles(x86)}\7-Zip\7z.exe" x -y pdb.zip +# } catch { +# Write-Host "There was an exception encountered while downloading pdb files:" $_.Exception.Message +# } finally { +# $global:LASTEXITCODE = 0 +# } +# displayName: 'Download pdb files for detailed stacktraces' +# env: +# APPVEYOR_TOKEN: $(APPVEYOR_TOKEN) - powershell: | - New-Item src\out\Default\gen\node_headers\Release -Type directory - Copy-Item -path src\out\Default\electron.lib -destination src\out\Default\gen\node_headers\Release\node.lib + New-Item $(Pipeline.Workspace)\src\out\Default\gen\node_headers\Release -Type directory + Copy-Item -path $(Pipeline.Workspace)\src\out\Default\electron.lib -destination $(Pipeline.Workspace)\src\out\Default\gen\node_headers\Release\node.lib displayName: 'Setup node headers' - script: | - cd src + cd $(Pipeline.Workspace)\src set npm_config_nodedir=%cd%\out\Default\gen\node_headers set npm_config_arch=arm64 cd electron - node script/yarn test --runners=main --runTestFilesSeperately --enable-logging --disable-features=CalculateNativeWinOcclusion + node script/yarn test --runners=main --enable-logging --disable-features=CalculateNativeWinOcclusion displayName: 'Run Electron Main process tests' env: ELECTRON_ENABLE_STACK_DUMPING: true @@ -90,7 +91,7 @@ steps: MOCHA_REPORTER: mocha-multi-reporters - script: | - cd src + cd $(Pipeline.Workspace)\src set npm_config_nodedir=%cd%\out\Default\gen\node_headers set npm_config_arch=arm64 cd electron @@ -102,17 +103,17 @@ steps: ELECTRON_TEST_RESULTS_DIR: junit MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap' MOCHA_REPORTER: mocha-multi-reporters - condition: always() + condition: succeededOrFailed() - task: PublishTestResults@2 displayName: 'Publish Test Results' inputs: testResultsFiles: '*.xml' - searchFolder: '$(System.DefaultWorkingDirectory)/src/junit/' + searchFolder: '$(Pipeline.Workspace)/src/junit/' condition: always() - script: | - cd src + cd $(Pipeline.Workspace)\src echo "Verifying non proprietary ffmpeg" python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg displayName: 'Verify ffmpeg' diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index c30edae4ac665..4c048a63aef2e 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -53,8 +53,8 @@ static_library("chrome") { "//chrome/browser/predictors/resolve_host_client_impl.cc", "//chrome/browser/predictors/resolve_host_client_impl.h", "//chrome/browser/process_singleton.h", - "//chrome/browser/ui/browser_dialogs.cc", - "//chrome/browser/ui/browser_dialogs.h", + "//chrome/browser/process_singleton_internal.cc", + "//chrome/browser/process_singleton_internal.h", "//chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.cc", "//chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h", "//chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc", @@ -140,10 +140,6 @@ static_library("chrome") { "//components/optimization_guide/proto:optimization_guide_proto", ] - if (enable_basic_printing && is_win) { - deps += [ "//chrome/common:cloud_print_utility_mojom" ] - } - if (is_linux) { sources += [ "//chrome/browser/icon_loader_auralinux.cc" ] if (use_ozone) { @@ -243,8 +239,6 @@ static_library("chrome") { sources += [ "//chrome/browser/printing/pdf_to_emf_converter.cc", "//chrome/browser/printing/pdf_to_emf_converter.h", - "//chrome/utility/printing_handler.cc", - "//chrome/utility/printing_handler.h", ] } } @@ -259,8 +253,12 @@ static_library("chrome") { "//chrome/browser/ui/views/overlay/close_image_button.cc", "//chrome/browser/ui/views/overlay/close_image_button.h", "//chrome/browser/ui/views/overlay/constants.h", + "//chrome/browser/ui/views/overlay/document_overlay_window_views.cc", + "//chrome/browser/ui/views/overlay/document_overlay_window_views.h", "//chrome/browser/ui/views/overlay/hang_up_button.cc", "//chrome/browser/ui/views/overlay/hang_up_button.h", + "//chrome/browser/ui/views/overlay/overlay_window_image_button.cc", + "//chrome/browser/ui/views/overlay/overlay_window_image_button.h", "//chrome/browser/ui/views/overlay/overlay_window_views.cc", "//chrome/browser/ui/views/overlay/overlay_window_views.h", "//chrome/browser/ui/views/overlay/playback_image_button.cc", @@ -275,11 +273,14 @@ static_library("chrome") { "//chrome/browser/ui/views/overlay/toggle_microphone_button.h", "//chrome/browser/ui/views/overlay/track_image_button.cc", "//chrome/browser/ui/views/overlay/track_image_button.h", + "//chrome/browser/ui/views/overlay/video_overlay_window_views.cc", + "//chrome/browser/ui/views/overlay/video_overlay_window_views.h", ] deps += [ "//chrome/app/vector_icons", "//components/vector_icons:vector_icons", + "//ui/views/controls/webview", ] } @@ -299,6 +300,8 @@ static_library("chrome") { sources += [ "//chrome/browser/pdf/pdf_extension_util.cc", "//chrome/browser/pdf/pdf_extension_util.h", + "//chrome/browser/pdf/pdf_frame_util.cc", + "//chrome/browser/pdf/pdf_frame_util.h", "//chrome/renderer/pepper/chrome_pdf_print_client.cc", "//chrome/renderer/pepper/chrome_pdf_print_client.h", ] diff --git a/electron_paks.gni b/electron_paks.gni index e85e26cf3077f..84cec359e201b 100644 --- a/electron_paks.gni +++ b/electron_paks.gni @@ -193,13 +193,13 @@ template("electron_paks") { "//ui/strings:ui_strings", ] - input_locales = locales + input_locales = platform_pak_locales output_dir = "${invoker.output_dir}/locales" if (is_mac) { output_locales = locales_as_mac_outputs } else { - output_locales = locales + output_locales = platform_pak_locales } } diff --git a/filenames.gni b/filenames.gni index eb30e8506ff0e..8e6da3eb657f4 100644 --- a/filenames.gni +++ b/filenames.gni @@ -386,8 +386,6 @@ filenames = { "shell/browser/file_select_helper.cc", "shell/browser/file_select_helper.h", "shell/browser/file_select_helper_mac.mm", - "shell/browser/font/electron_font_access_delegate.cc", - "shell/browser/font/electron_font_access_delegate.h", "shell/browser/font_defaults.cc", "shell/browser/font_defaults.h", "shell/browser/hid/electron_hid_delegate.cc", @@ -681,8 +679,6 @@ filenames = { ] lib_sources_extensions = [ - "shell/browser/extensions/api/i18n/i18n_api.cc", - "shell/browser/extensions/api/i18n/i18n_api.h", "shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc", "shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h", "shell/browser/extensions/api/management/electron_management_api_delegate.cc", diff --git a/patches/boringssl/expose_ripemd160.patch b/patches/boringssl/expose_ripemd160.patch index 8671efe04dca9..fede352bb528f 100644 --- a/patches/boringssl/expose_ripemd160.patch +++ b/patches/boringssl/expose_ripemd160.patch @@ -82,7 +82,7 @@ index a3fb077b9b9e66d1bc524fd7987622e73aa4776a..852b76bea69988e0b3ac76a17b603128 void EVP_MD_do_all(void (*callback)(const EVP_MD *cipher, const char *name, diff --git a/include/openssl/digest.h b/include/openssl/digest.h -index fa7616896b6cc7422dc0171db29316f20fb25de8..6c19a0f0d454bef1abf16ebfeef380a53fb21e5c 100644 +index 6e889993edc1caa7e10670529dd270c337b5ae4c..f61f7e5009a9b4f5630cda2c3a5a21b44e5b88d8 100644 --- a/include/openssl/digest.h +++ b/include/openssl/digest.h @@ -90,6 +90,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void); diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 328f5c6c59c36..174a219c8b744 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -48,7 +48,6 @@ worker_context_will_destroy.patch frame_host_manager.patch crashpad_pid_check.patch network_service_allow_remote_certificate_verification_logic.patch -put_back_deleted_colors_for_autofill.patch disable_color_correct_rendering.patch add_contentgpuclient_precreatemessageloop_callback.patch picture-in-picture.patch @@ -92,7 +91,6 @@ webview_fullscreen.patch disable_unload_metrics.patch fix_add_check_for_sandbox_then_result.patch extend_apply_webpreferences.patch -make_include_of_stack_trace_h_unconditional.patch build_libc_as_static_library.patch build_do_not_depend_on_packed_resource_integrity.patch refactor_restore_base_adaptcallbackforrepeating.patch @@ -109,9 +107,7 @@ mas_gate_private_enterprise_APIs.patch load_v8_snapshot_in_browser_process.patch fix_patch_out_permissions_checks_in_exclusive_access.patch fix_aspect_ratio_with_max_size.patch -revert_stop_using_nsrunloop_in_renderer_process.patch fix_dont_delete_SerialPortManager_on_main_thread.patch feat_add_data_transfer_to_requestsingleinstancelock.patch fix_crash_when_saving_edited_pdf_files.patch -drop_extra_printingcontext_calls_to_newpage_pagedone.patch -fix_don_t_restore_maximized_windows_when_calling_showinactive.patch +port_autofill_colors_to_the_color_pipeline.patch diff --git a/patches/chromium/accelerator.patch b/patches/chromium/accelerator.patch index 6ba88a66c47ee..04f4464c2dbbf 100644 --- a/patches/chromium/accelerator.patch +++ b/patches/chromium/accelerator.patch @@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc 3. Ctrl-Shift-= and Ctrl-Plus show up as such diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc -index be0df3662e3a1528fb88d5c723da49e5a29ac2b9..64a5eda05be16b3b6e1a0ceaa2b3a6884ca37268 100644 +index 2468b2c5881821d6f8e24a0e7c42243427b384ad..7e44c97edabf5ae012ff4f84d1404d8f223a13fe 100644 --- a/ui/base/accelerators/accelerator.cc +++ b/ui/base/accelerators/accelerator.cc @@ -11,6 +11,7 @@ @@ -30,7 +30,7 @@ index be0df3662e3a1528fb88d5c723da49e5a29ac2b9..64a5eda05be16b3b6e1a0ceaa2b3a688 + if (shifted_char) { + shortcut += *shifted_char; + } else { - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) // Our fallback is to try translate the key code to a regular character // unless it is one of digits (VK_0 to VK_9). Some keyboard @@ -261,6 +267,10 @@ std::u16string Accelerator::GetShortcutText() const { @@ -43,7 +43,7 @@ index be0df3662e3a1528fb88d5c723da49e5a29ac2b9..64a5eda05be16b3b6e1a0ceaa2b3a688 + base::StringPrintf("F%d", key_code_ - VKEY_F1 + 1)); } - #if defined(OS_MAC) + #if BUILDFLAG(IS_MAC) @@ -451,7 +461,7 @@ std::u16string Accelerator::ApplyLongFormModifiers( const std::u16string& shortcut) const { std::u16string result = shortcut; @@ -63,7 +63,7 @@ index be0df3662e3a1528fb88d5c723da49e5a29ac2b9..64a5eda05be16b3b6e1a0ceaa2b3a688 if (IsCmdDown()) { diff --git a/ui/base/accelerators/accelerator.h b/ui/base/accelerators/accelerator.h -index 5cdb2f160beae4d7787eb84d5013280ee9464446..76bd4369faa5d43d8a99ea51ed012857d6bff293 100644 +index e0d9df439d120c0a47f55666b3818c7ba6796e70..283c6283f5aeaae1a5436e5fbb17ce2db4a9034e 100644 --- a/ui/base/accelerators/accelerator.h +++ b/ui/base/accelerators/accelerator.h @@ -16,6 +16,7 @@ diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 4f034602a39dd..14d1535fe63f8 100644 --- a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch +++ b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch @@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set. This should be upstreamed. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index cdd437ad553493535015fd93d19aa29843e10c38..99b285b46c2193d0526fac8b706073213fa0846e 100644 +index 9f840287967b50ec1db3a9d27973429ab231a486..731a279e395a8762a25a115665bff99be428de3d 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -237,6 +237,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -239,6 +239,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index cdd437ad553493535015fd93d19aa29843e10c38..99b285b46c2193d0526fac8b70607321 // We are experiencing what appear to be memory-stomp issues in the GPU // process. These issues seem to be impacting the task executor and listeners // registered to it. Create the task executor on the heap to guard against -@@ -343,7 +347,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -345,7 +349,6 @@ int GpuMain(MainFunctionParams parameters) { GpuProcess gpu_process(io_thread_priority); #endif diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 8f8194bfc1c3b..b76baf2e4e6ba 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the context, which can cause some preload scripts to trip. diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h -index f6d262f1bf7aa77c2a63f4a4c3351be0fe2ab3fd..52db2e1948fd7752b88d5a692748053491594c2d 100644 +index a92e09dc651a5f1a9bbae2572fad32233afcd46c..f99b652dda817b62615d2b3f00b4ae4b438ec44d 100644 --- a/content/public/renderer/render_frame_observer.h +++ b/content/public/renderer/render_frame_observer.h @@ -129,6 +129,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener, @@ -23,10 +23,10 @@ index f6d262f1bf7aa77c2a63f4a4c3351be0fe2ab3fd..52db2e1948fd7752b88d5a6927480534 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 584ae29be139c9be347e4fa9f920a2cc84baf00a..c7a5f0916cf8ba6db6fa85537c140024a92ff24d 100644 +index 4473c5e812a4a598f3e2f2bb06f78def5791af24..44c0ec9815aafd61182fd18a9d125e185d7196bc 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4515,6 +4515,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4455,6 +4455,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -40,10 +40,10 @@ index 584ae29be139c9be347e4fa9f920a2cc84baf00a..c7a5f0916cf8ba6db6fa85537c140024 int world_id) { for (auto& observer : observers_) diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h -index 1b582c1736db20dab712ee7875f37c2140bd7d45..efab4f51e56e6e179fb832b1cf47d7f4a348e6c7 100644 +index 21b90bbb8fe8ddc03eb20538be423a5396d18eb3..f9c735038f733d990783dd66ffe8c74f824c78f2 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h -@@ -602,6 +602,8 @@ class CONTENT_EXPORT RenderFrameImpl +@@ -597,6 +597,8 @@ class CONTENT_EXPORT RenderFrameImpl blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override; void DidCreateScriptContext(v8::Local context, int world_id) override; @@ -53,10 +53,10 @@ index 1b582c1736db20dab712ee7875f37c2140bd7d45..efab4f51e56e6e179fb832b1cf47d7f4 int world_id) override; void DidChangeScrollOffset() override; diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h -index 994841c02b0472e5239d9b73a07b2592a39df8be..ad19a3cddf200f6600a04c1136fd21218d496ba8 100644 +index 3d6e0c0395ff7c92d8908c5151b467beec3a7516..2fadd6d9b2e3747eacea08973d8d3c7aa9c15f26 100644 --- a/third_party/blink/public/web/web_local_frame_client.h +++ b/third_party/blink/public/web/web_local_frame_client.h -@@ -596,6 +596,9 @@ class BLINK_EXPORT WebLocalFrameClient { +@@ -599,6 +599,9 @@ class BLINK_EXPORT WebLocalFrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) {} @@ -67,10 +67,10 @@ index 994841c02b0472e5239d9b73a07b2592a39df8be..ad19a3cddf200f6600a04c1136fd2121 virtual void WillReleaseScriptContext(v8::Local, int32_t world_id) {} diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -index 29e255dc75a1d54211dc6059801d3c16b7cefdca..044195c7d77be5ff4abe9d2a71ddbbf2076b2efd 100644 +index aa4b510137d60e6fb924f4f1a6554fe06c19ad75..816b6260020a6cbb6880b0eed197743ccd9002f5 100644 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -@@ -214,6 +214,7 @@ void LocalWindowProxy::Initialize() { +@@ -205,6 +205,7 @@ void LocalWindowProxy::Initialize() { } InstallConditionalFeatures(); @@ -79,10 +79,10 @@ index 29e255dc75a1d54211dc6059801d3c16b7cefdca..044195c7d77be5ff4abe9d2a71ddbbf2 if (World().IsMainWorld()) { GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld(); diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h -index c28bc5f4d285ab2db1b0501ad8663c4f948f3ddc..327c04b40460fc033ca7f4e4f838608cfc6c0ba3 100644 +index 0dda1f7cd77c47f7e61ba48dd20429c13679b543..2f73aacda1bafe07775213e232eda56c4b33325b 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -311,6 +311,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -308,6 +308,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,7 +92,7 @@ index c28bc5f4d285ab2db1b0501ad8663c4f948f3ddc..327c04b40460fc033ca7f4e4f838608c int32_t world_id) = 0; virtual bool AllowScriptExtensions() = 0; diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc -index 0922aaf1a5f076ed4544b6870ac3674b023c428b..ff8ccf56eaafe36fe4de08a448789b13033e8604 100644 +index 5297ad63f1c76240d57a64cc5ea64cbf8c7e1b95..006da6072db12da1632f9d45ecb5710136573641 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc @@ -274,6 +274,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -110,7 +110,7 @@ index 0922aaf1a5f076ed4544b6870ac3674b023c428b..ff8ccf56eaafe36fe4de08a448789b13 v8::Local context, int32_t world_id) { diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h -index 59dd5662dccea2e570b93e7bbdc59fded301979c..30d7bafbf5877d71868fbdec9abbcacacd4b72a8 100644 +index 708414fca139eb8328e425d909a48ca97038e442..48b2a0e129ec166ebd4c9bbd32330b0cc43dbeb2 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h @@ -78,6 +78,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index 59dd5662dccea2e570b93e7bbdc59fded301979c..30d7bafbf5877d71868fbdec9abbcaca int32_t world_id) override; diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h -index 42f30c871534bf7037c13d71802443baa20eb850..552909b44f47d64a260b9cd39ea42dac41e31603 100644 +index 4b639069d5d9173f0c35fe7656356031ba424a61..3da6699b40bf4f91e6d76a37e5fa8f680f7a7850 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -356,6 +356,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -357,6 +357,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch index 70d6a9524d22f..01c36b3c68ded 100644 --- a/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch +++ b/patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch @@ -8,12 +8,12 @@ was removed as part of the Raw Clipboard API scrubbing. https://bugs.chromium.org/p/chromium/issues/detail?id=1217643 diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc -index 153f169d2cdef6f8a726c188283a5bc1b7395fa3..3a5d9ab8dafacafb1025e1cb8c157e8a82078424 100644 +index 3009acd40eee36bc3d4dd8642f0ce5e6476da973..1d52ce84184a3ca94e4e0f04d331bf56d75e07d0 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.cc +++ b/ui/base/clipboard/scoped_clipboard_writer.cc -@@ -212,6 +212,16 @@ void ScopedClipboardWriter::WriteData(const std::u16string& format, - } +@@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting( } + #endif // BUILDFLAG(IS_CHROMEOS_ASH) +void ScopedClipboardWriter::WriteUnsafeRawData(const std::u16string& format, + mojo_base::BigBuffer data) { @@ -29,10 +29,10 @@ index 153f169d2cdef6f8a726c188283a5bc1b7395fa3..3a5d9ab8dafacafb1025e1cb8c157e8a objects_.clear(); platform_representations_.clear(); diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h -index 879acd4f6f0101a6da3af58d78eeda877ea41a4a..4d4149b6aa34c7073804994cb1c03368830c736d 100644 +index c47909313da0d7cd8a2b3cd670327011af66e3fb..0d259c21507f38124dfa46aceeacfda76cfd4a38 100644 --- a/ui/base/clipboard/scoped_clipboard_writer.h +++ b/ui/base/clipboard/scoped_clipboard_writer.h -@@ -80,6 +80,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter { +@@ -84,6 +84,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter { // This is only used to write custom format data. void WriteData(const std::u16string& format, mojo_base::BigBuffer data); @@ -42,4 +42,4 @@ index 879acd4f6f0101a6da3af58d78eeda877ea41a4a..4d4149b6aa34c7073804994cb1c03368 + void WriteImage(const SkBitmap& bitmap); - // Mark the data to be written as confidential. + #if BUILDFLAG(IS_CHROMEOS_LACROS) diff --git a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch index 6c0d43aab7bce..9a54c4fbe9988 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 2d918fcf473d6ce399dde0413da0b1d7444c32c0..29f53b668d6c8f50d901bf214d19ae08d765944d 100644 +index 56c08919ab626a8a7b3bcb892ee94cdee2a106fc..b85bdf4ed574a149a6502e8d21e54f2ee80777a5 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -633,6 +633,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -647,6 +647,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -22,10 +22,10 @@ index 2d918fcf473d6ce399dde0413da0b1d7444c32c0..29f53b668d6c8f50d901bf214d19ae08 return is_active(); } diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h -index c2d024d09dda8b221cc588e784cb2d31c273d0ff..c0fd9c5400acf32c89a477797c4d9c45662fb14c 100644 +index 9e32df9f5fd765895c8470c3922a62f754e7d409..9bac2321d65d9e54ce88fffafd72a74803ed2c87 100644 --- a/content/browser/renderer_host/render_view_host_impl.h +++ b/content/browser/renderer_host/render_view_host_impl.h -@@ -136,6 +136,7 @@ class CONTENT_EXPORT RenderViewHostImpl +@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl bool IsRenderViewLive() override; void WriteIntoTrace(perfetto::TracedValue context) override; @@ -48,7 +48,7 @@ index 787077d71c04d571aa825bec0a549c5fad2b8574..4b05b80802ba97a46eed60e509b503fc // This interface should only be implemented inside content. friend class RenderViewHostImpl; diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h -index 975757f5e878004180f155583712ad48de781ef6..3dad0b314f0d4e7f93e8b727f2ef875ce9d4762e 100644 +index 4e8d36420d6edc1725a840e1b9f123041d21abe4..dd198cb7bf02e509833c6b4c7d8e5d65d20d46dc 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -152,6 +152,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, @@ -61,7 +61,7 @@ index 975757f5e878004180f155583712ad48de781ef6..3dad0b314f0d4e7f93e8b727f2ef875c // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put // it in the same order in the .cc file as it was in the header. diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom -index b7c6ba65551acd31c96be06c3d7595f28b6855b0..21ce5fe263f8a47281b21c45c7bda9eff1cb17b5 100644 +index befd736a9cf362514b9a2ee475dc4a814c85a87b..24b2617f56673a3075697802cf5b574b0c766610 100644 --- a/third_party/blink/public/mojom/page/page.mojom +++ b/third_party/blink/public/mojom/page/page.mojom @@ -97,4 +97,7 @@ interface PageBroadcast { @@ -85,10 +85,10 @@ index 14d4a00293ab0b11e733676844ce483992d6cd8e..c6c2dbb9dddd1eaa21e8c7b276d871a3 // Visibility ----------------------------------------------------------- diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index 6531f9b8d7720c8d3bb5f5df677cbac13a17454d..d4602eb32f1f14f639df26f866f5406ab36003d5 100644 +index 8cdffac8ecb9ed2c6892f1e975a953846e7e3a5c..7e7927c7258963bd95a2c064ef85e410f4d2571d 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3662,6 +3662,13 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3659,6 +3659,13 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } @@ -102,7 +102,7 @@ index 6531f9b8d7720c8d3bb5f5df677cbac13a17454d..d4602eb32f1f14f639df26f866f5406a void WebViewImpl::SetVisibilityState( mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) { -@@ -3673,7 +3680,8 @@ void WebViewImpl::SetVisibilityState( +@@ -3670,7 +3677,8 @@ void WebViewImpl::SetVisibilityState( } GetPage()->SetVisibilityState(visibility_state, is_initial_state); GetPage()->GetPageScheduler()->SetPageVisible( @@ -113,7 +113,7 @@ index 6531f9b8d7720c8d3bb5f5df677cbac13a17454d..d4602eb32f1f14f639df26f866f5406a mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() { diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h -index cce6788b0a529ffb4d6330237c50c8f9a1b2093a..83c95f9867cbf52646a9b093706b05d8d99ce3b6 100644 +index 5107ef421138e136b20b25b7bbcc1f0bb246bb66..043266205142e59f88c4c2f2ae6b58bb009f2d9c 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.h +++ b/third_party/blink/renderer/core/exported/web_view_impl.h @@ -420,6 +420,7 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -124,7 +124,7 @@ index cce6788b0a529ffb4d6330237c50c8f9a1b2093a..83c95f9867cbf52646a9b093706b05d8 void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state, bool is_initial_state) override; mojom::blink::PageVisibilityState GetVisibilityState() override; -@@ -856,6 +857,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -857,6 +858,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, // If true, we send IPC messages when |preferred_size_| changes. bool send_preferred_size_changes_ = false; diff --git a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch index 3a9f7941b6f61..763b2ecf84401 100644 --- a/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch +++ b/patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch @@ -8,10 +8,10 @@ WebPreferences of in-process child windows, rather than relying on process-level command line switches, as before. diff --git a/third_party/blink/common/web_preferences/web_preferences.cc b/third_party/blink/common/web_preferences/web_preferences.cc -index 6356025f24855b789b0fdb492ca61232bc6d8000..7eab027f4af2a10c77a8754f6faf06a67b2edce0 100644 +index 30e237f886b41bdf528b2a0e81054d15fb323f1f..43f7920cf6ff12d8a48ddef5440814a42266e8c5 100644 --- a/third_party/blink/common/web_preferences/web_preferences.cc +++ b/third_party/blink/common/web_preferences/web_preferences.cc -@@ -144,6 +144,20 @@ WebPreferences::WebPreferences() +@@ -145,6 +145,20 @@ WebPreferences::WebPreferences() fake_no_alloc_direct_call_for_testing_enabled(false), v8_cache_options(blink::mojom::V8CacheOptions::kDefault), record_whole_document(false), @@ -33,7 +33,7 @@ index 6356025f24855b789b0fdb492ca61232bc6d8000..7eab027f4af2a10c77a8754f6faf06a6 accelerated_video_decode_enabled(false), animation_policy( diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc -index 98391c17bc6c3371919966e9caf09efbcc94cec6..c2d3457f17a076e238dc851b5c61a9ed0efb3a19 100644 +index d278453a261fe2dd3bacce433e35d50879b555a7..140f8d6273d944bfe36831d27aef757d89240b56 100644 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc @@ -22,6 +22,10 @@ bool StructTraitslazy_frame_loading_distance_thresholds_px) || !data.ReadLazyImageLoadingDistanceThresholdsPx( -@@ -156,6 +160,19 @@ bool StructTraitsv8_cache_options = data.v8_cache_options(); out->record_whole_document = data.record_whole_document(); @@ -68,7 +68,7 @@ index 98391c17bc6c3371919966e9caf09efbcc94cec6..c2d3457f17a076e238dc851b5c61a9ed out->accelerated_video_decode_enabled = data.accelerated_video_decode_enabled(); diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h -index 9eefe05ffbd6f78a869e2a7449a8fa7c7d456dda..cc57fcbe8a1c51db906731c18a5ffe3bc711a755 100644 +index 8509f720c5afb816c6cbb2313dd566a24236a790..b9f0f79d96c58a7769939610bb72f8b2bcd3be94 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences.h +++ b/third_party/blink/public/common/web_preferences/web_preferences.h @@ -10,6 +10,7 @@ @@ -79,7 +79,7 @@ index 9eefe05ffbd6f78a869e2a7449a8fa7c7d456dda..cc57fcbe8a1c51db906731c18a5ffe3b #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" #include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h" -@@ -161,6 +162,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { +@@ -160,6 +161,22 @@ struct BLINK_COMMON_EXPORT WebPreferences { blink::mojom::V8CacheOptions v8_cache_options; bool record_whole_document; @@ -103,7 +103,7 @@ index 9eefe05ffbd6f78a869e2a7449a8fa7c7d456dda..cc57fcbe8a1c51db906731c18a5ffe3b // only controls whether or not the "document.cookie" field is properly // connected to the backing store, for instance if you wanted to be able to diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h -index 5124059d0df902d3879f2c96d001472a10c2ead1..9ab4f31275dfebc98ef94ed496a23e8c28168c3a 100644 +index a6291be3e953ceaee1d996e4b30a6ae78916bc7a..c3baf95c5d9b6a6ace56bcde9e1dc8179f18eaa0 100644 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h @@ -6,6 +6,7 @@ @@ -114,7 +114,7 @@ index 5124059d0df902d3879f2c96d001472a10c2ead1..9ab4f31275dfebc98ef94ed496a23e8c #include "mojo/public/cpp/bindings/struct_traits.h" #include "net/nqe/effective_connection_type.h" #include "third_party/blink/public/common/common_export.h" -@@ -446,6 +447,60 @@ struct BLINK_COMMON_EXPORT StructTraitsDetach(FrameDetachType::kRemove); -@@ -152,6 +144,14 @@ bool Frame::Detach(FrameDetachType type) { +@@ -153,6 +145,14 @@ bool Frame::Detach(FrameDetachType type) { GetWindowProxyManager()->ClearForSwap(); } @@ -49,10 +49,10 @@ index 1b022bf6b37982e6321120951de5d8dcc10ecf6a..5cd7cf680244383e466106801103871b // its owning reference back to our owning LocalFrame. client_->Detached(type); diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index fc47c47cc197a674d97e77e35a904d3bfb481891..bc1444a76d72f1f40966ddac21e689a4a5995125 100644 +index db69148e0756ed36bcf3a04f1ace69cc166261a6..bcf072a6d8bc46e5c71d9ef3f248b6af69693ac9 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -533,10 +533,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -538,10 +538,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index fc47c47cc197a674d97e77e35a904d3bfb481891..bc1444a76d72f1f40966ddac21e689a4 if (!Client()) return false; -@@ -582,6 +578,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -587,6 +583,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/boringssl_build_gn.patch b/patches/chromium/boringssl_build_gn.patch index 309ff79d0a556..05fde5454844e 100644 --- a/patches/chromium/boringssl_build_gn.patch +++ b/patches/chromium/boringssl_build_gn.patch @@ -6,10 +6,10 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index 91ce539f2cdf3c17645126088ecb00e36befd1b8..8e1d78fdb56372836cea73e35cb4e03059cf5ec5 100644 +index f222ae94a5a10ced84e41ef84560af46a910577f..c18d26de9a63befca3c77fe5ecd93975a016797f 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn -@@ -47,6 +47,20 @@ config("no_asm_config") { +@@ -44,6 +44,20 @@ config("no_asm_config") { all_sources = crypto_sources + ssl_sources all_headers = crypto_headers + ssl_headers diff --git a/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch b/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch index d86fd3e45eca1..1222c47289414 100644 --- a/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch +++ b/patches/chromium/breakpad_treat_node_processes_as_browser_processes.patch @@ -10,7 +10,7 @@ breakpad independently, as a "browser" process. This patches crash annotation. diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index f55fd1c92770de6b8bce1fc46a047c79228d451e..5b308900ae8e9d49d711a1638e40c22d1d45af80 100644 +index 43f6d476f3ee2759cf41c492f932522994e7ddec..8df14f416ee321e1259433715a61fa6025207d80 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -718,8 +718,13 @@ bool CrashDone(const MinidumpDescriptor& minidump, @@ -29,7 +29,7 @@ index f55fd1c92770de6b8bce1fc46a047c79228d451e..5b308900ae8e9d49d711a1638e40c22d info.distro = base::g_linux_distro; info.distro_length = my_strlen(base::g_linux_distro); info.upload = upload; -@@ -2026,8 +2031,13 @@ void InitCrashReporter(const std::string& process_type) { +@@ -2025,8 +2030,13 @@ void InitCrashReporter(const std::string& process_type) { process_type == kWebViewSingleProcessType || process_type == kBrowserProcessType || #endif diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 96be2ad1e190d..22145207fe628 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us to introduce a new Electron category for Electron-specific tracing. diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h -index f6f346bbc56d4a1f8693330b010fd4b3c2d28628..981eaef314d8ff0301e8d008927d02fc8a12ae54 100644 +index 107516329273ee4a6cc49433b69f307b1264362b..0c9555a04233d07a186e34ada8b7615095854950 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h -@@ -77,6 +77,7 @@ +@@ -78,6 +78,7 @@ X("drmcursor") \ X("dwrite") \ X("DXVA_Decoding") \ diff --git a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch index 176d5bc5a649f..c692f905ec181 100644 --- a/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch +++ b/patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch @@ -11,15 +11,15 @@ if we ever align our .pak file generation with Chrome we can remove this patch. diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 33e8d4f5b27532d015d8cd4dbe7d2550916eb436..76945ae5d23af853d920810cbcb248c0daf2f544 100644 +index 7caaf66cad9d5b9f787cea0d49c32c26801571c2..f45691888b74643189b956928fdc796bfc5bcee3 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -170,11 +170,16 @@ if (!is_android && !is_mac) { +@@ -171,11 +171,16 @@ if (!is_android && !is_mac) { "common/crash_keys.h", ] + if (!is_electron_build) { -+ deps += [ ++ deps = [ + ":packed_resources_integrity", + ] + } @@ -33,23 +33,23 @@ index 33e8d4f5b27532d015d8cd4dbe7d2550916eb436..76945ae5d23af853d920810cbcb248c0 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 8f418d78b7ac7a23d80f44e23d430febe641cf0a..dc378e799bad709709f339864fdf63e6d9a6cb69 100644 +index 6a40a73520a951d7c6fd06cbd07329a40ff41544..9ca837d995160d57c7efb51c54cf27283b11b20e 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4528,7 +4528,7 @@ static_library("browser") { +@@ -4502,7 +4502,7 @@ static_library("browser") { # On Windows, the hashes are embedded in //chrome:chrome_initial rather # than here in :chrome_dll. - if (!is_win) { + if (!is_win && !is_electron_build) { deps += [ "//chrome:packed_resources_integrity" ] + sources += [ "certificate_viewer_stub.cc" ] } - diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 4d35024ba4a2f490f5749449c8772da60fb6eb46..de0d4c18362ba9c8e288e532b11f114f3b3f9532 100644 +index 7be0809cfd3a08a87b29256241bc11a33abd3d17..e3c85fd9f550da204e36091bad256b1c2400ade8 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -5531,7 +5531,6 @@ test("unit_tests") { +@@ -5719,7 +5719,6 @@ test("unit_tests") { deps += [ "//chrome:other_version", @@ -57,7 +57,7 @@ index 4d35024ba4a2f490f5749449c8772da60fb6eb46..de0d4c18362ba9c8e288e532b11f114f "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/browser:chrome_process_finder", -@@ -5554,6 +5553,10 @@ test("unit_tests") { +@@ -5742,6 +5741,10 @@ test("unit_tests") { "//ui/resources", ] @@ -68,7 +68,7 @@ index 4d35024ba4a2f490f5749449c8772da60fb6eb46..de0d4c18362ba9c8e288e532b11f114f ldflags = [ "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll", "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll", -@@ -6245,7 +6248,6 @@ test("unit_tests") { +@@ -6428,7 +6431,6 @@ test("unit_tests") { } deps += [ @@ -76,7 +76,7 @@ index 4d35024ba4a2f490f5749449c8772da60fb6eb46..de0d4c18362ba9c8e288e532b11f114f "//chrome/browser:cart_db_content_proto", "//chrome/browser:coupon_db_content_proto", "//chrome/browser/media/router:test_support", -@@ -6286,6 +6288,11 @@ test("unit_tests") { +@@ -6473,6 +6475,11 @@ test("unit_tests") { "//ui/native_theme:test_support", "//ui/webui/resources/js/browser_command:mojo_bindings", ] diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index 59b6758160174..e778543bd5674 100644 --- a/patches/chromium/build_libc_as_static_library.patch +++ b/patches/chromium/build_libc_as_static_library.patch @@ -7,10 +7,10 @@ Build libc++ as static library to compile and pass nan tests diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn -index 48f0bdb17e0a35f6e4d6fa236cd6077910ac76c6..5c95b14441c5604bc14418e4bbaf3df877652b2a 100644 +index 7915346430db72d18474d7a011b8dc7637c3f281..cd736d988f9c5e37dc24c724268fe115e00914d9 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn -@@ -41,7 +41,11 @@ config("winver") { +@@ -44,7 +44,11 @@ config("winver") { if (libcxx_is_shared) { _libcxx_target_type = "shared_library" } else { @@ -23,7 +23,7 @@ index 48f0bdb17e0a35f6e4d6fa236cd6077910ac76c6..5c95b14441c5604bc14418e4bbaf3df8 } target(_libcxx_target_type, "libc++") { # Most things that need to depend on libc++ should do so via the implicit -@@ -49,6 +53,7 @@ target(_libcxx_target_type, "libc++") { +@@ -52,6 +56,7 @@ target(_libcxx_target_type, "libc++") { # need to explicitly depend on libc++. visibility = [ "//build/config:common_deps", diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index e359d3ec35437..bb9b959820869 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -9,10 +9,10 @@ potentially prevent a window from being created. TODO(loc): this patch is currently broken. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 38b4d4da5ea013118d8464d82fd84a551a36a80f..165d6b8eb5cb0ce949c71c1707687960c49a4ebb 100644 +index eba372243a31d08c251ad3367d24999277a8289b..713e2883139bca4bb56dcc7e3efcf6d6dfc4a02b 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6602,6 +6602,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -6703,6 +6703,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,10 +21,10 @@ index 38b4d4da5ea013118d8464d82fd84a551a36a80f..165d6b8eb5cb0ce949c71c1707687960 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index c4351bea185f1a7d392ef3c1b95d66d35347e87a..131e74e1789632f59086b2bfb390654207f6d18f 100644 +index 3fe9e1e4918ef65194621661c9c7c650089229fa..c8e49eeaca8b31479aa908be9c349ccd625e9e51 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3864,6 +3864,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3925,6 +3925,14 @@ FrameTree* WebContentsImpl::CreateNewWindow( } auto* new_contents_impl = new_contents.get(); @@ -37,9 +37,9 @@ index c4351bea185f1a7d392ef3c1b95d66d35347e87a..131e74e1789632f59086b2bfb3906542 + } + new_contents_impl->GetController().SetSessionStorageNamespace( - partition_id, session_storage_namespace); + partition_config, session_storage_namespace); -@@ -3906,12 +3914,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3967,12 +3975,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -53,7 +53,7 @@ index c4351bea185f1a7d392ef3c1b95d66d35347e87a..131e74e1789632f59086b2bfb3906542 new_contents_impl, opener, params.target_url, params.referrer.To(), params.disposition, diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index afd57b6d28f8280d8b140370a36d9ca6ec17b774..da44b637ee5fdf371974f322aaf1a07ba8c018d7 100644 +index ace032dc2ffac27fbdddee5a4b13c3c3e36ba5ae..80f7dd56fdaa94a9880995b2b5393af0414eef29 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -550,6 +550,10 @@ struct CreateNewWindowParams { @@ -68,10 +68,10 @@ index afd57b6d28f8280d8b140370a36d9ca6ec17b774..da44b637ee5fdf371974f322aaf1a07b // Operation result when the renderer asks the browser to create a new window. diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index f26ff2199c9f72adfcea9df0db0dc9f0eb70a127..8bbca0ed64bdfc892b3f2e21f0f88fe14344459d 100644 +index 85ed8b5e84813c10f97c5785d906a87455f8f67e..a11d5ba888c1489870875c859ec9eb79c67f94b7 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc -@@ -570,6 +570,8 @@ bool ContentBrowserClient::CanCreateWindow( +@@ -571,6 +571,8 @@ bool ContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -81,10 +81,10 @@ index f26ff2199c9f72adfcea9df0db0dc9f0eb70a127..8bbca0ed64bdfc892b3f2e21f0f88fe1 bool opener_suppressed, bool* no_javascript_access) { diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index d50c7e0c618b8292e38b8f8b307d019701f70e49..253c47f41294155bab9a3b0884e65a09fcacd0d0 100644 +index 47527cb2e434f771f5aeb5099432ae86a0ad06ea..2fe1462a2cd92a731a5816b5fc22b059bad92fe8 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -169,6 +169,7 @@ class NetworkService; +@@ -168,6 +168,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -92,7 +92,7 @@ index d50c7e0c618b8292e38b8f8b307d019701f70e49..253c47f41294155bab9a3b0884e65a09 } // namespace network namespace sandbox { -@@ -940,6 +941,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -950,6 +951,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -102,10 +102,10 @@ index d50c7e0c618b8292e38b8f8b307d019701f70e49..253c47f41294155bab9a3b0884e65a09 bool opener_suppressed, bool* no_javascript_access); diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index 2c87b891defb55771fd7686cb88971cd158c801f..a583c64b44b7add0b46ce25b4112563dd1b7e7b1 100644 +index f132199113778f6b50972419b61a187e6272300c..7bb1680553c405a9016cfd67eca5fa3c6439b692 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc -@@ -27,6 +27,17 @@ namespace content { +@@ -26,6 +26,17 @@ namespace content { WebContentsDelegate::WebContentsDelegate() = default; @@ -124,7 +124,7 @@ index 2c87b891defb55771fd7686cb88971cd158c801f..a583c64b44b7add0b46ce25b4112563d const OpenURLParams& params) { return nullptr; diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index f04506bf8b64fef533d6cd9d2b609e5779c4382f..b0f14ef097c9178aa25bf04d19fff362fabfcf11 100644 +index f889d0bf33cf218a68bf5a9422aecaed23fa260a..3330876f623e5b2cb600b1ce1fd10b3375568613 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h @@ -16,6 +16,7 @@ @@ -135,8 +135,8 @@ index f04506bf8b64fef533d6cd9d2b609e5779c4382f..b0f14ef097c9178aa25bf04d19fff362 #include "content/public/browser/eye_dropper.h" #include "content/public/browser/invalidate_type.h" #include "content/public/browser/media_stream_request.h" -@@ -344,6 +345,13 @@ class CONTENT_EXPORT WebContentsDelegate { - const StoragePartitionId& partition_id, +@@ -339,6 +340,13 @@ class CONTENT_EXPORT WebContentsDelegate { + const StoragePartitionConfig& partition_config, SessionStorageNamespace* session_storage_namespace); + virtual void WebContentsCreatedWithFullParams( @@ -150,10 +150,10 @@ index f04506bf8b64fef533d6cd9d2b609e5779c4382f..b0f14ef097c9178aa25bf04d19fff362 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 9eb0bc6d5460f640dc95cc170c9808b8e3f5fb16..190b517cea51bd3eae29695ba45efb22c4c82877 100644 +index 83517883144a77a0c775ce2d146b4e85ef79ea97..aa65517a568aa0b324b2c8cca8f60bb532ba085a 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #include "third_party/blink/public/platform/impression_conversions.h" #include "third_party/blink/public/platform/modules/video_capture/web_video_capture_impl_manager.h" #include "third_party/blink/public/platform/url_conversion.h" @@ -161,7 +161,7 @@ index 9eb0bc6d5460f640dc95cc170c9808b8e3f5fb16..190b517cea51bd3eae29695ba45efb22 #include "third_party/blink/public/web/modules/mediastream/web_media_stream_device_observer.h" #include "third_party/blink/public/web/web_frame_widget.h" #include "third_party/blink/public/web/web_local_frame.h" -@@ -290,6 +291,10 @@ WebView* RenderViewImpl::CreateView( +@@ -291,6 +292,10 @@ WebView* RenderViewImpl::CreateView( params->impression = blink::ConvertWebImpressionToImpression(*impression); } @@ -173,10 +173,10 @@ index 9eb0bc6d5460f640dc95cc170c9808b8e3f5fb16..190b517cea51bd3eae29695ba45efb22 /*is_opener_navigation=*/false, request.HasUserGesture(), // `openee_can_access_opener_origin` only matters for opener navigations, diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc -index 99d4577526d64e4a73591be4b5bb4d67826abb1a..213db9dc65d10d70b6e02ee3b9b95d38bd951ba3 100644 +index 54b62065d148ab860a49dc03daaf7680ff00d778..3008d3efe89585a562ae55734938b10ef8b0074e 100644 --- a/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc -@@ -439,6 +439,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( +@@ -440,6 +440,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -186,7 +186,7 @@ index 99d4577526d64e4a73591be4b5bb4d67826abb1a..213db9dc65d10d70b6e02ee3b9b95d38 bool opener_suppressed, bool* no_javascript_access) { diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h -index 76254db8ed262aa105eb9782c533fe6b25324828..3e757eb86ab685901dedde45f21b818438ec4827 100644 +index d4eb4d482b2641585d501131c64b90cc9dbcfd18..132a5d86279b9a2cb4364b9c6d3e89e12d55052e 100644 --- a/content/web_test/browser/web_test_content_browser_client.h +++ b/content/web_test/browser/web_test_content_browser_client.h @@ -80,6 +80,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient { @@ -220,10 +220,10 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc } // namespace blink diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc -index 324322b9c1096cfd201ac33b279dcbd5a1d56e5d..e1ad20b728028c0ec9de4290afdef17e61df2c85 100644 +index 12658b5c9ca6bc10cffd2c9e8ddf45bac697e75c..284f3ed1513009092ecdf2be6ff87641cc404cd9 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2070,6 +2070,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2051,6 +2051,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, incumbent_window); diff --git a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch index aecb5a5114f97..a0affa82eec7a 100644 --- a/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch +++ b/patches/chromium/chore_expose_v8_initialization_isolate_callbacks.patch @@ -9,10 +9,10 @@ we're running with contextIsolation enabled, we should be falling back to Blink's logic. This will be upstreamed in some form. diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -index 656c09327f0b88a6bdcd2753018fc12d5e931cb8..f787e4e35ea86c68dbf1423a376c75857d3b5b2a 100644 +index 10f34d87d74d81de91cbd006665465cee6c0d21e..93f09cd74b225a8b0c2d2f5280636513e852e8ff 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -457,8 +457,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, +@@ -446,8 +446,9 @@ CodeGenerationCheckCallbackInMainThread(v8::Local context, return {true, std::move(stringified_source)}; } diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index ae811011c4ef2..19409a0d9762f 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -108,10 +108,10 @@ index 6688ba8ba2fb7d930773144cdbc43f1f6fa2b685..22015c7b9b50e1264551ce226757f90e } diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index da521ddb3d244d264f11f42a86dce97ba84fac55..8f12ce6257f72786c96428fbbd6040fdf0b87025 100644 +index 04e327d970b872f0a9c505a0b99c6273900930f9..5993b3cb0cbe76cd266dee074effd736efa8fc50 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -1762,12 +1762,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -1767,12 +1767,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -127,10 +127,10 @@ index da521ddb3d244d264f11f42a86dce97ba84fac55..8f12ce6257f72786c96428fbbd6040fd WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 10e4e2021cb39f2384f81d7ed8783e85286fa37b..4e98b6a5b51d41631b2f0a4601359b396e9c58b2 100644 +index a63ba24be314eb4372d7dda7206dee4b52730d1e..f9bcaa001bfed987edd0ebb001f5cda0e0aca4aa 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -810,8 +810,7 @@ class Browser : public TabStripModelObserver, +@@ -808,8 +808,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -169,7 +169,7 @@ index b6833e34c5840a4d3a545d1c4a44b2b08d7fc9ea..5ebc16a3545a73e58516cb0fbdddca43 // The profile used for the presentation. raw_ptr otr_profile_; diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc -index 2c560d379ee6c08465455ea1dc2c5a59ddb65487..4fd703722db5d679b08acdb8fc080b089dd8c433 100644 +index ed23267cd9f28f4e02d8374177f0bb697547cc2a..a979719f75ab4c9b49775ec3df5eff13f4429a49 100644 --- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc +++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc @@ -70,8 +70,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView { @@ -183,7 +183,7 @@ index 2c560d379ee6c08465455ea1dc2c5a59ddb65487..4fd703722db5d679b08acdb8fc080b08 } content::WebContents* CreateCustomWebContents( diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc -index 1aec422b4c83b823c92d76847366fe0d4d04cd00..ea8354f49b14631cf8671decc1ee96beb18d9561 100644 +index 1911b0558fad1d5834befa98e57a978e6e0b72da..cb85515f79617a32e2809ad6eb7f55e4ecc36b3f 100644 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc @@ -170,14 +170,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden( @@ -218,10 +218,10 @@ index 2930898b03d7b7ef86d13733cec3cbe84105c166..76625339f42a867c8b68840253e91648 void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; diff --git a/components/offline_pages/content/background_loader/background_loader_contents.cc b/components/offline_pages/content/background_loader/background_loader_contents.cc -index 53fad64f87a952fd0d7398958288ecde259b57bf..26f64dabcbee575034e97ada29c7de48b315080f 100644 +index 2834e3ee5778185741779a473cf5157788a76cc5..64fcddc952065e574a84edd99e5b1b80febd3d26 100644 --- a/components/offline_pages/content/background_loader/background_loader_contents.cc +++ b/components/offline_pages/content/background_loader/background_loader_contents.cc -@@ -80,8 +80,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden( +@@ -81,8 +81,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -232,7 +232,7 @@ index 53fad64f87a952fd0d7398958288ecde259b57bf..26f64dabcbee575034e97ada29c7de48 return true; } diff --git a/components/offline_pages/content/background_loader/background_loader_contents.h b/components/offline_pages/content/background_loader/background_loader_contents.h -index c1926fc79e9982739d17f4b971f5e7296afd0cf8..31f036c9d224f7e03d7fe38861db45b8d11a07b8 100644 +index c6bd5c19f8a7ceec17c9e32af5296a9617f3a619..02199b439fba7fdc617b7f7980d958b76d09c4e8 100644 --- a/components/offline_pages/content/background_loader/background_loader_contents.h +++ b/components/offline_pages/content/background_loader/background_loader_contents.h @@ -66,8 +66,7 @@ class BackgroundLoaderContents : public content::WebContentsDelegate { @@ -246,10 +246,10 @@ index c1926fc79e9982739d17f4b971f5e7296afd0cf8..31f036c9d224f7e03d7fe38861db45b8 void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 3bc6a0207a5273e7a7b64ab59d4e3499482e4bd8..676c77b2ac7be7445d92db3fcfc94b5ec4915696 100644 +index 5c63a024827359ccf697d0b7fc8fa2092eb107b7..3da88b5831717c979373c064b4c1520c28d4fd98 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3812,8 +3812,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3873,8 +3873,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -260,10 +260,10 @@ index 3bc6a0207a5273e7a7b64ab59d4e3499482e4bd8..676c77b2ac7be7445d92db3fcfc94b5e static_cast(delegate_->CreateCustomWebContents( opener, source_site_instance, is_new_browsing_instance, diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc -index a583c64b44b7add0b46ce25b4112563dd1b7e7b1..2af9f098d59e3b93949a33dae5a8e4b70f15937c 100644 +index 7bb1680553c405a9016cfd67eca5fa3c6439b692..3aa2cca04340098859e1072eaa80a46a8e0463b1 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc -@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( +@@ -134,8 +134,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden( SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -274,10 +274,10 @@ index a583c64b44b7add0b46ce25b4112563dd1b7e7b1..2af9f098d59e3b93949a33dae5a8e4b7 } diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h -index b0f14ef097c9178aa25bf04d19fff362fabfcf11..590d52000e30c00a06e192d9fd1faafd4173595f 100644 +index 3330876f623e5b2cb600b1ce1fd10b3375568613..a9f48c6577afef8876cd8304ff5a66405b7d8343 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h -@@ -323,8 +323,7 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -318,8 +318,7 @@ class CONTENT_EXPORT WebContentsDelegate { SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -288,7 +288,7 @@ index b0f14ef097c9178aa25bf04d19fff362fabfcf11..590d52000e30c00a06e192d9fd1faafd // Allow delegate to creates a custom WebContents when // WebContents::CreateNewWindow() is called. This function is only called diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc -index c5f63fc8512bfe0374121950804a4b815bcea44f..fac8e32dc27b248f9e06f3be151e73da51d04a63 100644 +index ce83daee0eb44d72caaf1e7e250ce0c3fadb827c..ed0b508a5d6cdd4433a8117ef2032ce8e1d99273 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc @@ -213,8 +213,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden( @@ -302,7 +302,7 @@ index c5f63fc8512bfe0374121950804a4b815bcea44f..fac8e32dc27b248f9e06f3be151e73da // view is used for displaying embedded extension options, we want any // external links to be opened in a new tab, not in a new guest view so we diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h -index 0d6ab312e2bdfac8f1d75ecb5df990d3d158b288..edcdae5183d5a2bcca31b440870f40ed12d7e02c 100644 +index 7350382146178f58960a9bf68cd959076d2d9790..a70a94d14bdfa993feab60b8e4f32e1002cf38cc 100644 --- a/extensions/browser/guest_view/extension_options/extension_options_guest.h +++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h @@ -58,8 +58,7 @@ class ExtensionOptionsGuest @@ -316,7 +316,7 @@ index 0d6ab312e2bdfac8f1d75ecb5df990d3d158b288..edcdae5183d5a2bcca31b440870f40ed content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index ded1894a7d1d7cc7929af3435978a0eb4a1ac781..3312dc397c96f9c5edc40feb8760ac08aac6dc45 100644 +index 0b01120f6a6053ab03355c93216d703d0958aeab..a1c6c5a4b507bbf50668d7ed2febe97aca942c1d 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc @@ -388,8 +388,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden( @@ -330,7 +330,7 @@ index ded1894a7d1d7cc7929af3435978a0eb4a1ac781..3312dc397c96f9c5edc40feb8760ac08 } diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index 4c0820c60e7654657bdb46efbbf072d8bfe149d0..c1c0e744a81c0dee8a3fd3e12d56d7f1bd5e7f1c 100644 +index ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec4844497334 100644 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h @@ -171,8 +171,7 @@ class MimeHandlerViewGuest @@ -344,10 +344,10 @@ index 4c0820c60e7654657bdb46efbbf072d8bfe149d0..c1c0e744a81c0dee8a3fd3e12d56d7f1 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc -index 7d9e445c8b2c727787854aa6e296f2e3784942fb..c82b0b86ab93aceb0d8c0bd5562e72d823166010 100644 +index 424c5f89440dccc29f3431e034d0a4fd4f647a00..8d40d0bd30fc28e841eedb3f34be3c033db62449 100644 --- a/fuchsia/engine/browser/frame_impl.cc +++ b/fuchsia/engine/browser/frame_impl.cc -@@ -401,8 +401,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -402,8 +402,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -358,10 +358,10 @@ index 7d9e445c8b2c727787854aa6e296f2e3784942fb..c82b0b86ab93aceb0d8c0bd5562e72d8 // can catch bad client behavior while not interfering with normal operation. constexpr size_t kMaxPendingWebContentsCount = 10; diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h -index 38b5f8871464fc59c26e619dc2cdcc00711e2ce5..1ba0ac9d291a06f8a23e814742c38fdf382a05ec 100644 +index f2054bca778784c223beb02de150cfeb31c52907..53bf6bc205e9c631597bfbda46f4a0b5b4bb72ed 100644 --- a/fuchsia/engine/browser/frame_impl.h +++ b/fuchsia/engine/browser/frame_impl.h -@@ -290,8 +290,7 @@ class FrameImpl : public fuchsia::web::Frame, +@@ -307,8 +307,7 @@ class FrameImpl : public fuchsia::web::Frame, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -372,10 +372,10 @@ index 38b5f8871464fc59c26e619dc2cdcc00711e2ce5..1ba0ac9d291a06f8a23e814742c38fdf int opener_render_process_id, int opener_render_frame_id, diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc -index 6fa4fa667839531f3ca6ca80f8bf17e135739688..bf56fbe1b7aee1a41a18d1cd98641034ba97a903 100644 +index 2214ba7726f105e62bdc92bd0e6142ea9fa6ed72..2b9b804106317bfc914efacc7adfd282563e4c8b 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc -@@ -177,8 +177,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { +@@ -176,8 +176,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch index c72ca8a8d03e9..262ac6344b129 100644 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch @@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from Electrons grit header instead of Chromes diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 3210670738694953fdd65b1d0c2ca30d7c29d8c9..8f418d78b7ac7a23d80f44e23d430febe641cf0a 100644 +index ec55c3f97988a7de06a738e61e389ba07712ad4e..6a40a73520a951d7c6fd06cbd07329a40ff41544 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -7016,6 +7016,7 @@ static_library("browser") { +@@ -7088,6 +7088,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", @@ -19,11 +19,11 @@ index 3210670738694953fdd65b1d0c2ca30d7c29d8c9..8f418d78b7ac7a23d80f44e23d430feb if (!is_android) { diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc -index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581ccb20bfc5a 100644 +index 7c3b6a69acb16186add5d467dbc22360d90d46d4..703e2ce60f4f35f9c71e8b503ffd62f9ea8f365a 100644 --- a/chrome/browser/spellchecker/spellcheck_factory.cc +++ b/chrome/browser/spellchecker/spellcheck_factory.cc -@@ -6,7 +6,7 @@ - +@@ -7,7 +7,7 @@ + #include "build/build_config.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/spellchecker/spellcheck_service.h" -#include "chrome/grit/locale_settings.h" @@ -32,7 +32,7 @@ index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581cc #include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_service.h" diff --git a/components/language/core/browser/BUILD.gn b/components/language/core/browser/BUILD.gn -index 777634b4f93467051ea9e9e9fe448204a9c28cf1..11454e9e7cd06717033631cc4627c3d061301863 100644 +index fdba4ca90882656d6ba369dae48d5dfc13991cb8..fb3b759362275aafd4ed01a7865a4dd0dfaad727 100644 --- a/components/language/core/browser/BUILD.gn +++ b/components/language/core/browser/BUILD.gn @@ -30,6 +30,7 @@ static_library("browser") { @@ -44,7 +44,7 @@ index 777634b4f93467051ea9e9e9fe448204a9c28cf1..11454e9e7cd06717033631cc4627c3d0 ] } diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc -index 0c34853eba1243519f10bfd5e4dfa5d479a97bcc..99632534a06c11b9e8cb000151fb28e64a5ca0c7 100644 +index 26f86d67c32b2a022698ae5ea5509912d2ccfacb..d48844d49308d67ee7bfa823335c7443173badbe 100644 --- a/components/language/core/browser/language_prefs.cc +++ b/components/language/core/browser/language_prefs.cc @@ -22,7 +22,7 @@ diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index d237b2206d49d..e1eba13e55ffa 100644 --- a/patches/chromium/chrome_key_systems.patch +++ b/patches/chromium/chrome_key_systems.patch @@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm, as its not supported in the current version of chrome. diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc -index 2bead927915b87261c7c4f953e73a887751ec81a..bff0fce048ea59696fec56eec40e8cd3682e821f 100644 +index 0cdaa37db5a4c992c8051a6e4370f61b3e4559a3..58108239e1b5aad967eff63d8eed10a560726c6e 100644 --- a/chrome/renderer/media/chrome_key_systems.cc +++ b/chrome/renderer/media/chrome_key_systems.cc @@ -17,7 +17,9 @@ @@ -20,7 +20,7 @@ index 2bead927915b87261c7c4f953e73a887751ec81a..bff0fce048ea59696fec56eec40e8cd3 #include "components/cdm/renderer/external_clear_key_key_system_properties.h" #include "components/cdm/renderer/widevine_key_system_properties.h" #include "content/public/renderer/render_thread.h" -@@ -200,12 +202,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { +@@ -230,12 +232,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability) { // Returns persistent-license session support. EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) { diff --git a/patches/chromium/command-ismediakey.patch b/patches/chromium/command-ismediakey.patch index 6006b5064d291..3a7e3c694cc04 100644 --- a/patches/chromium/command-ismediakey.patch +++ b/patches/chromium/command-ismediakey.patch @@ -87,10 +87,10 @@ index 0f344ee352a48497e77a72bb298146c61e7fcf2a..3bad4263ea552fc63445bf5613f8add7 // Create an observer that registers a hot key for |accelerator|. std::unique_ptr observer = diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc -index 4145418210c2b1033390ec8a2e657cb1fcd048f8..5938f75742b793868638e693a9a8c8dc686dfc46 100644 +index 4e9e4f4d21fbe650d8f32254a3b450074a038751..ac923f436cbdd6ded0629da4e4c659d94258e55b 100644 --- a/content/browser/media/media_keys_listener_manager_impl.cc +++ b/content/browser/media/media_keys_listener_manager_impl.cc -@@ -290,6 +290,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { +@@ -296,6 +296,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() { case ui::VKEY_MEDIA_STOP: system_media_controls_->SetIsStopEnabled(should_enable); break; diff --git a/patches/chromium/crash_allow_disabling_compression_on_linux.patch b/patches/chromium/crash_allow_disabling_compression_on_linux.patch index 39cd097c8cafb..6f4a3b926bbc6 100644 --- a/patches/chromium/crash_allow_disabling_compression_on_linux.patch +++ b/patches/chromium/crash_allow_disabling_compression_on_linux.patch @@ -13,7 +13,7 @@ Ultimately we should remove the option to disable compression, and subsequently remove this patch. diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index 5b308900ae8e9d49d711a1638e40c22d1d45af80..87e222070ce5bbd2f9f5c8bac6db7367b6161931 100644 +index 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb880264464787eb32 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -110,6 +110,8 @@ void SetUploadURL(const std::string& url) { @@ -25,7 +25,7 @@ index 5b308900ae8e9d49d711a1638e40c22d1d45af80..87e222070ce5bbd2f9f5c8bac6db7367 #endif bool g_is_node = false; -@@ -1323,56 +1325,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, +@@ -1322,56 +1324,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, #else // BUILDFLAG(IS_CHROMEOS_ASH) @@ -127,7 +127,7 @@ index 5b308900ae8e9d49d711a1638e40c22d1d45af80..87e222070ce5bbd2f9f5c8bac6db7367 static const char header_msg[] = "--header=Content-Type: multipart/form-data; boundary="; const size_t header_content_type_size = -@@ -1399,7 +1405,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, +@@ -1398,7 +1404,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, static const char kWgetBinary[] = "/usr/bin/wget"; const char* args[] = { kWgetBinary, @@ -137,7 +137,7 @@ index 5b308900ae8e9d49d711a1638e40c22d1d45af80..87e222070ce5bbd2f9f5c8bac6db7367 header_content_type, post_file, g_upload_url, -@@ -2040,6 +2047,7 @@ void InitCrashReporter(const std::string& process_type) { +@@ -2039,6 +2046,7 @@ void InitCrashReporter(const std::string& process_type) { #if !BUILDFLAG(IS_CHROMEOS_ASH) SetUploadURL(GetCrashReporterClient()->GetUploadUrl()); diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index 3ddffd4177ab7..c16edea8ac147 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -9,7 +9,7 @@ rate-limiting, compression and global annotations. This should be upstreamed. diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc -index ec5b5b9b4da3b19e851c414695b2150b6588ecc7..f55fd1c92770de6b8bce1fc46a047c79228d451e 100644 +index 823e49a234e3dd31bf6527c2e4efa96f3d23f1f2..43f6d476f3ee2759cf41c492f932522994e7ddec 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc @@ -112,6 +112,7 @@ void SetUploadURL(const std::string& url) { @@ -21,10 +21,10 @@ index ec5b5b9b4da3b19e851c414695b2150b6588ecc7..f55fd1c92770de6b8bce1fc46a047c79 uint64_t g_process_start_time = 0; pid_t g_pid = 0; diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc -index 89b4bfccd5d3278231726184547378805fb30ed5..9f0cb9d52e2f7fc0c1808500b775bc28b4514d00 100644 +index 82b7f241e26184240260d0b6287ded159681e15b..abbb267f6a40de0cdf4d09700f9dd444a575fbdf 100644 --- a/components/crash/core/app/crash_reporter_client.cc +++ b/components/crash/core/app/crash_reporter_client.cc -@@ -139,6 +139,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) { +@@ -141,6 +141,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) { return false; } @@ -39,11 +39,11 @@ index 89b4bfccd5d3278231726184547378805fb30ed5..9f0cb9d52e2f7fc0c1808500b775bc28 +void CrashReporterClient::GetProcessSimpleAnnotations(std::map* annotations) { +} + - #if defined(OS_ANDROID) + #if BUILDFLAG(IS_ANDROID) unsigned int CrashReporterClient::GetCrashDumpPercentage() { return 100; diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h -index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c318334080b 100644 +index 24e53fa62c2c4a11494ad3d43f0c5a806930fcdd..9b691baa6cc90cc3f9ada307c43f44c4353e2487 100644 --- a/components/crash/core/app/crash_reporter_client.h +++ b/components/crash/core/app/crash_reporter_client.h @@ -5,6 +5,7 @@ @@ -54,7 +54,7 @@ index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c31 #include #include "build/build_config.h" -@@ -144,6 +145,19 @@ class CrashReporterClient { +@@ -146,6 +147,19 @@ class CrashReporterClient { // that case, |breakpad_enabled| is set to the value enforced by policies. virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled); @@ -71,14 +71,14 @@ index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c31 + virtual void GetProcessSimpleAnnotations( + std::map* annotations); + - #if defined(OS_ANDROID) + #if BUILDFLAG(IS_ANDROID) // Used by WebView to sample crashes without generating the unwanted dumps. If // the returned value is less than 100, crash dumping will be sampled to that diff --git a/components/crash/core/app/crashpad_linux.cc b/components/crash/core/app/crashpad_linux.cc -index 212bc8359f454132b3cab81449075c1f18d5bd5b..771197daea11b2b7a9f9e845d3fd886913f1539b 100644 +index dc2b18b322350121768571b7997d632a10220ac9..3e3ee0f721a2316d324fb31e17ba97ff24d9e6d7 100644 --- a/components/crash/core/app/crashpad_linux.cc +++ b/components/crash/core/app/crashpad_linux.cc -@@ -179,6 +179,7 @@ bool PlatformCrashpadInitialization( +@@ -180,6 +180,7 @@ bool PlatformCrashpadInitialization( // where crash_reporter provides it's own values for lsb-release. annotations["lsb-release"] = base::GetLinuxDistro(); #endif @@ -86,7 +86,7 @@ index 212bc8359f454132b3cab81449075c1f18d5bd5b..771197daea11b2b7a9f9e845d3fd8869 std::vector arguments; if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) { -@@ -200,6 +201,13 @@ bool PlatformCrashpadInitialization( +@@ -201,6 +202,13 @@ bool PlatformCrashpadInitialization( } #endif diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 718ddfd6c8839..5374f0423050e 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,17 +17,18 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc -index cb6b39ee5cf75fec6cf015072eb1f5be08dcf7c4..269cde5100ff1380a9429e7aad1018b50cc01957 100644 +index 183503c7d9891b7e651f0cac4b2dc97157b61928..1630a0a49a4b88ceda0ee14980236dc614b42c67 100644 --- a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc +++ b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc -@@ -432,7 +432,7 @@ void MobileFriendlinessChecker::ComputeSmallTextRatio( +@@ -511,8 +511,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint( ->GetPageScaleConstraintsSet() .FinalConstraints() .initial_scale; - DCHECK_GT(initial_scale, 0); +- + // DCHECK_GT(initial_scale, 0); double actual_font_size = - style.FontSize() * initial_scale / viewport_scalar_; + style.FontSize() * initial_scale / viewport_scalar; double area = text->PhysicalAreaSize(); diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc index fe8d191217e24b08d36339dbf047beaeb6bd6538..870db0552544e3e89d9498c22ec3db81b46df741 100644 diff --git a/patches/chromium/desktop_media_list.patch b/patches/chromium/desktop_media_list.patch index 636f3f8bff8be..de4da5324bf23 100644 --- a/patches/chromium/desktop_media_list.patch +++ b/patches/chromium/desktop_media_list.patch @@ -82,10 +82,10 @@ index 1e4a652634fbde2ca9a256baca840bbc5a0e001f..546f5bc3a2f79035f0eec196d9e704b8 const Source& GetSource(int index) const override; DesktopMediaList::Type GetMediaListType() const override; diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87acf0b622 100644 +index 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..2026b926eee56f6b235963b23ab86b2743eaed90 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc -@@ -17,7 +17,7 @@ +@@ -18,7 +18,7 @@ #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/browser/media/webrtc/desktop_media_list.h" @@ -94,10 +94,10 @@ index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87 #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/content_features.h" -@@ -95,8 +95,9 @@ gfx::ImageSkia ScaleDesktopFrame(std::unique_ptr frame, - } +@@ -127,8 +127,9 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) { + #endif // BUILDFLAG(IS_WIN) - #if defined(OS_MAC) + #if BUILDFLAG(IS_MAC) +// Refs https://github.com/electron/electron/pull/30507 const base::Feature kWindowCaptureMacV2{"WindowCaptureMacV2", - base::FEATURE_ENABLED_BY_DEFAULT}; @@ -105,7 +105,7 @@ index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87 #endif } // namespace -@@ -274,6 +275,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { +@@ -415,6 +416,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() { FROM_HERE, base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished, media_list_)); @@ -115,7 +115,7 @@ index 04dbc1f44944abd3333e83b603dcdf755c0cb09d..d3a722f60c67d6177c3ca0bfc1329b87 } void NativeDesktopMediaList::Worker::OnCaptureResult( -@@ -435,6 +439,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( +@@ -628,6 +632,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows( FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails, base::Unretained(worker_.get()), std::move(native_ids), thumbnail_size_)); diff --git a/patches/chromium/disable-redraw-lock.patch b/patches/chromium/disable-redraw-lock.patch index cc5ba533a25f2..678825807237a 100644 --- a/patches/chromium/disable-redraw-lock.patch +++ b/patches/chromium/disable-redraw-lock.patch @@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue can be found at https://github.com/electron/electron/issues/1821 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 387b5a7fd9c1971686ee577c5ec8ef9abdb00f74..0b714bac63853fb67f1b5b953c71f7120a266ca9 100644 +index bf32a083d0f0873e112debe0e88ab1be8125a417..8ca72461bb7b42f1bc0da249a36f0fcf9ab6f13c 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -308,6 +308,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500; @@ -37,7 +37,7 @@ index 387b5a7fd9c1971686ee577c5ec8ef9abdb00f74..0b714bac63853fb67f1b5b953c71f712 (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -978,6 +983,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { +@@ -986,6 +991,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() { return scoped_enable; } @@ -49,7 +49,7 @@ index 387b5a7fd9c1971686ee577c5ec8ef9abdb00f74..0b714bac63853fb67f1b5b953c71f712 // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index 06b1e3552bb144dea11a100039e354c82657dc79..f6691252bd593e83fdda4fac73498df9d1cf3af6 100644 +index f4efdc7174b90e57fb332f031530545e493a2e0d..9d45f97b930831a703efab2bbdf10afb61140c7f 100644 --- a/ui/views/win/hwnd_message_handler.h +++ b/ui/views/win/hwnd_message_handler.h @@ -205,6 +205,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl, diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index e7c735f81408d..dac0d9fbd0df3 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -20,22 +20,21 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index c13c06406ec4abd012082c5bfef02f2692a9bba1..0e82b376f740fcd51a608e4f99fcd7a016eefe5f 100644 +index 61ab59e0d97a392ae18c1d7ad7dd606b5cd1c567..2a899818ebb67ba4fc06ccbcff3ee03f6b83c0e6 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1893,6 +1893,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( - - gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace( +@@ -1882,6 +1882,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( + TargetColorParams LayerTreeHostImpl::GetTargetColorParams( gfx::ContentColorUsage content_color_usage) const { + TargetColorParams params; + if (!settings_.enable_color_correct_rendering) { -+ return {}; ++ return params; + } -+ - constexpr gfx::ColorSpace srgb = gfx::ColorSpace::CreateSRGB(); // If we are likely to software composite the resource, we use sRGB because + // software compositing is unable to perform color conversion. diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index 86180d4f001a7f849553a4bd5401d69fe4f1bec2..953b1f4f24e55e127af5fcb5fb3c4e1e3f23429d 100644 +index 64f1a3a3cb8d82235ff04f5c01a7cf571d8ba00c..ffa8d1a53870663647e423975f00e5650c6ab579 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -93,6 +93,8 @@ class CC_EXPORT LayerTreeSettings { @@ -48,7 +47,7 @@ index 86180d4f001a7f849553a4bd5401d69fe4f1bec2..953b1f4f24e55e127af5fcb5fb3c4e1e // Image Decode Service and raster tiles without images until the decode is // ready. diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h -index e58b4023652785fa8ea47236a5ad7237c7ea6ed2..4ec673ea93410ee00b1af4330fdc8b5267ed6dfa 100644 +index d8e2bd1e55a52e86dda5c1b69c425b49e16538bd..80e2c77066f24e99a1894faadbf1d030a188ffa9 100644 --- a/components/viz/common/display/renderer_settings.h +++ b/components/viz/common/display/renderer_settings.h @@ -24,6 +24,7 @@ class VIZ_COMMON_EXPORT RendererSettings { @@ -60,7 +59,7 @@ index e58b4023652785fa8ea47236a5ad7237c7ea6ed2..4ec673ea93410ee00b1af4330fdc8b52 bool force_antialiasing = false; bool force_blending_with_shaders = false; diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc -index d79f3beb58085672e0a67825a0b60de2a3aeb499..5f7ca2ea0d012be5518dd07ade8cf2820b4fd7a9 100644 +index 6a830ec9f29b9764cd425f0681dafbb18d90b457..a7a095ceb9e626c79db21e0d16c8ef47da860679 100644 --- a/components/viz/host/renderer_settings_creation.cc +++ b/components/viz/host/renderer_settings_creation.cc @@ -17,6 +17,7 @@ @@ -69,9 +68,9 @@ index d79f3beb58085672e0a67825a0b60de2a3aeb499..5f7ca2ea0d012be5518dd07ade8cf282 #include "ui/base/ui_base_switches.h" +#include "ui/gfx/switches.h" - #if defined(OS_APPLE) - #include "ui/base/cocoa/remote_layer_api.h" -@@ -53,6 +54,8 @@ bool GetSwitchValueAsInt(const base::CommandLine* command_line, + #if defined(USE_OZONE) + #include "ui/ozone/public/ozone_platform.h" +@@ -49,6 +50,8 @@ bool GetSwitchValueAsInt(const base::CommandLine* command_line, RendererSettings CreateRendererSettings() { RendererSettings renderer_settings; base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); @@ -81,7 +80,7 @@ index d79f3beb58085672e0a67825a0b60de2a3aeb499..5f7ca2ea0d012be5518dd07ade8cf282 !command_line->HasSwitch(switches::kUIDisablePartialSwap); diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b30436703aab 100644 +index deb95d2f0728b27af6115674094cc1b7a8e25807..339fe73954f33fb7bbc17f88b949187690aca71c 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -87,6 +87,9 @@ @@ -163,7 +162,7 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 + gfx::ColorSpace dst_color_space = + PATCH_CS(CurrentRenderPassColorSpace()); - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) // Force sRGB output on Windows for overlay candidate video quads to match @@ -2768,7 +2777,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, @@ -186,7 +185,7 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 /*adjust_src_white_level=*/draw_cache_.is_video_frame, locked_quad.hdr_metadata()); -@@ -3693,7 +3703,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, +@@ -3697,7 +3707,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, const gfx::ColorSpace& dst_color_space, bool adjust_src_white_level, absl::optional hdr_metadata) { @@ -197,7 +196,7 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 gfx::ColorSpace adjusted_src_color_space = src_color_space; if (adjust_src_white_level && src_color_space.IsHDR()) { // TODO(b/183236148): consider using the destination's HDR static metadata -@@ -4076,9 +4088,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( +@@ -4085,9 +4097,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple); } @@ -210,7 +209,7 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 *new_bounds = gfx::RectF(updated_dst_rect.origin(), gfx::SizeF((*overlay_texture)->texture.size())); -@@ -4298,8 +4310,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { +@@ -4307,8 +4319,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { PrepareGeometry(SHARED_BINDING); @@ -222,17 +221,17 @@ index e768356b9b7ebead39aedfcaf5aeba001bd667be..06de4adb9edaad6c65bc90114f89b304 gfx::Transform render_matrix; render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -4488,3 +4501,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default; - GLRenderer::OverlayTexture::~OverlayTexture() = default; +@@ -4514,3 +4527,5 @@ bool GLRenderer::ColorTransformKey::operator<( + } } // namespace viz + +#undef PATCH_CS diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index ec1ba57d8b0fc42c3c1dc85542f70c595e1eb464..c88cdac173ec22ea5df27a166f9e87ebe0100be4 100644 +index f5d73922086b5b27907fd393d4d4204a574c3b25..5b09f5ef5f04b519ed4148498c82d003c9fd6c91 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc -@@ -229,6 +229,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( +@@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( // Command-line switches to propagate to the GPU process. static const char* const kSwitchNames[] = { @@ -241,10 +240,10 @@ index ec1ba57d8b0fc42c3c1dc85542f70c595e1eb464..c88cdac173ec22ea5df27a166f9e87eb sandbox::policy::switches::kGpuSandboxAllowSysVShm, sandbox::policy::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index e044bc3739ad21c3d9704ddfa56116fae944e57a..8dfdd81a04c77e3c2ffc4317a859a689ca8ed66e 100644 +index ac9570fa3d9cb3b0026f70465e5b21ac7778c3df..acc0e121e7746da397cfab07b3707de7ae9a3143 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -192,6 +192,7 @@ +@@ -194,6 +194,7 @@ #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ui_base_switches.h" #include "ui/display/display_switches.h" @@ -252,7 +251,7 @@ index e044bc3739ad21c3d9704ddfa56116fae944e57a..8dfdd81a04c77e3c2ffc4317a859a689 #include "ui/gl/gl_switches.h" #include "url/gurl.h" #include "url/origin.h" -@@ -3288,6 +3289,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3283,6 +3284,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { @@ -261,7 +260,7 @@ index e044bc3739ad21c3d9704ddfa56116fae944e57a..8dfdd81a04c77e3c2ffc4317a859a689 sandbox::policy::switches::kDisableSeccompFilterSandbox, sandbox::policy::switches::kNoSandbox, diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc -index f4d66861abb000e98fa613ec0bdd7096f891b6da..972efa2b1462d91ec7f6f28da0296138ef2c9656 100644 +index 6260d73068636f4a8d4c73c161a4ffe165b267d0..2686ef0dfb7d8b667647d11fece5aa8e1be76fe5 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc @@ -4,6 +4,7 @@ @@ -280,7 +279,7 @@ index f4d66861abb000e98fa613ec0bdd7096f891b6da..972efa2b1462d91ec7f6f28da0296138 namespace blink { -@@ -129,6 +131,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const { +@@ -118,6 +120,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const { } gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const { @@ -293,7 +292,7 @@ index f4d66861abb000e98fa613ec0bdd7096f891b6da..972efa2b1462d91ec7f6f28da0296138 } diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc -index d8976665cc201e379b0a9ecd8d953eb63e10b74b..461e26d275886f3690255ab17f374aaeda7dd017 100644 +index 49ef0d352cfb6163499fa42416187595c7011a68..d5bc620847872fcba96f6941be529428755d83a2 100644 --- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc +++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc @@ -24,6 +24,7 @@ @@ -304,7 +303,7 @@ index d8976665cc201e379b0a9ecd8d953eb63e10b74b..461e26d275886f3690255ab17f374aae #include "ui/native_theme/native_theme_features.h" #include "ui/native_theme/overlay_scrollbar_constants_aura.h" -@@ -177,6 +178,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( +@@ -184,6 +185,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); @@ -315,7 +314,7 @@ index d8976665cc201e379b0a9ecd8d953eb63e10b74b..461e26d275886f3690255ab17f374aae // is what the renderer uses if its not threaded. settings.enable_checker_imaging = diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc -index 7f5b6cc73cde4312720f4a6f54cb54ceb8709e15..1b76e0388d972b40619082f57019478754060068 100644 +index 298321f1aabcf4328fd39b856694a8a6459bfa24..4be245d082cd9d833db72b29e3d652120ecb913e 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -21,6 +21,7 @@ @@ -358,7 +357,7 @@ index 7f5b6cc73cde4312720f4a6f54cb54ceb8709e15..1b76e0388d972b40619082f570194787 if (__builtin_available(macos 10.12, *)) { IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB); diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc -index bea10b469ead89de3a090bb6119c9a68e49db5d6..332f0f7b08605179d9359ef603e70d7fd8426303 100644 +index be932ac3094a441cd5d9afa2ffd2c6d4a64ce559..a6aa9b4c6ba958eb81276911368cd053b9fb59f8 100644 --- a/ui/gfx/switches.cc +++ b/ui/gfx/switches.cc @@ -11,6 +11,8 @@ namespace switches { @@ -371,7 +370,7 @@ index bea10b469ead89de3a090bb6119c9a68e49db5d6..332f0f7b08605179d9359ef603e70d7f // sharpness, kerning, hinting and layout. const char kDisableFontSubpixelPositioning[] = diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h -index 2b97abc9a0357972eff127761aa4a3cff5f34dbb..62be43283095895871221b4175ae26a5af73ec74 100644 +index 442809de1631081efbe062922539318f5172a5ae..b8e5c7e53d58a06175105c9396a7d976bda7a4bd 100644 --- a/ui/gfx/switches.h +++ b/ui/gfx/switches.h @@ -12,6 +12,7 @@ diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index d868e255965a8..23daa8d150e30 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron. diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 7bdca5042ada597afe4228bab16489665eb29e24..da7feca7a5efa8fa3c3b1af9d4487ae3127fefb6 100644 +index 58002d37ba340f84f47e2522c0d7bf7c1a64c5d2..bc0a73f08e77bf13eb1cafa55f955e6083071104 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -510,7 +510,11 @@ diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index b4409d34b75f2..755b0eb4b9951 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,7 +6,7 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 367c17952131a789a834eb62000c7ebcc2b3249c..b0820c4411952ee0adf3dd4cbc6abb26c0368373 100644 +index 03e318b14025f3c971d471351068986f8a1dd14d..59437e69e25fe85cffc9b558dec2284123ac48be 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc @@ -803,6 +803,9 @@ void RenderWidgetHostImpl::WasHidden() { @@ -20,10 +20,10 @@ index 367c17952131a789a834eb62000c7ebcc2b3249c..b0820c4411952ee0adf3dd4cbc6abb26 blink::mojom::PointerLockResult::kWrongDocument); diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h -index da4223e064f945fb7c19742ab01249c5a18238fc..4a88b0197b96c3b4fde090ae63dccb5831fbe10a 100644 +index 5cc97c9c8305bf23b7cdf39ea68c304fac20b479..a6a65a251711394a33fb02bd66c2eeb7b559f711 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -875,6 +875,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -877,6 +877,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl void OnLocalSurfaceIdChanged( const cc::RenderFrameMetadata& metadata) override; @@ -34,10 +34,10 @@ index da4223e064f945fb7c19742ab01249c5a18238fc..4a88b0197b96c3b4fde090ae63dccb58 // |routing_id| must not be MSG_ROUTING_NONE. // If this object outlives |delegate|, DetachDelegate() must be called when diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index d295a11bbb3436fdbbbd85eaeacba941da71be60..bcb84ec6d5cf755f9360ae8bf9fa60dd38790219 100644 +index a819dcf960a4c70c0c8cd57710971de2c41e13ca..bbc3671c3fa8e058b8f107d601233735c0822297 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -627,7 +627,7 @@ void RenderWidgetHostViewAura::HideImpl() { +@@ -619,7 +619,7 @@ void RenderWidgetHostViewAura::HideImpl() { DCHECK(visibility_ == Visibility::HIDDEN || visibility_ == Visibility::OCCLUDED); diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 30a56ad131425..cc1a3911ab8ab 100644 --- a/patches/chromium/disable_unload_metrics.patch +++ b/patches/chromium/disable_unload_metrics.patch @@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we should continue seeking for a real fix. diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc -index 1462a2248b25aa5ba538e090dd52173ad0670c56..bbceb3be9442077c54cc8a3989e7c745ccfb3474 100644 +index a460f4643881a0bd70a863884aa50ae76e25c3b7..0635d66dad36e2d6042dd317962527793f5b96f7 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1158,6 +1158,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1159,6 +1159,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index 1462a2248b25aa5ba538e090dd52173ad0670c56..bbceb3be9442077c54cc8a3989e7c745 // If this is a same-process navigation and we have timestamps for unload // durations, fill those metrics out as well. if (params.unload_start && params.unload_end && -@@ -1204,6 +1205,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1205,6 +1206,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } diff --git a/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch b/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch index 2dc41907bd58b..6bd042bd527b8 100644 --- a/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch +++ b/patches/chromium/don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch @@ -6,10 +6,10 @@ Subject: Don't run PCScan functions if PCScan is disabled PCScan should not be invoked if PCScan is disabled. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/2916657. diff --git a/base/allocator/partition_allocator/memory_reclaimer.cc b/base/allocator/partition_allocator/memory_reclaimer.cc -index cc4c5bad93175e309c21bc39e95e7473a22d1a7f..446fca9ebdf6f87a697905d0114a88f5f7c5214a 100644 +index 63819bf2593894bd763547d58cfae31d821bd7eb..a4ee9520cfc11125837e42955f8f6f6c3f21bf9e 100644 --- a/base/allocator/partition_allocator/memory_reclaimer.cc +++ b/base/allocator/partition_allocator/memory_reclaimer.cc -@@ -94,7 +94,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) { +@@ -67,7 +67,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) { // // Lastly decommit empty slot spans and lastly try to discard unused pages at // the end of the remaining active slots. @@ -19,10 +19,10 @@ index cc4c5bad93175e309c21bc39e95e7473a22d1a7f..446fca9ebdf6f87a697905d0114a88f5 using PCScan = internal::PCScan; const auto invocation_mode = flags & PartitionPurgeAggressiveReclaim diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc -index dfdd94db5d929b89671b93c991037dac957690c5..02543e37003dd0524f5321d4aa75f9f2f6899f57 100644 +index 4bfe2501309e832dc9962d5f4642c6b7c782f83d..c45f1207be984fae9aee2cc5b9a7c405ed5ed96e 100644 --- a/base/threading/platform_thread_posix.cc +++ b/base/threading/platform_thread_posix.cc -@@ -42,6 +42,7 @@ +@@ -43,6 +43,7 @@ #endif #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) @@ -30,26 +30,26 @@ index dfdd94db5d929b89671b93c991037dac957690c5..02543e37003dd0524f5321d4aa75f9f2 #include "base/allocator/partition_allocator/starscan/pcscan.h" #include "base/allocator/partition_allocator/starscan/stack/stack.h" #endif -@@ -75,7 +76,7 @@ void* ThreadFunc(void* params) { +@@ -76,7 +77,7 @@ void* ThreadFunc(void* params) { base::DisallowSingleton(); - #if !defined(OS_NACL) + #if !BUILDFLAG(IS_NACL) -#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN) internal::PCScan::NotifyThreadCreated(internal::GetStackPointer()); #endif -@@ -101,7 +102,7 @@ void* ThreadFunc(void* params) { +@@ -102,7 +103,7 @@ void* ThreadFunc(void* params) { PlatformThread::CurrentHandle().platform_handle(), PlatformThread::CurrentId()); --#if !defined(OS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -+#if !defined(OS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN) +-#if !BUILDFLAG(IS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) ++#if !BUILDFLAG(IS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN) internal::PCScan::NotifyThreadDestroyed(); #endif diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc -index 047114ee7e2ad54cfd6240dda930ee6b5b067947..ba912d601ac12bc1a7c331d0bfc22acbecb86f3a 100644 +index c965c9764ad38a8b52b727ca98fe41f00ab6707d..7d44c4e63b2b4ccf595b5e2a0212fb6c4eb2b5bd 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc @@ -29,6 +29,7 @@ @@ -69,8 +69,8 @@ index 047114ee7e2ad54cfd6240dda930ee6b5b067947..ba912d601ac12bc1a7c331d0bfc22acb internal::PCScan::NotifyThreadCreated(internal::GetStackPointer()); #endif -@@ -127,7 +128,7 @@ DWORD __stdcall ThreadFunc(void* params) { - PlatformThread::CurrentId()); +@@ -125,7 +126,7 @@ DWORD __stdcall ThreadFunc(void* params) { + PlatformThread::CurrentId()); } -#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) diff --git a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch index 02a40a1560a1e..017e3d5431128 100644 --- a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch +++ b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch @@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572 Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index c7a5f0916cf8ba6db6fa85537c140024a92ff24d..54136bae9e3b8a1a36be132323ee86f28bdf0b98 100644 +index 44c0ec9815aafd61182fd18a9d125e185d7196bc..a77c39adfc687d43004341d4ca9e6fa676c814f5 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2404,7 +2404,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { +@@ -2394,7 +2394,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch b/patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch deleted file mode 100644 index a27193a4aeb64..0000000000000 --- a/patches/chromium/drop_extra_printingcontext_calls_to_newpage_pagedone.patch +++ /dev/null @@ -1,511 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alan Screen -Date: Wed, 5 Jan 2022 23:15:29 +0000 -Subject: Drop extra PrintingContext calls to NewPage/PageDone - -When system calls were refactored out of PrintedDocument in -https://crrev.com/948253, there were extra calls to PrintingContext -NewPage() and PageDone() left in PrintedDocument::RenderPrintedDocument. -These had no effect on Windows or Linux, but caused an issue for macOS. - -This was undetected by tests which use TestPrintingContext, and would -only be detectable if a test was capable of using system drivers (which -generally does not occur on the bots). Adding a test to detect this is -difficult at this time, but should be easier to do once later portions -of the out-of-process print drivers commit chains fill in more testing -capabilities. At that point it should be easier to fire off a request -to have the macOS Preview be the output. https://crbug.com/1284745 -has been filed to capture this needed effort. - -Remove NewPage()/PageDone() as common methods to override from -PrintingContext and make these specific to macOS only. Update the -various implementations of PrintingContext::PrintDocument() to include -the aborted and in-print-job checks that were previously in all -NewPage() implementations. The same corresponding checks from -PageDone() can be handled by PrintedDocument::RenderPrintedDocument() -and PrintedDocumentWin::RenderPrintedPage(). There is no concern about -`in_print_job_` having changed during the lifetime of -RenderPrintedDocument()/RenderPrintedPage(), so just add extra checks -against printing having been asynchronouly aborted before allowing a -final successful return. - -Bug: 1283651 -Change-Id: I52992bc7550dd25d4ad9a1dc633c7d9452a27bb1 -Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3367333 -Reviewed-by: Lei Zhang -Commit-Queue: Alan Screen -Cr-Commit-Position: refs/heads/main@{#955936} - -diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index 4283a5743c695a7376722f80925722d9e7a6496e..992a59c32ea082e3593c0183819d1b174fc8db7a 100644 ---- a/chrome/browser/printing/print_job_worker.cc -+++ b/chrome/browser/printing/print_job_worker.cc -@@ -524,12 +524,6 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) { - DCHECK(task_runner_->RunsTasksInCurrentSequence()); - DCHECK_NE(page_number_, PageNumber::npos()); - -- // Preprocess. -- if (printing_context_->NewPage() != mojom::ResultCode::kSuccess) { -- OnFailure(); -- return; -- } -- - // Actual printing. - if (document_->RenderPrintedPage(*page, printing_context_.get()) != - mojom::ResultCode::kSuccess) { -@@ -537,12 +531,6 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) { - return; - } - -- // Postprocess. -- if (printing_context_->PageDone() != mojom::ResultCode::kSuccess) { -- OnFailure(); -- return; -- } -- - // Signal everyone that the page is printed. - DCHECK(print_job_); - print_job_->PostTask(FROM_HERE, -diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc -index e830a1017f2262d2d1c226aa16d41a6ffe53aadf..7daa9f9bedd664123d7590b9831169e99688b9c9 100644 ---- a/printing/emf_win_unittest.cc -+++ b/printing/emf_win_unittest.cc -@@ -115,7 +115,6 @@ TEST_F(EmfPrintingTest, Enumerate) { - // current directory. - // TODO(maruel): Clean the .PRN file generated in current directory. - context.NewDocument(u"EmfTest.Enumerate"); -- context.NewPage(); - // Process one at a time. - RECT page_bounds = emf.GetPageBounds(1).ToRECT(); - Emf::Enumerator emf_enum(emf, context.context(), &page_bounds); -@@ -129,7 +128,6 @@ TEST_F(EmfPrintingTest, Enumerate) { - EXPECT_TRUE(itr->SafePlayback(&emf_enum.context_)) - << " index: " << index << " type: " << itr->record()->iType; - } -- context.PageDone(); - context.DocumentDone(); - } - -diff --git a/printing/printed_document.cc b/printing/printed_document.cc -index 54dd798f4c76c34fd6414f68d3ad11a15c1673af..81ebe973fc6a99d66f5d8792aa19e01764f33d3f 100644 ---- a/printing/printed_document.cc -+++ b/printing/printed_document.cc -@@ -187,17 +187,18 @@ const MetafilePlayer* PrintedDocument::GetMetafile() { - - mojom::ResultCode PrintedDocument::RenderPrintedDocument( - PrintingContext* context) { -- mojom::ResultCode result = context->NewPage(); -+ base::AutoLock lock(lock_); -+ mojom::ResultCode result = context->PrintDocument( -+ *GetMetafile(), *immutable_.settings_, mutable_.expected_page_count_); - if (result != mojom::ResultCode::kSuccess) - return result; -- { -- base::AutoLock lock(lock_); -- result = context->PrintDocument(*GetMetafile(), *immutable_.settings_, -- mutable_.expected_page_count_); -- if (result != mojom::ResultCode::kSuccess) -- return result; -- } -- return context->PageDone(); -+ -+ // Beware of any asynchronous aborts of the print job that happened during -+ // printing. -+ if (context->PrintingAborted()) -+ return mojom::ResultCode::kCanceled; -+ -+ return mojom::ResultCode::kSuccess; - } - - bool PrintedDocument::IsComplete() const { -diff --git a/printing/printed_document_win.cc b/printing/printed_document_win.cc -index 4024150677fb64f8f8c9d53dfa73cf709c819a7c..8e34b288ec518c4e2d0c5d8113f38440ad2c648b 100644 ---- a/printing/printed_document_win.cc -+++ b/printing/printed_document_win.cc -@@ -24,8 +24,17 @@ mojom::ResultCode PrintedDocument::RenderPrintedPage( - #endif - - DCHECK(context); -- return context->RenderPage(page, -- immutable_.settings_->page_setup_device_units()); -+ mojom::ResultCode result = context->RenderPage( -+ page, immutable_.settings_->page_setup_device_units()); -+ if (result != mojom::ResultCode::kSuccess) -+ return result; -+ -+ // Beware of any asynchronous aborts of the print job that happened during -+ // printing. -+ if (context->PrintingAborted()) -+ return mojom::ResultCode::kCanceled; -+ -+ return mojom::ResultCode::kSuccess; - } - - } // namespace printing -diff --git a/printing/printing_context.h b/printing/printing_context.h -index e87170e6957733f06bcc296bcca3fc331557ed46..e196a7d448ca41ea02d523a4de410dedf4298b5e 100644 ---- a/printing/printing_context.h -+++ b/printing/printing_context.h -@@ -122,18 +122,12 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { - virtual mojom::ResultCode NewDocument( - const std::u16string& document_name) = 0; - -- // Starts a new page. -- virtual mojom::ResultCode NewPage() = 0; -- - #if defined(OS_WIN) - // Renders a page. - virtual mojom::ResultCode RenderPage(const PrintedPage& page, - const PageSetup& page_setup) = 0; - #endif - -- // Closes the printed page. -- virtual mojom::ResultCode PageDone() = 0; -- - // Prints the document contained in `metafile`. - virtual mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, -@@ -178,6 +172,8 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { - // Reinitializes the settings for object reuse. - void ResetSettings(); - -+ bool PrintingAborted() const { return abort_printing_; } -+ - int job_id() const { return job_id_; } - - protected: -diff --git a/printing/printing_context_android.cc b/printing/printing_context_android.cc -index c28a40eb0a9ce0058d9f85948eda5f83d0c64791..5b2f096cb2a705e7c4c7ebbeddbf93cac1b9eafb 100644 ---- a/printing/printing_context_android.cc -+++ b/printing/printing_context_android.cc -@@ -213,30 +213,13 @@ mojom::ResultCode PrintingContextAndroid::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextAndroid::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- --mojom::ResultCode PrintingContextAndroid::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextAndroid::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) { -+ if (abort_printing_) -+ return mojom::ResultCode::kCanceled; -+ DCHECK(in_print_job_); - DCHECK(is_file_descriptor_valid()); - - return metafile.SaveToFileDescriptor(fd_) ? mojom::ResultCode::kSuccess -diff --git a/printing/printing_context_android.h b/printing/printing_context_android.h -index 676d98949da675e3283969dd3c9c61028dc1c7b5..b4f2f25edec45f91f241b0b1a7bc73b3f51af252 100644 ---- a/printing/printing_context_android.h -+++ b/printing/printing_context_android.h -@@ -60,8 +60,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextAndroid - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/printing_context_chromeos.cc b/printing/printing_context_chromeos.cc -index d996c3e1f7b2d9f96f5c50aadff67f8273c7e760..670df66ae406fa883f801682de699aab16779591 100644 ---- a/printing/printing_context_chromeos.cc -+++ b/printing/printing_context_chromeos.cc -@@ -402,32 +402,14 @@ mojom::ResultCode PrintingContextChromeos::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextChromeos::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- --mojom::ResultCode PrintingContextChromeos::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextChromeos::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) { -+ if (abort_printing_) -+ return mojom::ResultCode::kCanceled; -+ DCHECK(in_print_job_); -+ - #if defined(USE_CUPS) - std::vector buffer; - if (!metafile.GetDataAsVector(&buffer)) -diff --git a/printing/printing_context_chromeos.h b/printing/printing_context_chromeos.h -index 77353372b2c6e003428d37ab634167e8dc824fa4..06cb16c8a569a4d90ccdccc5fefcaaf527e49f5f 100644 ---- a/printing/printing_context_chromeos.h -+++ b/printing/printing_context_chromeos.h -@@ -39,8 +39,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextChromeos - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/printing_context_linux.cc b/printing/printing_context_linux.cc -index c5adfa317747cda3d370a2ace52d843662f4ce91..204cec8311bec69674f1da2223e8d6c4b5a13ba3 100644 ---- a/printing/printing_context_linux.cc -+++ b/printing/printing_context_linux.cc -@@ -151,30 +151,13 @@ mojom::ResultCode PrintingContextLinux::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextLinux::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- --mojom::ResultCode PrintingContextLinux::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextLinux::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) { -+ if (abort_printing_) -+ return mojom::ResultCode::kCanceled; -+ DCHECK(in_print_job_); - DCHECK(print_dialog_); - // TODO(crbug.com/1252685) Plumb error code back from - // `PrintDialogGtkInterface`. -diff --git a/printing/printing_context_linux.h b/printing/printing_context_linux.h -index 17d768a24141954df80bed3c5dd6735c34115195..653170ba60e8341c972cb0126109d48394e0de7b 100644 ---- a/printing/printing_context_linux.h -+++ b/printing/printing_context_linux.h -@@ -45,8 +45,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextLinux : public PrintingContext { - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h -index 85363bd922bf0ab2630e3d5f350de0c58792963a..221019f5df71e1d66accbf2ea2d161bd1125666f 100644 ---- a/printing/printing_context_mac.h -+++ b/printing/printing_context_mac.h -@@ -35,8 +35,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -@@ -105,6 +103,12 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { - // Returns true is the pair is set. - bool SetKeyValue(base::StringPiece key, base::StringPiece value); - -+ // Starts a new page. -+ mojom::ResultCode NewPage(); -+ -+ // Closes the printed page. -+ mojom::ResultCode PageDone(); -+ - // The native print info object. - base::scoped_nsobject print_info_; - -diff --git a/printing/printing_context_no_system_dialog.cc b/printing/printing_context_no_system_dialog.cc -index c10123f35b11e1600c813080585a2282d775dba1..253507fcee5476f497421316bc42a0794f97b12b 100644 ---- a/printing/printing_context_no_system_dialog.cc -+++ b/printing/printing_context_no_system_dialog.cc -@@ -98,26 +98,6 @@ mojom::ResultCode PrintingContextNoSystemDialog::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextNoSystemDialog::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- --mojom::ResultCode PrintingContextNoSystemDialog::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextNoSystemDialog::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, -diff --git a/printing/printing_context_no_system_dialog.h b/printing/printing_context_no_system_dialog.h -index 2753d7ba7a09e1c5e88c1eb21a9b146034ea53f5..cb0d0b8c12535c83dbfc07ecb2817f0504b4a8ba 100644 ---- a/printing/printing_context_no_system_dialog.h -+++ b/printing/printing_context_no_system_dialog.h -@@ -32,8 +32,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextNoSystemDialog - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc -index 0addb52cd2f65b6f05b7cfb7cf8602baaf592541..4f1fb12619fc9bee0cce104ba60621008284d675 100644 ---- a/printing/printing_context_win.cc -+++ b/printing/printing_context_win.cc -@@ -366,18 +366,6 @@ mojom::ResultCode PrintingContextWin::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextWin::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(context_); -- DCHECK(in_print_job_); -- -- // Intentional No-op. MetafileSkia::SafePlayback takes care of calling -- // ::StartPage(). -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextWin::RenderPage(const PrintedPage& page, - const PageSetup& page_setup) { - if (abort_printing_) -@@ -416,17 +404,6 @@ mojom::ResultCode PrintingContextWin::RenderPage(const PrintedPage& page, - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode PrintingContextWin::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // Intentional No-op. MetafileSkia::SafePlayback takes care of calling -- // ::EndPage(). -- -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode PrintingContextWin::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, -diff --git a/printing/printing_context_win.h b/printing/printing_context_win.h -index 700bfe2c744cc18b1be25b9db02dd690b5e306f9..babd443a1586c92a70ff6362a824e29a6395fae2 100644 ---- a/printing/printing_context_win.h -+++ b/printing/printing_context_win.h -@@ -35,10 +35,8 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextWin : public PrintingContext { - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; - mojom::ResultCode RenderPage(const PrintedPage& page, - const PageSetup& page_setup) override; -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; -diff --git a/printing/test_printing_context.cc b/printing/test_printing_context.cc -index 4f0bf0ae891164120d36c79a7df98845f38e55de..208e8a16b5648383ff26d8dec4a15f6485ef4454 100644 ---- a/printing/test_printing_context.cc -+++ b/printing/test_printing_context.cc -@@ -116,15 +116,6 @@ mojom::ResultCode TestPrintingContext::NewDocument( - return mojom::ResultCode::kSuccess; - } - --mojom::ResultCode TestPrintingContext::NewPage() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // No-op. -- return mojom::ResultCode::kSuccess; --} -- - #if defined(OS_WIN) - mojom::ResultCode TestPrintingContext::RenderPage(const PrintedPage& page, - const PageSetup& page_setup) { -@@ -138,15 +129,6 @@ mojom::ResultCode TestPrintingContext::RenderPage(const PrintedPage& page, - } - #endif // defined(OS_WIN) - --mojom::ResultCode TestPrintingContext::PageDone() { -- if (abort_printing_) -- return mojom::ResultCode::kCanceled; -- DCHECK(in_print_job_); -- -- // No-op. -- return mojom::ResultCode::kSuccess; --} -- - mojom::ResultCode TestPrintingContext::PrintDocument( - const MetafilePlayer& metafile, - const PrintSettings& settings, -diff --git a/printing/test_printing_context.h b/printing/test_printing_context.h -index e2a0f906216f5bae2d05dd6efd6246257a3deea4..579a9269459470e8eac6e506d87503d828bed4cb 100644 ---- a/printing/test_printing_context.h -+++ b/printing/test_printing_context.h -@@ -58,12 +58,10 @@ class TestPrintingContext : public PrintingContext { - mojom::ResultCode UpdatePrinterSettings( - const PrinterSettings& printer_settings) override; - mojom::ResultCode NewDocument(const std::u16string& document_name) override; -- mojom::ResultCode NewPage() override; - #if defined(OS_WIN) - mojom::ResultCode RenderPage(const PrintedPage& page, - const PageSetup& page_setup) override; - #endif -- mojom::ResultCode PageDone() override; - mojom::ResultCode PrintDocument(const MetafilePlayer& metafile, - const PrintSettings& settings, - uint32_t num_pages) override; diff --git a/patches/chromium/dump_syms.patch b/patches/chromium/dump_syms.patch index ea1020c34ac9c..43e274d4c5e8b 100644 --- a/patches/chromium/dump_syms.patch +++ b/patches/chromium/dump_syms.patch @@ -8,10 +8,10 @@ this but it is not a blocker for releasing Electron. This patch removes tthe hard fail on dylib resolve failure from dump_syms diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py -index e68039d78f1de03f7ffc68017cbb9f948f67f440..b1811df7b5e6252bc71dd0f11ad6bf02858387f4 100755 +index 99395610be5e50a4c65890b9edaa48510043a8a8..dae758a19460bc22b1bcdc8c7e84dfb42f8f50eb 100755 --- a/components/crash/content/tools/generate_breakpad_symbols.py +++ b/components/crash/content/tools/generate_breakpad_symbols.py -@@ -206,7 +206,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path): +@@ -204,7 +204,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path): 'ERROR: failed to resolve %s, exe_path %s, loader_path %s, ' 'rpaths %s' % (m.group(1), exe_path, loader_path, ', '.join(rpaths))), file=sys.stderr) diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index f3b9883faf7ec..a124b5b3d2ae1 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0 Make SetAspectRatio accept 0 as valid input, which would reset to null. diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index d44e1caec0a369902f84c8737e17fd88c87416b7..03ba3f90405efd73cbb9d2e606c1499b46f4ec31 100644 +index a1de50d6b0f699d0651c369cafafdd5bb542242d..65b9f5e5f81e8ef8b591ef2e027e095df11c0d7b 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -530,7 +530,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { @@ -19,10 +19,10 @@ index d44e1caec0a369902f84c8737e17fd88c87416b7..03ba3f90405efd73cbb9d2e606c1499b aspect_ratio.height()); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 0b714bac63853fb67f1b5b953c71f7120a266ca9..daa10f36722c6f6f0fbfbf5de3918b966323434a 100644 +index 8ca72461bb7b42f1bc0da249a36f0fcf9ab6f13c..9ca11a19e66e34585b4b11e89cc3b789a4389b5e 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -928,8 +928,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { +@@ -936,8 +936,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) { } void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) { diff --git a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch index 98fedf7c940ee..c05e1e16aceef 100644 --- a/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch +++ b/patches/chromium/export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch @@ -21,7 +21,7 @@ index c9b535eb083c250f4f874d8e6bd0c29ea9f3a10f..f220b8669507a4aea616b0dfbabda509 v8::ZoneBackingAllocator* GetZoneBackingAllocator() override; #endif diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc -index 0ccafbde90f99bbafb180fffa1e94f9a35a16bd7..d28b2116930dc1ed9c0cc64c4b31612a68a3c5ba 100644 +index a7dad3d1053c3101183b9686adbccaa5cf3a87fc..24da1fde55c345cb58829539aec381af9af57bae 100644 --- a/gin/v8_platform.cc +++ b/gin/v8_platform.cc @@ -368,6 +368,10 @@ PageAllocator* V8Platform::GetPageAllocator() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index b0b3aebf0dbf4..429dd72387ef7 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 14c71cc69388da46f62d9835e2a06fef0870da02..9481ea08401ae29ae9c1d960491b05b3 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 13c730e6d8c977e014c28d7eeb2513d1f9b6e47e..8af6961ab0b5f2f26e375b8f9c7555874df06f89 100644 +index ca62a13420aa9c114c00054bbe1215f96285a4e9..01be46b1eaed2aadfd24eac9d102da99521b175c 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1325,6 +1325,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1331,6 +1331,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,22 +51,22 @@ index 13c730e6d8c977e014c28d7eeb2513d1f9b6e47e..8af6961ab0b5f2f26e375b8f9c755587 // This may only be called on NetworkContexts created with the constructor // that calls MakeURLRequestContext(). diff --git a/services/network/network_context.h b/services/network/network_context.h -index 55cff37a1ad0ae89bde3ffda11c3d1e9d194e22d..fcda182b959a3600be62a2b61573ad795d4b0509 100644 +index e412608e7720004462c48698c8ec39602b2b900e..46c00e0da6beb0c2e689475fc4b9927085414e1a 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -278,6 +278,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -282,6 +282,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; + void SetUserAgent(const std::string& new_user_agent) override; void SetAcceptLanguage(const std::string& new_accept_language) override; void SetEnableReferrers(bool enable_referrers) override; - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 647b1e2fc81fb4ee177827d6909c816631009ec3..52ee1744567ee19f1bfa3730427d9a65b5a666f3 100644 +index fa56cfed3703664232843ad26028096d95dca253..9852498e93939796e7ba6f80efcc7b2d827187ac 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1044,6 +1044,9 @@ interface NetworkContext { +@@ -1067,6 +1067,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,14 +77,14 @@ index 647b1e2fc81fb4ee177827d6909c816631009ec3..52ee1744567ee19f1bfa3730427d9a65 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index b766ae3aa91ffd6ce5ab7ae3835ff7fa58d02a0e..5719eec40aff5cd079110fc52c46d2791577fee8 100644 +index d143a82b1fd021bb03b760b91e87c7714f5395b9..3c18369ff3ab80430e21caac03373605dad64a88 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -134,6 +134,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -136,6 +136,7 @@ class TestNetworkContext : public mojom::NetworkContext { void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override {} + void SetUserAgent(const std::string& new_user_agent) override {} void SetAcceptLanguage(const std::string& new_accept_language) override {} void SetEnableReferrers(bool enable_referrers) override {} - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 32d935113d968..b0c806866f56a 100644 --- a/patches/chromium/extend_apply_webpreferences.patch +++ b/patches/chromium/extend_apply_webpreferences.patch @@ -12,10 +12,10 @@ Ideally we could add an embedder observer pattern here but that can be done in future work. diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc -index d4602eb32f1f14f639df26f866f5406ab36003d5..afae7a75567c7219490f13afe010317c68552ea4 100644 +index 7e7927c7258963bd95a2c064ef85e410f4d2571d..05353bda1169df38499e6f789bb632307d7bcfde 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -159,6 +159,7 @@ +@@ -158,6 +158,7 @@ #include "third_party/blink/renderer/core/timing/dom_window_performance.h" #include "third_party/blink/renderer/core/timing/window_performance.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" @@ -23,11 +23,11 @@ index d4602eb32f1f14f639df26f866f5406ab36003d5..afae7a75567c7219490f13afe010317c #include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h" -@@ -1793,6 +1794,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, - #if defined(OS_MAC) +@@ -1776,6 +1777,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, + #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); + SetUseExternalPopupMenus(!prefs.offscreen); #endif - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) diff --git a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch index 99d6a9e4cc006..fd11a39b225c8 100644 --- a/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch +++ b/patches/chromium/feat_add_data_transfer_to_requestsingleinstancelock.patch @@ -19,7 +19,7 @@ instance, but also so the second instance can send back additional data to the first instance if needed. diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h -index 13b325ecad9ba48398173e89680287c63efd4fa6..e8188e4640b28d41559822e6c1bdd27dcccae93c 100644 +index 8f94cc300b58e8a94b6ca155aa3cf370bcb948d8..4340376f323d24e5e2c5897a81c6a9ebf13adab4 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -18,6 +18,7 @@ @@ -29,7 +29,7 @@ index 13b325ecad9ba48398173e89680287c63efd4fa6..e8188e4640b28d41559822e6c1bdd27d +#include "base/containers/span.h" #include "ui/gfx/native_widget_types.h" - #if defined(OS_POSIX) && !defined(OS_ANDROID) + #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) @@ -93,6 +94,9 @@ class ProcessSingleton { static constexpr int kNumNotifyResults = LAST_VALUE + 1; @@ -85,21 +85,21 @@ index 13b325ecad9ba48398173e89680287c63efd4fa6..e8188e4640b28d41559822e6c1bdd27d + // Custom data to pass to the other instance during notify. + base::span additional_data_; - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); @@ -190,6 +206,7 @@ class ProcessSingleton { HANDLE lock_file_; base::FilePath user_data_dir_; ShouldKillRemoteProcessCallback should_kill_remote_process_callback_; + HANDLE ack_pipe_; - #elif defined(OS_POSIX) && !defined(OS_ANDROID) + #elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) // Return true if the given pid is one of our child processes. // Assumes that the current pid is the root of all pids of the current diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce24a02cfa 100644 +index 47e60bfd8239d4a2e292b835c49132bdbb751555..9861a884a15e79b36833e6df58897141acdc6718 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -147,7 +147,7 @@ const char kACKToken[] = "ACK"; +@@ -148,7 +148,7 @@ const char kACKToken[] = "ACK"; const char kShutdownToken[] = "SHUTDOWN"; const char kTokenDelimiter = '\0'; const int kMaxMessageLength = 32 * 1024; @@ -108,7 +108,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce bool g_disable_prompt = false; bool g_skip_is_chrome_process_check = false; -@@ -627,6 +627,7 @@ class ProcessSingleton::LinuxWatcher +@@ -614,6 +614,7 @@ class ProcessSingleton::LinuxWatcher // |reader| is for sending back ACK message. void HandleMessage(const std::string& current_dir, const std::vector& argv, @@ -116,7 +116,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce SocketReader* reader); private: -@@ -651,6 +652,9 @@ class ProcessSingleton::LinuxWatcher +@@ -638,6 +639,9 @@ class ProcessSingleton::LinuxWatcher // The ProcessSingleton that owns us. ProcessSingleton* const parent_; @@ -126,7 +126,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce std::set, base::UniquePtrComparator> readers_; }; -@@ -681,16 +685,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { +@@ -668,16 +672,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) { } void ProcessSingleton::LinuxWatcher::HandleMessage( @@ -154,7 +154,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce LOG(WARNING) << "Not handling interprocess notification as browser" " is shutting down"; // Send back "SHUTDOWN" message, so that the client process can start up -@@ -700,6 +709,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( +@@ -687,6 +696,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( } } @@ -177,7 +177,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce void ProcessSingleton::LinuxWatcher::RemoveSocketReader(SocketReader* reader) { DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(reader); -@@ -735,7 +760,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -722,7 +747,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: } } @@ -187,7 +187,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce const size_t kMinMessageLength = base::size(kStartToken) + 4; if (bytes_read_ < kMinMessageLength) { buf_[bytes_read_] = 0; -@@ -765,10 +791,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: +@@ -752,10 +778,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: tokens.erase(tokens.begin()); tokens.erase(tokens.begin()); @@ -217,7 +217,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce fd_watch_controller_.reset(); // LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader -@@ -797,8 +841,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( +@@ -784,8 +828,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK( // ProcessSingleton::ProcessSingleton( const base::FilePath& user_data_dir, @@ -231,7 +231,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce current_pid_(base::GetCurrentProcId()), watcher_(new LinuxWatcher(this)) { socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename); -@@ -915,7 +963,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -904,7 +952,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( sizeof(socket_timeout)); // Found another process, prepare our command line @@ -241,7 +241,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce std::string to_send(kStartToken); to_send.push_back(kTokenDelimiter); -@@ -925,11 +974,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -914,11 +963,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( to_send.append(current_dir.value()); const std::vector& argv = cmd_line.argv(); @@ -263,7 +263,7 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce // Send the message if (!WriteToSocket(socket.fd(), to_send.data(), to_send.length())) { // Try to kill the other process, because it might have been dead. -@@ -969,6 +1028,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( +@@ -960,6 +1019,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( linux_ui->NotifyWindowManagerStartupComplete(); #endif @@ -282,18 +282,18 @@ index 0d74cd93a21b937f65f3d417b4734ae5b87acdf2..9bf6e633b5adc68a67d23e4f17460dce return PROCESS_NOTIFIED; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648c27a2a34 100644 +index 0ea5eb3e3cf055d981ab73486115bac53287f2d7..268be8c0334a4bc051ff08792ea0dc3d0c912034 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -22,6 +22,7 @@ +@@ -21,6 +21,7 @@ + #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" - #include "base/trace_event/trace_event.h" +#include "base/timer/timer.h" + #include "base/trace_event/base_tracing.h" #include "base/win/registry.h" #include "base/win/scoped_handle.h" - #include "base/win/windows_version.h" -@@ -44,6 +45,14 @@ +@@ -45,6 +46,14 @@ namespace { const char kLockfile[] = "lockfile"; @@ -308,7 +308,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 // A helper class that acquires the given |mutex| while the AutoLockMutex is in // scope. -@@ -98,10 +107,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { +@@ -80,10 +89,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) { bool ParseCommandLine(const COPYDATASTRUCT* cds, base::CommandLine* parsed_command_line, @@ -323,7 +323,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 static const int min_message_size = 7; if (cds->cbData < min_message_size * sizeof(wchar_t) || cds->cbData % sizeof(wchar_t) != 0) { -@@ -151,11 +162,82 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds, +@@ -133,11 +144,82 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds, const std::wstring cmd_line = msg.substr(second_null + 1, third_null - second_null); *parsed_command_line = base::CommandLine::FromString(cmd_line); @@ -406,7 +406,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 bool ProcessLaunchNotification( const ProcessSingleton::NotificationCallback& notification_callback, UINT message, -@@ -167,16 +249,23 @@ bool ProcessLaunchNotification( +@@ -151,16 +233,23 @@ bool ProcessLaunchNotification( // Handle the WM_COPYDATA message from another process. const COPYDATASTRUCT* cds = reinterpret_cast(lparam); @@ -434,7 +434,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 return true; } -@@ -273,9 +362,13 @@ bool ProcessSingleton::EscapeVirtualization( +@@ -254,9 +343,13 @@ bool ProcessSingleton::EscapeVirtualization( ProcessSingleton::ProcessSingleton( const std::string& program_name, const base::FilePath& user_data_dir, @@ -449,7 +449,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 program_name_(program_name), is_app_sandboxed_(is_app_sandboxed), is_virtualized_(false), -@@ -290,6 +383,37 @@ ProcessSingleton::~ProcessSingleton() { +@@ -271,6 +364,37 @@ ProcessSingleton::~ProcessSingleton() { ::CloseHandle(lock_file_); } @@ -486,8 +486,8 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 + // Code roughly based on Mozilla. ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { - if (is_virtualized_) -@@ -300,8 +424,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { + TRACE_EVENT0("startup", "ProcessSingleton::NotifyOtherProcess"); +@@ -283,8 +407,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { return PROCESS_NONE; } @@ -498,7 +498,7 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 return PROCESS_NOTIFIED; case chrome::NOTIFY_FAILED: remote_window_ = NULL; -@@ -431,6 +556,18 @@ bool ProcessSingleton::Create() { +@@ -422,6 +547,18 @@ bool ProcessSingleton::Create() { << "Lock file can not be created! Error code: " << error; if (lock_file_ != INVALID_HANDLE_VALUE) { @@ -516,8 +516,8 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 + // Set the window's title to the path of our user data directory so // other Chrome instances can decide if they should forward to us. - bool result = -@@ -457,6 +594,7 @@ bool ProcessSingleton::Create() { + TRACE_EVENT0("startup", "ProcessSingleton::Create:CreateWindow"); +@@ -449,6 +586,7 @@ bool ProcessSingleton::Create() { } void ProcessSingleton::Cleanup() { @@ -526,10 +526,10 @@ index 679350dd08ca0211653ea669405e3f4f86c2fc0f..16ad742721e9c5af13224f74e864e648 void ProcessSingleton::OverrideShouldKillRemoteProcessCallbackForTesting( diff --git a/chrome/browser/win/chrome_process_finder.cc b/chrome/browser/win/chrome_process_finder.cc -index b4fec8878c37b9d157ea768e3b6d99399a988c75..e1cb0f21f752aaeee2c360ce9c5fd08bfede26e3 100644 +index b64ed1d155a30582e48c9cdffcee9d0f25a53a6a..ce851d09d501ebcc6d6c4065e746e869d5275b2b 100644 --- a/chrome/browser/win/chrome_process_finder.cc +++ b/chrome/browser/win/chrome_process_finder.cc -@@ -34,7 +34,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) { +@@ -36,9 +36,10 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) { return base::win::MessageWindow::FindWindow(user_data_dir.value()); } @@ -537,11 +537,13 @@ index b4fec8878c37b9d157ea768e3b6d99399a988c75..e1cb0f21f752aaeee2c360ce9c5fd08b +NotifyChromeResult AttemptToNotifyRunningChrome( + HWND remote_window, + const base::span additional_data) { + TRACE_EVENT0("startup", "AttemptToNotifyRunningChrome"); +- DCHECK(remote_window); DWORD process_id = 0; DWORD thread_id = GetWindowThreadProcessId(remote_window, &process_id); -@@ -42,7 +44,8 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { - return NOTIFY_FAILED; +@@ -50,7 +51,8 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { + } // Send the command line to the remote chrome window. - // Format is "START\0<<>>\0<<>>". @@ -549,8 +551,8 @@ index b4fec8878c37b9d157ea768e3b6d99399a988c75..e1cb0f21f752aaeee2c360ce9c5fd08b + // "START\0\0\0\0". std::wstring to_send(L"START\0", 6); // want the NULL in the string. base::FilePath cur_dir; - if (!base::GetCurrentDirectory(&cur_dir)) -@@ -53,6 +56,22 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { + if (!base::GetCurrentDirectory(&cur_dir)) { +@@ -64,6 +66,22 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) { base::CommandLine::ForCurrentProcess()->GetCommandLineString()); to_send.append(L"\0", 1); // Null separator. diff --git a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch index 9edc86cecd94e..fbd9cec05e06c 100644 --- a/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch +++ b/patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch @@ -13,11 +13,11 @@ uses internally for things like menus and devtools. We can remove this patch once it has in some shape been upstreamed. diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc -index ca0630b07722cf3d8b4d31103db7c03bc702ee6b..5f7c5166f3541718f1135b2af8dc6ef3b7bb69ca 100644 +index 5376b01ad03c346ecc1c5d47ff125103dbc05eb8..a60ce1d4fe6b7132d7adac1a7687c7185d1abee3 100644 --- a/ui/native_theme/native_theme.cc +++ b/ui/native_theme/native_theme.cc -@@ -153,6 +153,8 @@ absl::optional NativeTheme::GetColorProviderColor( - } +@@ -114,6 +114,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors, + NativeTheme::~NativeTheme() = default; bool NativeTheme::ShouldUseDarkColors() const { + if (theme_source() == ThemeSource::kForcedLight) return false; @@ -26,13 +26,14 @@ index ca0630b07722cf3d8b4d31103db7c03bc702ee6b..5f7c5166f3541718f1135b2af8dc6ef3 } diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h -index 061a8549af88e8b531070799c41e3166b69ecb47..b4094564254fd12f41e84350e5e8c9540c387a9d 100644 +index e46bc2cf64ca554c0e21a4e0851ad092f504e080..0ffe583d56ddc3abec8c848c1cd5dbc3623acb5b 100644 --- a/ui/native_theme/native_theme.h +++ b/ui/native_theme/native_theme.h -@@ -404,6 +404,22 @@ class NATIVE_THEME_EXPORT NativeTheme { - SkColor GetUnprocessedSystemColor(ColorId color_id, - ColorScheme color_scheme) const; +@@ -389,6 +389,23 @@ class NATIVE_THEME_EXPORT NativeTheme { + scoped_refptr custom_theme) + const; ++ + enum ThemeSource { + kSystem, + kForcedDark, @@ -52,7 +53,7 @@ index 061a8549af88e8b531070799c41e3166b69ecb47..b4094564254fd12f41e84350e5e8c954 // Returns a shared instance of the native theme that should be used for web // rendering. Do not use it in a normal application context (i.e. browser). // The returned object should not be deleted by the caller. This function is -@@ -589,6 +605,7 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -558,6 +575,7 @@ class NATIVE_THEME_EXPORT NativeTheme { bool forced_colors_ = false; PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight; PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference; @@ -61,10 +62,10 @@ index 061a8549af88e8b531070799c41e3166b69ecb47..b4094564254fd12f41e84350e5e8c954 SEQUENCE_CHECKER(sequence_checker_); }; diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 07852493fd23b8c1f057dc7ad830b6884db50a88..fee85c5c95bf7908cbd460619f71977cc73f3e6a 100644 +index 6b9fb74004eba57fdff396124214356f4bcf0852..70807b315f805baab2574148520323ce78f624cb 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -677,6 +677,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { +@@ -618,6 +618,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { // ...unless --force-dark-mode was specified in which case caveat emptor. if (InForcedColorsMode() && !IsForcedDarkMode()) return false; diff --git a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch index 5855be1a4f264..8aec002466d42 100644 --- a/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch +++ b/patches/chromium/feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch @@ -13,10 +13,10 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass then refers to the list so that it can correctly determine the data source's settings. diff --git a/third_party/blink/public/platform/media/multi_buffer_data_source.h b/third_party/blink/public/platform/media/multi_buffer_data_source.h -index 3224b0cc8f4b5196d5e78f031f198cecd0fddf40..b797f446cb876315ff70645564658435445045cd 100644 +index fd2441add0c816c5031ed0e9321d2be7e0937161..c324d855b26f6dcb63d127d7ddafa509cb1074e4 100644 --- a/third_party/blink/public/platform/media/multi_buffer_data_source.h +++ b/third_party/blink/public/platform/media/multi_buffer_data_source.h -@@ -34,6 +34,8 @@ namespace blink { +@@ -33,6 +33,8 @@ namespace blink { class BufferedDataSourceHost; class MultiBufferReader; diff --git a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch index 254c8c2b8ea2e..9fc5bef9c5021 100644 --- a/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch +++ b/patches/chromium/feat_add_support_for_overriding_the_base_spellchecker_download_url.patch @@ -9,7 +9,7 @@ production use cases. This is unlikely to be upstreamed as the change is entirely in //chrome. diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc -index 51c061d3bd117c926b74a10deab37d3a694e808b..1f0b787b13567be74553ced382d4b48a65bb2003 100644 +index 22fade6370fe654e48373f35bbac079131b873ff..57d694eab66c1431789405656f600390e023b533 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc @@ -51,6 +51,9 @@ namespace { @@ -44,7 +44,7 @@ index 51c061d3bd117c926b74a10deab37d3a694e808b..1f0b787b13567be74553ced382d4b48a "https://redirector.gvt1.com/edgedl/chrome/dict/"; diff --git a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h -index a8a1fb3c22b812cc3ff76a4c50853cb60c74c541..27c07b11ca2f56600fe8534170066bb77dd36037 100644 +index 4df6fc23f0e51e3279208a9331c9e55d7d4cb0ac..f4ddb557f6c04ede0caf5029b3dfb877a02ea721 100644 --- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h +++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h @@ -93,6 +93,8 @@ class SpellcheckHunspellDictionary diff --git a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch index 587986730db3e..d3448ffcc3b40 100644 --- a/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch +++ b/patches/chromium/feat_allow_embedders_to_add_observers_on_created_hunspell.patch @@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell This patch is used by Electron to implement spellchecker events. diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc -index 7e6846c8bbb2d773c0b0ec97da928871d828bcbf..7a5f0d5034270dcfb287d9c46b2cd0431098d37e 100644 +index 80e5807fecbca3d3d3105522418c5f4b4d103f57..002204dbe0b9598b61141cab33b7befdfac077f8 100644 --- a/chrome/browser/spellchecker/spellcheck_service.cc +++ b/chrome/browser/spellchecker/spellcheck_service.cc -@@ -467,6 +467,9 @@ void SpellcheckService::LoadDictionaries() { +@@ -469,6 +469,9 @@ void SpellcheckService::LoadDictionaries() { std::make_unique( dictionary, platform_spellcheck_language, context_, this)); hunspell_dictionaries_.back()->AddObserver(this); @@ -20,7 +20,7 @@ index 7e6846c8bbb2d773c0b0ec97da928871d828bcbf..7a5f0d5034270dcfb287d9c46b2cd043 hunspell_dictionaries_.back()->Load(); } -@@ -519,6 +522,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { +@@ -521,6 +524,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const { (!hunspell_dictionaries_.empty() || enable_if_uninitialized); } @@ -42,7 +42,7 @@ index 7e6846c8bbb2d773c0b0ec97da928871d828bcbf..7a5f0d5034270dcfb287d9c46b2cd043 const content::NotificationSource& source, const content::NotificationDetails& details) { diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h -index 67a7b52ea0e82c9ddc9e0fbdbe677855f60c536e..48bd507b2a23061ee20a02b00b79604077002aed 100644 +index c17c42fdfd943e7b77e0d7a8d333afd70e9c6abc..ab9ef6b1efdd63ea7cc47be2cf7de79eb9aa1b90 100644 --- a/chrome/browser/spellchecker/spellcheck_service.h +++ b/chrome/browser/spellchecker/spellcheck_service.h @@ -138,6 +138,8 @@ class SpellcheckService : public KeyedService, diff --git a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch index 9b87b52e3b9a2..d2675bfa80b29 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -8,21 +8,21 @@ rendering with the viz compositor by way of a custom HostDisplayClient and LayeredWindowUpdater. diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc -index 3b00759e513dc7e19fd68398e853c8ce6ac73905..47f4e7cc2e8b3141dcaf9e7a498fec32c9342f40 100644 +index d3970b4d86e1fadc5321e99be20813c0f811d6b3..66d3ae8ecc299456de8ff621b2957f9d18e984a1 100644 --- a/components/viz/host/host_display_client.cc +++ b/components/viz/host/host_display_client.cc -@@ -45,9 +45,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( +@@ -46,9 +46,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( } #endif --#if defined(OS_WIN) +-#if BUILDFLAG(IS_WIN) void HostDisplayClient::CreateLayeredWindowUpdater( mojo::PendingReceiver receiver) { -+#if defined(OS_WIN) ++#if BUILDFLAG(IS_WIN) if (!NeedsToUseLayerWindow(widget_)) { DLOG(ERROR) << "HWND shouldn't be using a layered window"; return; -@@ -55,8 +55,12 @@ void HostDisplayClient::CreateLayeredWindowUpdater( +@@ -56,8 +56,12 @@ void HostDisplayClient::CreateLayeredWindowUpdater( layered_window_updater_ = std::make_unique(widget_, std::move(receiver)); @@ -37,14 +37,14 @@ index 3b00759e513dc7e19fd68398e853c8ce6ac73905..47f4e7cc2e8b3141dcaf9e7a498fec32 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h -index b2ad84c881ac7190ee07e6db1f0eb2822066748d..b1527bd33ca9ba0f5345aa1fef08ee65f3ded91c 100644 +index 1c2885c42f4947bb22ce87c8b2d649689b278da1..e588d77072537b6b0760b278de72d69aa44f2b3f 100644 --- a/components/viz/host/host_display_client.h +++ b/components/viz/host/host_display_client.h @@ -41,10 +41,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient { const gfx::CALayerParams& ca_layer_params) override; #endif --#if defined(OS_WIN) +-#if BUILDFLAG(IS_WIN) + protected: void CreateLayeredWindowUpdater( mojo::PendingReceiver receiver) override; @@ -81,7 +81,7 @@ index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index fae4aae8ed31b10fba14c009bb6bf86128747b14..a672c74893f0c9a2774beec98734faf58a17cbf3 100644 +index eff91b68cf4b72de41b7b2ad09c029b8b5dcf3c6..c736f772e3714c6a80703c41c8a2f0dab36b166d 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -139,6 +139,8 @@ viz_component("service") { @@ -108,10 +108,10 @@ index 77d463e683d8b8d3a202681a6884eacaab79d70d..05d51cb2637d34c073cd0025e3658036 } // namespace viz diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc -index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191d20945f2 100644 +index 8a277c6337d446890bb32814a68db2a9d3d3cd72..4c4e631d5a1476eaad6f54281e6d6899070d1a65 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc -@@ -25,6 +25,7 @@ +@@ -26,6 +26,7 @@ #include "components/viz/service/display_embedder/server_shared_bitmap_manager.h" #include "components/viz/service/display_embedder/skia_output_surface_dependency_impl.h" #include "components/viz/service/display_embedder/skia_output_surface_impl.h" @@ -119,7 +119,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 #include "components/viz/service/display_embedder/software_output_surface.h" #include "components/viz/service/display_embedder/viz_process_context_provider.h" #include "components/viz/service/gl/gpu_service_impl.h" -@@ -38,6 +39,7 @@ +@@ -39,6 +40,7 @@ #include "gpu/ipc/scheduler_sequence.h" #include "gpu/ipc/service/gpu_channel_manager_delegate.h" #include "gpu/ipc/service/image_transport_surface.h" @@ -127,7 +127,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 #include "ui/base/ui_base_switches.h" #include "ui/gl/gl_context.h" #include "ui/gl/init/gl_factory.h" -@@ -125,7 +127,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -126,7 +128,8 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( mojom::DisplayClient* display_client, DisplayCompositorMemoryAndTaskController* gpu_dependency, const RendererSettings& renderer_settings, @@ -137,7 +137,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 #if BUILDFLAG(IS_CHROMEOS_ASH) if (surface_handle == gpu::kNullSurfaceHandle) return std::make_unique(); -@@ -137,7 +140,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -138,7 +141,7 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( if (!gpu_compositing) { output_surface = std::make_unique( @@ -146,7 +146,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 } else if (renderer_settings.use_skia_renderer) { DCHECK(gpu_dependency); { -@@ -242,10 +245,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( +@@ -243,10 +246,22 @@ std::unique_ptr OutputSurfaceProviderImpl::CreateOutputSurface( std::unique_ptr OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( gpu::SurfaceHandle surface_handle, @@ -156,7 +156,7 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 if (headless_) return std::make_unique(); -+#if !defined(OS_MAC) ++#if !BUILDFLAG(IS_APPLE) + if (offscreen) { + DCHECK(display_client); + mojom::LayeredWindowUpdaterPtr layered_window_updater; @@ -167,11 +167,11 @@ index e0afde4b0cb45cb6cf2cae6f001875973898bb64..c41e9566b9a4d32cb1d0cb3e8c199191 + } +#endif + - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_, display_client); diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.h b/components/viz/service/display_embedder/output_surface_provider_impl.h -index 07f266d8a379c7047f43c824c9062cbb162112f0..c756e1c5b4bda1978d27fd55fba1e4531dbeed8a 100644 +index fa9bc45b5c12821789270907f73c7e6f3c0c1424..6d2ad1d88631db82f41de2852c3e9a6ad1431b2e 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.h +++ b/components/viz/service/display_embedder/output_surface_provider_impl.h @@ -66,12 +66,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl @@ -499,10 +499,10 @@ index 583e3e2525c753a0962d481fc67a3582df75d0e9..9416ec929bebcff7f07088e635376ef2 waiting_on_draw_ack_ = true; diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -index 94a087b4beb3b683e90e89282c9fd6bb36825608..6efcb84af529a78e9ebc1234ef4d0c8834270c29 100644 +index 4b6712b2a4f3c56a6d243ff9d93539505a5c7b86..7f62362ab27abd3497d23e8db8c8bb5a2e3392f9 100644 --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc -@@ -49,7 +49,8 @@ RootCompositorFrameSinkImpl::Create( +@@ -84,7 +84,8 @@ RootCompositorFrameSinkImpl::Create( params->gpu_compositing, params->widget, params->renderer_settings); auto output_surface = output_surface_provider->CreateOutputSurface( params->widget, params->gpu_compositing, display_client.get(), @@ -513,10 +513,10 @@ index 94a087b4beb3b683e90e89282c9fd6bb36825608..6efcb84af529a78e9ebc1234ef4d0c88 // Creating output surface failed. The host can send a new request, possibly // with a different compositing mode. diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index ba0d6ca4e9004a0c8cfc2b99f3e3aaff4c8a756b..3f1c77e14ab6164ee9bb7d4cc3e454125e0d700e 100644 +index 0e3af0f9280abe8560393325b400ad2543ed0556..7fe490e55a4bb8a183d0d241188ea15a44347245 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc -@@ -383,8 +383,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -381,8 +381,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( compositor_data.display_private.reset(); root_params->display_private = compositor_data.display_private.BindNewEndpointAndPassReceiver(); @@ -534,10 +534,10 @@ index ba0d6ca4e9004a0c8cfc2b99f3e3aaff4c8a756b..3f1c77e14ab6164ee9bb7d4cc3e45412 compositor_data.display_client->GetBoundRemote(resize_task_runner_); diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom -index 9f7583e42405760bbe5994c87c4347a7d5a36fbe..c383f93ee22388cb4524119d0bead31973fdc705 100644 +index b2f873919d68633103d115d7d9550a098c1a254c..8e38831a6df15d37e5fb87d63613b7dbdcefacc4 100644 --- a/services/viz/privileged/mojom/compositing/display_private.mojom +++ b/services/viz/privileged/mojom/compositing/display_private.mojom -@@ -94,7 +94,6 @@ interface DisplayClient { +@@ -102,7 +102,6 @@ interface DisplayClient { // Creates a LayeredWindowUpdater implementation to draw into a layered // window. @@ -546,7 +546,7 @@ index 9f7583e42405760bbe5994c87c4347a7d5a36fbe..c383f93ee22388cb4524119d0bead319 // Notifies that a swap has occurred and provides information about the pixel diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom -index 83e7682b14367571a2d52bb3a6f2f63918d8efe9..3b6f2627196170e3a17992ad36534ac9bc178e4a 100644 +index a9a0e5a1167b2018e6dc206ecb7d37aad94042aa..3997ecb0228914144d6b04595c47376679fca3ef 100644 --- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom +++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom @@ -32,6 +32,7 @@ struct RootCompositorFrameSinkParams { @@ -569,7 +569,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 7e3a624f99fea87cd53ce6f399e5768058d3c305..384ec6d9b8a8c0e121fc2e875ce65ddb639c241b 100644 +index 8b74e1d2a463156f62e983f535ff68a53215f648..6ef04da46c8b097b01d5ee40dcadf222d7a7870c 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -81,6 +81,7 @@ class DisplayPrivate; @@ -607,7 +607,7 @@ index 7e3a624f99fea87cd53ce6f399e5768058d3c305..384ec6d9b8a8c0e121fc2e875ce65ddb // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -453,6 +467,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -467,6 +481,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr pending_begin_frame_args_; @@ -617,7 +617,7 @@ index 7e3a624f99fea87cd53ce6f399e5768058d3c305..384ec6d9b8a8c0e121fc2e875ce65ddb raw_ptr root_layer_ = nullptr; diff --git a/ui/gfx/ca_layer_params.h b/ui/gfx/ca_layer_params.h -index 232751b32f6d6dee6c913c7020b53ae4b604a552..ba5767a80d13e848b7281f55307f6569a1524ce3 100644 +index 12e115cd6a128d8d150abc786d4d38b1d5119d91..b6320de28750333bee7ee83393849f4eb0a956ac 100644 --- a/ui/gfx/ca_layer_params.h +++ b/ui/gfx/ca_layer_params.h @@ -6,6 +6,7 @@ @@ -649,7 +649,7 @@ index de00e766ba17532e10dcf5d0fd31fa344920a9f7..7aaedf83ad22dcc1d2dd39a31cf7e08b float scale_factor; }; diff --git a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc -index c1f21d7f4348df96f7be5c0adb1b9650304048e0..760c849aebba70e575e59883655d707f36c5424a 100644 +index c7035798bd867f51b39f36f1be79293bf2b5cc12..131446361de812f9b915483bca2b6d2165b65e3d 100644 --- a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc +++ b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc @@ -52,6 +52,9 @@ bool StructTraits::Read( diff --git a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch index 40abb608830cb..9dc1207d32dff 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -17,10 +17,10 @@ headers, moving forward we should find a way in upstream to provide access to these headers for loader clients created on the browser process. diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc -index f14c99863eb3f31ebc9ffd30a55f7536585fb561..d1f11d2d13445c9814d2e7227e5e02001377329b 100644 +index 87868727a78223baef9ffd2591f49fced240ef4e..f6a6ff28f33e2d1c065f2abeb96733b2d28a6ea1 100644 --- a/services/network/public/cpp/resource_request.cc +++ b/services/network/public/cpp/resource_request.cc -@@ -234,6 +234,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { +@@ -233,6 +233,7 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { do_not_prompt_for_login == request.do_not_prompt_for_login && is_main_frame == request.is_main_frame && transition_type == request.transition_type && @@ -29,10 +29,10 @@ index f14c99863eb3f31ebc9ffd30a55f7536585fb561..d1f11d2d13445c9814d2e7227e5e0200 upgrade_if_insecure == request.upgrade_if_insecure && is_revalidating == request.is_revalidating && diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h -index 7c835d244420afe1c9ab6eac267c8789fb2afb01..564caebc55e1338e7124731d639cd6f01aebf595 100644 +index 8b9a7b36f53a4cfcd159ac18c06d1724072013c8..ef0191bae8a07e531ae129cf32b22f4930c5e266 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h -@@ -157,6 +157,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { +@@ -156,6 +156,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { bool do_not_prompt_for_login = false; bool is_main_frame = false; int transition_type = 0; @@ -41,10 +41,10 @@ index 7c835d244420afe1c9ab6eac267c8789fb2afb01..564caebc55e1338e7124731d639cd6f0 bool upgrade_if_insecure = false; bool is_revalidating = false; diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc -index 9fefb0ca05e8f461d22b7f9875cc722232ccaed4..9c020bd1272ad2894f0b5af4c504d551b9927af0 100644 +index 1fcf54cac11c38352e14774cd08bcaa162443e9c..5356da11391d52a8f9aaa57a27616cee6dc0f2b6 100644 --- a/services/network/public/cpp/url_request_mojom_traits.cc +++ b/services/network/public/cpp/url_request_mojom_traits.cc -@@ -210,6 +210,7 @@ bool StructTraits< +@@ -209,6 +209,7 @@ bool StructTraits< out->do_not_prompt_for_login = data.do_not_prompt_for_login(); out->is_main_frame = data.is_main_frame(); out->transition_type = data.transition_type(); @@ -53,10 +53,10 @@ index 9fefb0ca05e8f461d22b7f9875cc722232ccaed4..9c020bd1272ad2894f0b5af4c504d551 out->upgrade_if_insecure = data.upgrade_if_insecure(); out->is_revalidating = data.is_revalidating(); diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h -index 53b1cd261ec419dd68906186a3da651fe792ede0..5945e6d9749ad2a888edfa0c4b00377a7190881b 100644 +index 1b8dbc0538d0af843e40edc41505d08f9034f97b..270822eb756090f8a74f34823009942ed21e8616 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h -@@ -272,6 +272,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) +@@ -269,6 +269,9 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) static int32_t transition_type(const network::ResourceRequest& request) { return request.transition_type; } @@ -67,10 +67,10 @@ index 53b1cd261ec419dd68906186a3da651fe792ede0..5945e6d9749ad2a888edfa0c4b00377a return request.previews_state; } diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index 27477d595fd22dc49329631a0b52ebdaafe1edb1..a4fd22381738648040cd72dce747285f5fcb698a 100644 +index 79b5d03ded03ced9e6ff4d17d10935004bfb0062..923883fd010f9621c790dd5381a7e1f0cb36e740 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom -@@ -318,6 +318,9 @@ struct URLRequest { +@@ -312,6 +312,9 @@ struct URLRequest { // about this. int32 transition_type; @@ -81,18 +81,18 @@ index 27477d595fd22dc49329631a0b52ebdaafe1edb1..a4fd22381738648040cd72dce747285f // browser decide. // Note: this is an enum of type PreviewsState. diff --git a/services/network/public/mojom/url_response_head.mojom b/services/network/public/mojom/url_response_head.mojom -index 4a26ea8928e333a9231dad10b03947b3febf9d47..97bc79ff624767c56f215d77a1bcabed378330aa 100644 +index 4c4cc16db82d7434573f7740855fbe72d68815e6..f71290800b6bb51a39b1f86be36f02d602ac3397 100644 --- a/services/network/public/mojom/url_response_head.mojom +++ b/services/network/public/mojom/url_response_head.mojom -@@ -7,6 +7,7 @@ module network.mojom; - import "mojo/public/mojom/base/time.mojom"; +@@ -8,6 +8,7 @@ import "mojo/public/mojom/base/time.mojom"; import "mojo/public/mojom/base/unguessable_token.mojom"; import "services/network/public/mojom/fetch_api.mojom"; + import "services/network/public/mojom/ip_address_space.mojom"; +import "services/network/public/mojom/http_raw_headers.mojom"; import "services/network/public/mojom/ip_endpoint.mojom"; import "services/network/public/mojom/load_timing_info.mojom"; import "services/network/public/mojom/network_param.mojom"; -@@ -28,6 +29,9 @@ struct URLResponseHead { +@@ -29,6 +30,9 @@ struct URLResponseHead { // The response headers or NULL if the URL type does not support headers. HttpResponseHeaders headers; @@ -103,18 +103,18 @@ index 4a26ea8928e333a9231dad10b03947b3febf9d47..97bc79ff624767c56f215d77a1bcabed string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index e53ff47c6f43d00fd89695c4ef08ef5f455df103..56dce34839df7569361bfe7076f6dd2f7ef307c7 100644 +index 5c5aeeda64b244ab1f58556f28d2ca3c133d03a8..2f9aa4d49693a22507f668b2738c54be59802b8f 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -532,6 +532,7 @@ URLLoader::URLLoader( - peer_closed_handle_watcher_(FROM_HERE, +@@ -469,6 +469,7 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunnerHandle::Get()), + per_factory_corb_state_(context.GetMutableCorbState()), + report_raw_headers_(request.report_raw_headers), devtools_request_id_(request.devtools_request_id), request_mode_(request.mode), request_credentials_mode_(request.credentials_mode), -@@ -690,7 +691,7 @@ URLLoader::URLLoader( +@@ -636,7 +637,7 @@ URLLoader::URLLoader( url_request_->SetRequestHeadersCallback(base::BindRepeating( &URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this))); @@ -123,10 +123,10 @@ index e53ff47c6f43d00fd89695c4ef08ef5f455df103..56dce34839df7569361bfe7076f6dd2f url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -1340,6 +1341,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { - response_ = network::mojom::URLResponseHead::New(); - PopulateResourceResponse(url_request_.get(), is_load_timing_enabled_, - options_, response_.get()); +@@ -1395,6 +1396,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { + } + + response_ = BuildResponseHead(); + if (raw_response_headers_ && report_raw_headers_) { + std::vector header_array; + size_t iterator = 0; @@ -144,10 +144,10 @@ index e53ff47c6f43d00fd89695c4ef08ef5f455df103..56dce34839df7569361bfe7076f6dd2f // Parse and remove the Trust Tokens response headers, if any are expected, diff --git a/services/network/url_loader.h b/services/network/url_loader.h -index fcc47a2389c5172e3c674e413baa857183e0f2f8..af952b03ca87c4022400ba93d2e1fb8d3759960a 100644 +index 98fe2512671e43a4e0da6e9b9ff714d7204fc3a8..bf8751c1b37a678f73ec8e11c86e1eb1287443e4 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -503,6 +503,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -506,6 +506,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr resource_scheduler_request_handle_; diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 33e1bd005b790..195ea7ae74d67 100644 --- a/patches/chromium/fix_aspect_ratio_with_max_size.patch +++ b/patches/chromium/fix_aspect_ratio_with_max_size.patch @@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the BrowserWindow. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index daa10f36722c6f6f0fbfbf5de3918b966323434a..067861bb743ee2f3c1916794d45efb7dd591b230 100644 +index 9ca11a19e66e34585b4b11e89cc3b789a4389b5e..264a9109e42c23e9be6bf7269b3cfee2634b61e4 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3567,6 +3567,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3581,6 +3581,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, delegate_->GetMinMaxSize(&min_window_size, &max_window_size); min_window_size = delegate_->DIPToScreenSize(min_window_size); max_window_size = delegate_->DIPToScreenSize(max_window_size); diff --git a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch index 409db5c2413c1..7db4c0911e37d 100644 --- a/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch +++ b/patches/chromium/fix_crash_when_saving_edited_pdf_files.patch @@ -13,10 +13,10 @@ 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.js b/chrome/browser/resources/pdf/pdf_viewer.js -index 42407ef7c214bed1eb44165a87c6d0dc44f0ad7f..64225caf3738549520b35259628559ec6c15d901 100644 +index f3d71309080248024983891acb17d4df69648056..3cd563ed13ab9bd8fa084f54eb8f112b66399eb9 100644 --- a/chrome/browser/resources/pdf/pdf_viewer.js +++ b/chrome/browser/resources/pdf/pdf_viewer.js -@@ -967,25 +967,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -966,25 +966,12 @@ export class PDFViewerElement extends PDFViewerBaseElement { dataArray = [result.dataToSave]; } @@ -47,7 +47,7 @@ index 42407ef7c214bed1eb44165a87c6d0dc44f0ad7f..64225caf3738549520b35259628559ec } /** -@@ -1112,30 +1099,13 @@ export class PDFViewerElement extends PDFViewerBaseElement { +@@ -1111,30 +1098,13 @@ export class PDFViewerElement extends PDFViewerBaseElement { if (!fileName.toLowerCase().endsWith('.pdf')) { fileName = fileName + '.pdf'; } diff --git a/patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch b/patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch deleted file mode 100644 index 17f355134d0f0..0000000000000 --- a/patches/chromium/fix_don_t_restore_maximized_windows_when_calling_showinactive.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: David Sanders -Date: Fri, 11 Feb 2022 22:37:39 +0000 -Subject: fix: don't restore maximized windows when calling ShowInactive - -This is a backport from Chromium of -https://chromium-review.googlesource.com/c/chromium/src/+/3371573. - -diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 067861bb743ee2f3c1916794d45efb7dd591b230..6507557bf5a47492343602607e0dbb7d8f88246d 100644 ---- a/ui/views/win/hwnd_message_handler.cc -+++ b/ui/views/win/hwnd_message_handler.cc -@@ -664,9 +664,16 @@ void HWNDMessageHandler::Show(ui::WindowShowState show_state, - SetWindowPlacement(hwnd(), &placement); - native_show_state = SW_SHOWMAXIMIZED; - } else { -+ const bool is_maximized = IsMaximized(); -+ -+ // Use SW_SHOW/SW_SHOWNA instead of SW_SHOWNORMAL/SW_SHOWNOACTIVATE so that -+ // the window is not restored to its original position if it is maximized. -+ // This could be used unconditionally for ui::SHOW_STATE_INACTIVE, but -+ // cross-platform behavior when showing a minimized window is inconsistent, -+ // some platforms restore the position, some do not. See crbug.com/1296710 - switch (show_state) { - case ui::SHOW_STATE_INACTIVE: -- native_show_state = SW_SHOWNOACTIVATE; -+ native_show_state = is_maximized ? SW_SHOWNA : SW_SHOWNOACTIVATE; - break; - case ui::SHOW_STATE_MAXIMIZED: - native_show_state = SW_SHOWMAXIMIZED; -@@ -677,9 +684,9 @@ void HWNDMessageHandler::Show(ui::WindowShowState show_state, - case ui::SHOW_STATE_NORMAL: - if ((GetWindowLong(hwnd(), GWL_EXSTYLE) & WS_EX_TRANSPARENT) || - (GetWindowLong(hwnd(), GWL_EXSTYLE) & WS_EX_NOACTIVATE)) { -- native_show_state = SW_SHOWNOACTIVATE; -+ native_show_state = is_maximized ? SW_SHOWNA : SW_SHOWNOACTIVATE; - } else { -- native_show_state = SW_SHOWNORMAL; -+ native_show_state = is_maximized ? SW_SHOW : SW_SHOWNORMAL; - } - break; - case ui::SHOW_STATE_FULLSCREEN: diff --git a/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch b/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch index aaf3d8e889dd8..cf2398b0c00ef 100644 --- a/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch +++ b/patches/chromium/fix_dont_delete_SerialPortManager_on_main_thread.patch @@ -50,7 +50,7 @@ upstream would also hit this DCHECK, so give it a try with content_shell or chrome and that would help reporting upstream crbug. diff --git a/services/device/device_service.cc b/services/device/device_service.cc -index 1081fb518f896b1ca862f900866e271bb4cc31ad..b68e5bbb276204a4db752f5646c8256497ead18d 100644 +index 11a7b2902490986ba2462f92c3b3e5ae1b1a127f..32d591621c7206affab50ef061aa565527d5952f 100644 --- a/services/device/device_service.cc +++ b/services/device/device_service.cc @@ -159,7 +159,7 @@ DeviceService::~DeviceService() { diff --git a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index 5df60153704b6..458f2e257efd7 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta to users. We should try to upstream this. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index b693a98ef9e4333b0d1825ee156860a5c2dafcf6..5ca08191deaf9e8af198e12e51b1d58bb5089ffb 100644 +index 7440f2025701ccde0ade36cda22467dd0614109b..3c6ee78454dc9154a37ec9046e382878ffda0c82 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1816,7 +1816,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -1830,7 +1830,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, // IncrementCapturerCount() is destructed. void DecrementCapturerCount(bool stay_hidden, bool stay_awake, @@ -21,12 +21,12 @@ index b693a98ef9e4333b0d1825ee156860a5c2dafcf6..5ca08191deaf9e8af198e12e51b1d58b // Calculates the PageVisibilityState for |visibility|, taking the capturing // state into account. diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index d59f80df234872e0e7a89c9283e820a49c30b0e4..c3c97789daba03d288c442526015017adcaf1e88 100644 +index cd1b44d4ff5ce8924749ba9e41b3f599108bb8fd..72bc509b0506fafd026aa858864623886142b5f0 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -677,6 +677,10 @@ class WebContents : public PageNavigator, +@@ -673,6 +673,10 @@ class WebContents : public PageNavigator, bool stay_awake, - bool is_activity = true) WARN_UNUSED_RESULT = 0; + bool is_activity = true) = 0; + virtual void DecrementCapturerCount(bool stay_hidden, + bool stay_awake, diff --git a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch index 9ee02ccf3acd2..2986f58de269f 100644 --- a/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch +++ b/patches/chromium/fix_media_key_usage_with_globalshortcuts.patch @@ -59,7 +59,7 @@ index ad366d0fd4c3a637d75a102ab56984f0d01bfc04..d63eb133fd4bab1ea309bb8c742acf88 // true if register successfully, or false if 1) the specificied |accelerator| // has been registered by another caller or other native applications, or diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc -index 5938f75742b793868638e693a9a8c8dc686dfc46..7f30f3fdd2c63612232e31c331b26b17ad729efb 100644 +index ac923f436cbdd6ded0629da4e4c659d94258e55b..7e603dd5bad2a60b1bd7d9df569a10e838d797bc 100644 --- a/content/browser/media/media_keys_listener_manager_impl.cc +++ b/content/browser/media/media_keys_listener_manager_impl.cc @@ -55,7 +55,12 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey( @@ -76,7 +76,7 @@ index 5938f75742b793868638e693a9a8c8dc686dfc46..7f30f3fdd2c63612232e31c331b26b17 !media_keys_listener_->StartWatchingMediaKey(key_code)) { return false; } -@@ -232,18 +237,18 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { +@@ -238,18 +243,18 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() { #endif if (system_media_controls_) { diff --git a/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch b/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch index 302cb66261d11..f957509ddd87c 100644 --- a/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch +++ b/patches/chromium/fix_patch_out_permissions_checks_in_exclusive_access.patch @@ -14,7 +14,7 @@ but it's not strictly necessary for this API to work to spec. Profile check has been upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3247196 diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index cf2a4efc6e99cd53bf0a3a7ae9222578627d3714..171ebbdc16d0fb47054ccc001cf144bb93355c28 100644 +index 9b2c91d39324b61afa49ccea6be2eda8308473ff..1652b52c5c752809348b3ab44d3703ac343c829d 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -382,13 +382,9 @@ void FullscreenController::EnterFullscreenModeInternal( @@ -41,7 +41,7 @@ index cf2a4efc6e99cd53bf0a3a7ae9222578627d3714..171ebbdc16d0fb47054ccc001cf144bb if (display_id != display::kInvalidDisplayId) { // Check, but do not prompt, for permission to request a specific screen. // Sites generally need permission to get the display id in the first place. -@@ -414,6 +411,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -413,6 +410,7 @@ void FullscreenController::EnterFullscreenModeInternal( display_id = display::kInvalidDisplayId; } } diff --git a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch index 719b838e366ab..0559a3d4c4528 100644 --- a/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch +++ b/patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch @@ -7,7 +7,7 @@ This tweaks Chrome's Accessibility support at chrome://accessibility to make it usable from Electron by removing Profile references. diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc -index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba135a2d885 100644 +index 555dba06e99bd7294f88a21ddaf3b86a12fdd5ac..8064592eb285d1407ff8334149c27e3a65560d9e 100644 --- a/chrome/browser/accessibility/accessibility_ui.cc +++ b/chrome/browser/accessibility/accessibility_ui.cc @@ -20,7 +20,10 @@ @@ -24,7 +24,7 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 @@ -49,9 +52,11 @@ #include "ui/views/accessibility/view_accessibility.h" - #if !defined(OS_ANDROID) + #if !BUILDFLAG(IS_ANDROID) +#if 0 #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" @@ -37,7 +37,7 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 accessibility_mode); } --#if !defined(OS_ANDROID) +-#if !BUILDFLAG(IS_ANDROID) +#if 0 std::unique_ptr BuildTargetDescriptor(Browser* browser) { std::unique_ptr target_data( @@ -53,25 +53,25 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode(); bool is_native_enabled = content::BrowserAccessibilityState::GetInstance() @@ -236,7 +243,7 @@ void HandleAccessibilityRequestCallback( - data.SetBoolean(kViewsAccessibility, + data.SetBoolKey(kViewsAccessibility, features::IsAccessibilityTreeForViewsEnabled()); - bool show_internal = pref->GetBoolean(prefs::kShowInternalAccessibilityTree); + bool show_internal = true; - data.SetString(kInternal, show_internal ? kOn : kOff); + data.SetStringKey(kInternal, show_internal ? kOn : kOff); std::unique_ptr rvh_list(new base::ListValue()); @@ -271,11 +278,11 @@ void HandleAccessibilityRequestCallback( data.Set(kPagesField, std::move(rvh_list)); std::unique_ptr browser_list(new base::ListValue()); --#if !defined(OS_ANDROID) +-#if !BUILDFLAG(IS_ANDROID) +#if 0 for (Browser* browser : *BrowserList::GetInstance()) { browser_list->Append(BuildTargetDescriptor(browser)); } --#endif // !defined(OS_ANDROID) -+#endif // !defined(OS_ANDROID) +-#endif // !BUILDFLAG(IS_ANDROID) ++#endif // !BUILDFLAG(IS_ANDROID) data.Set(kBrowsersField, std::move(browser_list)); std::unique_ptr widgets_list(new base::ListValue()); @@ -97,7 +97,7 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 std::string accessibility_contents = - web_contents->DumpAccessibilityTree(internal, property_filters); + web_contents->DumpAccessibilityTree(true, property_filters); - result->SetString(kTreeField, accessibility_contents); + result->SetStringKey(kTreeField, accessibility_contents); FireWebUIListener(request_type, *(result.get())); } @@ -627,6 +638,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( @@ -113,7 +113,7 @@ index 2d17ddf94871a028af1b3470568a50d2b1fd7294..e994a0cd005890a9f0a4a41a1a8a5ba1 } } +#endif - #endif // !defined(OS_ANDROID) + #endif // !BUILDFLAG(IS_ANDROID) // No browser with the specified |session_id| was found. std::unique_ptr result(new base::DictionaryValue()); @@ -757,5 +770,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( diff --git a/patches/chromium/fix_properly_honor_printing_page_ranges.patch b/patches/chromium/fix_properly_honor_printing_page_ranges.patch index e8e041d8c7179..7addac9d25797 100644 --- a/patches/chromium/fix_properly_honor_printing_page_ranges.patch +++ b/patches/chromium/fix_properly_honor_printing_page_ranges.patch @@ -10,10 +10,10 @@ them should they exist. This will be upstreamed. diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h -index 36f2e09d563a610128305cf4890e2af3bf6f4cdd..85363bd922bf0ab2630e3d5f350de0c58792963a 100644 +index 3725aa4cd902a9c84e22bbcbd702bd47e1901fe4..221019f5df71e1d66accbf2ea2d161bd1125666f 100644 --- a/printing/printing_context_mac.h +++ b/printing/printing_context_mac.h -@@ -85,6 +85,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { +@@ -83,6 +83,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext { // Returns true if the orientation was set. bool SetOrientationIsLandscape(bool landscape); diff --git a/patches/chromium/fix_use_electron_generated_resources.patch b/patches/chromium/fix_use_electron_generated_resources.patch index 1d976575fa597..60b0f49524594 100644 --- a/patches/chromium/fix_use_electron_generated_resources.patch +++ b/patches/chromium/fix_use_electron_generated_resources.patch @@ -26,7 +26,7 @@ index f72431f5bc7ba82316cf318f7845e7523c366d92..5133f3cd28c0d630a039118eb91c6c37 #include "components/zoom/page_zoom_constants.h" #include "pdf/pdf_features.h" diff --git a/chrome/browser/printing/printing_service.cc b/chrome/browser/printing/printing_service.cc -index ec70ac13f96a0085747ecc3f275fb392d3dcca42..6b470dad30760ee709e702e94c19eaeb3099442a 100644 +index 6d18517898c11c6a628cec2eade57fe845827b3d..a21f52e8a3c6f80d69b27faae4b77700fdd09e35 100644 --- a/chrome/browser/printing/printing_service.cc +++ b/chrome/browser/printing/printing_service.cc @@ -5,7 +5,7 @@ diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 78b610c496281..481bd633fe47e 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch Allows embedder to intercept site instances created by chromium. diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index 4864b5301dec83150d3a48a9168e0d7ddef344ad..0e429686a325ef08ce617810c2c5ec4108bec973 100644 +index 1ca418461788e5b7d58c14b03c456d2c21f1305b..7a65b6713e3d0547f1990f8c59d0d11459532477 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -3099,6 +3099,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -3089,6 +3089,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index 4864b5301dec83150d3a48a9168e0d7ddef344ad..0e429686a325ef08ce617810c2c5ec41 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 253c47f41294155bab9a3b0884e65a09fcacd0d0..ccce9c5de27c863c181e5c54b3f8976106a77c08 100644 +index 2fe1462a2cd92a731a5816b5fc22b059bad92fe8..a4dfa54a7844983262cc0fa635433131382e4d14 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -274,6 +274,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -275,6 +275,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gin_enable_disable_v8_platform.patch b/patches/chromium/gin_enable_disable_v8_platform.patch index a4fac7bbe5800..5043b8a49a854 100644 --- a/patches/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/chromium/gin_enable_disable_v8_platform.patch @@ -7,10 +7,10 @@ We don't use gin to create the V8 platform, because we need to inject Node things. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index 6305d03e2315e8b9925071c018a81c102dda2a55..2bed8f7ce21ab052c0c319775875b9cf008b2636 100644 +index 00190da513499e6275d19bd99b6502db246cd33d..f273749bd026abb287ba33e03208a286e80a57a1 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -115,9 +115,10 @@ IsolateHolder::~IsolateHolder() { +@@ -121,9 +121,10 @@ IsolateHolder::~IsolateHolder() { void IsolateHolder::Initialize(ScriptMode mode, v8::ArrayBuffer::Allocator* allocator, const intptr_t* reference_table, @@ -24,10 +24,10 @@ index 6305d03e2315e8b9925071c018a81c102dda2a55..2bed8f7ce21ab052c0c319775875b9cf g_reference_table = reference_table; } diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index 78133f9b34327c311c69620af621eba3d7f2cbf9..a965545de342811e468594fab4d792fc5c4daf32 100644 +index 1e36669dfb275b8a7c4913c8465bd299c548ed3a..178023d52c9e8ef716ee215e7a243b1800357818 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -100,7 +100,8 @@ class GIN_EXPORT IsolateHolder { +@@ -102,7 +102,8 @@ class GIN_EXPORT IsolateHolder { static void Initialize(ScriptMode mode, v8::ArrayBuffer::Allocator* allocator, const intptr_t* reference_table = nullptr, @@ -38,10 +38,10 @@ index 78133f9b34327c311c69620af621eba3d7f2cbf9..a965545de342811e468594fab4d792fc // Returns whether `Initialize` has already been invoked in the process. // Initialization is a one-way operation (i.e., this method cannot return diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index f576fc909eed4168130571590e3a80d19ccc3dd8..ff91f59446275d027ac7100c1eb0dcd1051993da 100644 +index f411bbde031d18bd3e0322ce154ccfd8eace930d..5db96b7402de70d1b4eba8b12a51fbc89fcb7fb6 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -341,12 +341,14 @@ void SetFlags(IsolateHolder::ScriptMode mode, +@@ -342,12 +342,14 @@ void SetFlags(IsolateHolder::ScriptMode mode, // static void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, @@ -59,7 +59,7 @@ index f576fc909eed4168130571590e3a80d19ccc3dd8..ff91f59446275d027ac7100c1eb0dcd1 // Set this early on as some initialization steps, such as the initialization // of the virtual memory cage, already use V8's random number generator. diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h -index de650aa85dd083ec8c99d72b1f6cc447bb277f09..da97190ca86f5e04dd74dbff2282901fb4713f5b 100644 +index beeedc5737f6e60dde123200fbb6430a40366577..17ee4c894e89b7d2d12377475a5dd01910b61312 100644 --- a/gin/v8_initializer.h +++ b/gin/v8_initializer.h @@ -29,7 +29,8 @@ class GIN_EXPORT V8Initializer { diff --git a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch index 4a50d8a5e8825..385502d7e9df0 100644 --- a/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch +++ b/patches/chromium/gpu_notify_when_dxdiag_request_fails.patch @@ -12,10 +12,10 @@ rendering and there is no signal from browser process on this event to identify it. diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc -index 7821945da13ece57529c1de14d1cbd7f645d19ab..9be940f4ee047279f5969a6c572d6acbd408ddc5 100644 +index b26a3c72aa63b81f8f4558b28b404faf138a897b..335dc385eb03bc9634387af44dfd1aa3bfa71cb6 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc -@@ -229,6 +229,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { +@@ -230,6 +230,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() { base::AutoLock auto_lock(lock_); private_->TerminateInfoCollectionGpuProcess(); } @@ -28,7 +28,7 @@ index 7821945da13ece57529c1de14d1cbd7f645d19ab..9be940f4ee047279f5969a6c572d6acb void GpuDataManagerImpl::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h -index bb9a976842b869bf31c46c45686f6f5238841eb2..489619f6d3d4accadb811db287a9ff498f35d8bb 100644 +index 4364da656ac02f2f717e713f37d29ce44c14242b..ba044aee23db495e1da69c5bc0a807e96783faa9 100644 --- a/content/browser/gpu/gpu_data_manager_impl.h +++ b/content/browser/gpu/gpu_data_manager_impl.h @@ -124,6 +124,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager, @@ -40,10 +40,10 @@ index bb9a976842b869bf31c46c45686f6f5238841eb2..489619f6d3d4accadb811db287a9ff49 void UpdateDawnInfo(const std::vector& dawn_info_list); diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc -index cddf8dfa73ba64b89e37b3ca375d5872d23b995f..06fbfe2b0a9a74a785ba54d495f7813286e81b6b 100644 +index 972bb4e8ba2d1470ed5f24c125551e3e627d79e4..d3b15d35eb458c00e470569904924c28c7a3957d 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc -@@ -1212,6 +1212,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { +@@ -1211,6 +1211,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() { if (host) host->ForceShutdown(); } @@ -57,7 +57,7 @@ index cddf8dfa73ba64b89e37b3ca375d5872d23b995f..06fbfe2b0a9a74a785ba54d495f78132 void GpuDataManagerImplPrivate::UpdateDawnInfo( diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h -index 8ae871aaf3da7b08da79490a87104ce62ca30b4e..ca6405c728187c10b19e86e7848b6f5fe558e601 100644 +index 81f6abb91a3fdefc1b0128f3224c7b82bfcbd0d2..99980e3528f4660bf1205e44326645d97e762cb9 100644 --- a/content/browser/gpu/gpu_data_manager_impl_private.h +++ b/content/browser/gpu/gpu_data_manager_impl_private.h @@ -89,6 +89,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate { diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 55bed692b0c31..e595534ffa59e 100644 --- a/patches/chromium/gritsettings_resource_ids.patch +++ b/patches/chromium/gritsettings_resource_ids.patch @@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch Add electron resources file to the list of resource ids generation. diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec -index f3a209264743ce4f38da3c51ad49a9a9308d39e0..57dbb19552cb8496a2c402cbf20ca7ce39c0dad2 100644 +index 77f77f2deb13fc1c02903fc436028cce2d051cf0..25223130a82b22ad46eddf7e133c6085c5c843d3 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -903,6 +903,11 @@ +@@ -952,6 +952,11 @@ "includes": [4960], }, diff --git a/patches/chromium/gtk_visibility.patch b/patches/chromium/gtk_visibility.patch index c2802a41c4839..52f3cc0d8a50e 100644 --- a/patches/chromium/gtk_visibility.patch +++ b/patches/chromium/gtk_visibility.patch @@ -6,25 +6,27 @@ Subject: gtk_visibility.patch Allow electron to depend on GTK in the GN build. diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn -index c7173176472e80d8de4888000e99d45843240785..c3076d8112ec8976a438d1351ad2e404ac64fce7 100644 +index 349043f8a3cfc9f91cbae951e74258799a4fd126..0f7e3e544f524a7ad6660b54912cb1190282b6fc 100644 --- a/build/config/linux/gtk/BUILD.gn +++ b/build/config/linux/gtk/BUILD.gn -@@ -33,6 +33,7 @@ pkg_config("gtk_internal_config") { +@@ -27,6 +27,7 @@ pkg_config("gtk_internal_config") { group("gtk") { visibility = [ + "//electron:*", - # This is the only target that can depend on GTK. Do not add more targets - # to this list. - "//ui/gtk:gtk_stubs", -@@ -64,6 +65,9 @@ pkg_config("gtkprint_internal_config") { - } + # These are allow-listed for WebRTC builds. Nothing in else should depend + # on GTK. + "//examples:peerconnection_client", +diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn +index dd65850ec1352b764a9661b37e7c7b5e7d256016..89094825f858dcd91298dbaf26b370ca57eb4836 100644 +--- a/ui/ozone/platform/x11/BUILD.gn ++++ b/ui/ozone/platform/x11/BUILD.gn +@@ -6,7 +6,7 @@ import("//build/config/chromeos/ui_mode.gni") + import("//gpu/vulkan/features.gni") + import("//ui/base/ui_features.gni") + +-visibility = [ "//ui/ozone/*" ] ++visibility = [ "//ui/ozone/*", "//electron:*" ] + + assert(is_linux || is_chromeos) - group("gtkprint") { -- visibility = [ "//ui/gtk:*" ] -+ visibility = [ -+ "//electron:*", -+ "//ui/gtk:*", -+ ] - public_configs = [ ":gtkprint_internal_config" ] - } diff --git a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch index 200d22d17c1b8..2b0621f918e82 100644 --- a/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch +++ b/patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch @@ -8,13 +8,13 @@ require a largeish patch to get working, so just redirect it to our implementation instead. diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc -index ae5c53a945707ea269db0468f3e12a90d61cbafb..e74637fd3bb934b97f7c55cd8c57e86035a8d64e 100644 +index b5c0e1c131351a51e3c03918dfc10e92ca1bace1..c6fe2e473a9d8a5ed2854a69909eb360d052147a 100644 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc @@ -10,8 +10,8 @@ + #include "base/bind.h" #include "base/feature_list.h" #include "base/guid.h" - #include "base/ignore_result.h" -#include "chrome/browser/extensions/api/streams_private/streams_private_api.h" -#include "chrome/browser/plugins/plugin_utils.h" +#include "electron/shell/browser/extensions/api/streams_private/streams_private_api.h" diff --git a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch index dc5153dd6a2fd..6682f1b87ea4a 100644 --- a/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch +++ b/patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch @@ -11,10 +11,10 @@ If removing this patch causes no sync failures, it's safe to delete :+1: Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py -index 13e126305548d8681754afdc5bca72e0df22f98c..63fd08c27d6f20295ce50be0685881ec0e645594 100755 +index ee41efe814da161cafb49229e1f02c8b82749e7c..494bbdeea2725e4b1218ba534fd126203012c100 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py -@@ -282,6 +282,8 @@ def main(): +@@ -298,6 +298,8 @@ def GetDefaultHostOs(): 'win32': 'win', } default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform) @@ -22,4 +22,4 @@ index 13e126305548d8681754afdc5bca72e0df22f98c..63fd08c27d6f20295ce50be0685881ec + default_host_os = 'mac' if default_host_os == 'mac' and platform.machine() == 'arm64': default_host_os = 'mac-arm64' - + return default_host_os diff --git a/patches/chromium/isolate_holder.patch b/patches/chromium/isolate_holder.patch index 71d3f81551c19..bcf1ff58add19 100644 --- a/patches/chromium/isolate_holder.patch +++ b/patches/chromium/isolate_holder.patch @@ -15,42 +15,38 @@ for us to register the isolate in between Isolate::Allocate and Isolate::Initialize. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index 2bed8f7ce21ab052c0c319775875b9cf008b2636..9aa4536d5c8fb38ac58e41c107b946cf9ba5d738 100644 +index f273749bd026abb287ba33e03208a286e80a57a1..0159cd61a8e95d6cca51cdc855f1dea3ec965d6b 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -57,7 +57,8 @@ IsolateHolder::IsolateHolder( - IsolateType isolate_type, - IsolateCreationMode isolate_creation_mode, +@@ -59,7 +59,8 @@ IsolateHolder::IsolateHolder( v8::CreateHistogramCallback create_histogram_callback, -- v8::AddHistogramSampleCallback add_histogram_sample_callback) -+ v8::AddHistogramSampleCallback add_histogram_sample_callback, + v8::AddHistogramSampleCallback add_histogram_sample_callback, + v8::FatalErrorCallback fatal_error_callback, +- v8::OOMErrorCallback oom_error_callback) ++ v8::OOMErrorCallback oom_error_callback, + v8::Isolate* isolate) : access_mode_(access_mode), isolate_type_(isolate_type) { CHECK(Initialized()) << "You need to invoke gin::IsolateHolder::Initialize first"; -@@ -68,7 +69,11 @@ IsolateHolder::IsolateHolder( +@@ -70,7 +71,7 @@ IsolateHolder::IsolateHolder( v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator; DCHECK(allocator); - isolate_ = v8::Isolate::Allocate(); -+ if (!isolate) { -+ isolate_ = v8::Isolate::Allocate(); -+ } else { -+ isolate_ = isolate; -+ } ++ isolate_ = isolate ? isolate : v8::Isolate::Allocate(); isolate_data_ = std::make_unique(isolate_, allocator, access_mode_, task_runner); if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) { diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index a965545de342811e468594fab4d792fc5c4daf32..94d1d45eb766ee1e2a2910124e46969edf264ae9 100644 +index 178023d52c9e8ef716ee215e7a243b1800357818..979fdc27efbe69c276894e0dc82e53ac2c4db7b4 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -82,7 +82,8 @@ class GIN_EXPORT IsolateHolder { - IsolateType isolate_type, - IsolateCreationMode isolate_creation_mode = IsolateCreationMode::kNormal, +@@ -84,7 +84,8 @@ class GIN_EXPORT IsolateHolder { v8::CreateHistogramCallback create_histogram_callback = nullptr, -- v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr); -+ v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr, + v8::AddHistogramSampleCallback add_histogram_sample_callback = nullptr, + v8::FatalErrorCallback fatal_error_callback = nullptr, +- v8::OOMErrorCallback oom_error_callback = nullptr); ++ v8::OOMErrorCallback oom_error_callback = nullptr, + v8::Isolate* isolate = nullptr); IsolateHolder(const IsolateHolder&) = delete; IsolateHolder& operator=(const IsolateHolder&) = delete; diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index 05624bfa5e7b0..b960942083b87 100644 --- a/patches/chromium/load_v8_snapshot_in_browser_process.patch +++ b/patches/chromium/load_v8_snapshot_in_browser_process.patch @@ -9,10 +9,10 @@ but due to the nature of electron, we need to load the v8 snapshot in the browser process. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 9b3e3ca0cf6c9052953e0ac82f1622113a8b2d0d..be8aaecf589bb5b8198d44acbf115e456ed76dc1 100644 +index 9d22238878e3204dd1d866d2bb085d5311dca36a..e3610815fd942e631a61089ca5eeba07edd7213c 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -254,11 +254,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -249,11 +249,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, const std::string& process_type) { diff --git a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch index 6ba0de2e1d1d7..6cf5df78a02c3 100644 --- a/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch +++ b/patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch @@ -9,12 +9,12 @@ be created for each child process, despite logs being redirected to a file. diff --git a/content/app/content_main.cc b/content/app/content_main.cc -index 5ad6c026e9d05b3c016adeab1c5eea9883dcac6c..2c94c115514b644c897e9c3896fe2941d42cf132 100644 +index 332b7d026e0365a66d5f4f275a90b48d0f2db5aa..3813fe1a3b2e95af5e213201ab3ea08a656e01c3 100644 --- a/content/app/content_main.cc +++ b/content/app/content_main.cc -@@ -378,8 +378,12 @@ RunContentProcess(ContentMainParams params, +@@ -381,8 +381,12 @@ RunContentProcess(ContentMainParams params, - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) // Route stdio to parent console (if any) or create one. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableLogging)) { diff --git a/patches/chromium/make_include_of_stack_trace_h_unconditional.patch b/patches/chromium/make_include_of_stack_trace_h_unconditional.patch deleted file mode 100644 index d91176c28591b..0000000000000 --- a/patches/chromium/make_include_of_stack_trace_h_unconditional.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Samuel Attard -Date: Tue, 11 May 2021 20:41:00 -0700 -Subject: make include of stack_trace.h unconditional - -This conditional include throws goma for a loop for no real reason. -While we work on either upstreaming this or fixing the underlying goma -issue this makes our builds 33% faster during local testing (11m vs 18m). - -diff --git a/base/sequence_checker.h b/base/sequence_checker.h -index 50a548a759c2dc6d79978741a0c803500d53a9f8..cd5049e8bf59c51b890bcc332f9a1c5f0ec339c9 100644 ---- a/base/sequence_checker.h -+++ b/base/sequence_checker.h -@@ -10,9 +10,8 @@ - #include "base/strings/string_piece.h" - #include "build/build_config.h" - --#if DCHECK_IS_ON() - #include "base/debug/stack_trace.h" --#endif -+ - - // SequenceChecker is a helper class used to help verify that some methods of a - // class are called sequentially (for thread-safety). It supports thread safety diff --git a/patches/chromium/mas-cfisobjc.patch b/patches/chromium/mas-cfisobjc.patch index 6d09d342c4c50..88035201b5109 100644 --- a/patches/chromium/mas-cfisobjc.patch +++ b/patches/chromium/mas-cfisobjc.patch @@ -6,11 +6,11 @@ Subject: mas: avoid usage of _CFIsObjC Removes usage of the _CFIsObjC private API. diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm -index 6e5d76dc70e472f599385d967e8941200730fd9d..73d7f162a465d2e50d3ea3e6d14b6c0ed37775d1 100644 +index bd26c088c2340f0c88227837fc797b1ed8157768..6e133c11acb7ea2570e6295b0788edc1606afbc2 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm @@ -31,12 +31,6 @@ - #if !defined(OS_IOS) + #if !BUILDFLAG(IS_IOS) CFTypeID SecACLGetTypeID(); CFTypeID SecTrustedApplicationGetTypeID(); -// The NSFont/CTFont toll-free bridging is broken before 10.15. @@ -22,7 +22,7 @@ index 6e5d76dc70e472f599385d967e8941200730fd9d..73d7f162a465d2e50d3ea3e6d14b6c0e #endif } // extern "C" -@@ -329,8 +323,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { +@@ -317,8 +311,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { const_cast(reinterpret_cast(cf_val)); DCHECK(!cf_val || CTFontGetTypeID() == CFGetTypeID(cf_val) || @@ -32,7 +32,7 @@ index 6e5d76dc70e472f599385d967e8941200730fd9d..73d7f162a465d2e50d3ea3e6d14b6c0e return ns_val; } -@@ -401,9 +394,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { +@@ -389,9 +382,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { return (CTFontRef)(cf_val); } diff --git a/patches/chromium/mas-cgdisplayusesforcetogray.patch b/patches/chromium/mas-cgdisplayusesforcetogray.patch index 8fc488bd02ce0..c55b2981c5830 100644 --- a/patches/chromium/mas-cgdisplayusesforcetogray.patch +++ b/patches/chromium/mas-cgdisplayusesforcetogray.patch @@ -6,10 +6,10 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray Removes usage of the CGDisplayUsesForceToGray private API. diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm -index 7354a04f927af9a61eff83a8a5a9bc1054da80ec..f38ef7e9e1781f0c880ffcccabb984dcafdaada8 100644 +index 1fb42e658d219e46bbc157d929d3b2158c063204..cb6dec724dbe511cb0c66d507d0b68db7296b648 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm -@@ -149,7 +149,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { +@@ -155,7 +155,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) { display.set_color_depth(Display::kDefaultBitsPerPixel); display.set_depth_per_component(Display::kDefaultBitsPerComponent); } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index afa9d5f4d5e02..21bddfec34c2b 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -11,10 +11,10 @@ needs to think it's coming from the PWA process). I think it can just be chopped out -- if there are any side-effects, we should be able to work around them. diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm -index c8ba6f3da89d7d370032dd964c64a327b2e2484e..f9dde6d0a369a2691bac1a1fe1e79c21632abba3 100644 +index 9734fb620a9a4010083af41a9e5cea038556eef5..05c95fb9b15f5ccbfecaee29d360dd27bf42f086 100644 --- a/components/remote_cocoa/app_shim/application_bridge.mm +++ b/components/remote_cocoa/app_shim/application_bridge.mm -@@ -50,6 +50,7 @@ +@@ -51,6 +51,7 @@ // NativeWidgetNSWindowHostHelper: id GetNativeViewAccessible() override { @@ -22,7 +22,7 @@ index c8ba6f3da89d7d370032dd964c64a327b2e2484e..f9dde6d0a369a2691bac1a1fe1e79c21 if (!remote_accessibility_element_) { int64_t browser_pid = 0; std::vector element_token; -@@ -60,6 +61,9 @@ id GetNativeViewAccessible() override { +@@ -61,6 +62,9 @@ id GetNativeViewAccessible() override { ui::RemoteAccessibility::GetRemoteElementFromToken(element_token); } return remote_accessibility_element_.get(); @@ -32,7 +32,7 @@ index c8ba6f3da89d7d370032dd964c64a327b2e2484e..f9dde6d0a369a2691bac1a1fe1e79c21 } void DispatchKeyEvent(ui::KeyEvent* event) override { bool event_handled = false; -@@ -98,8 +102,10 @@ void GetWordAt(const gfx::Point& location_in_content, +@@ -99,8 +103,10 @@ void GetWordAt(const gfx::Point& location_in_content, mojo::AssociatedRemote text_input_host_remote_; std::unique_ptr bridge_; @@ -44,10 +44,10 @@ index c8ba6f3da89d7d370032dd964c64a327b2e2484e..f9dde6d0a369a2691bac1a1fe1e79c21 } // namespace diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -index 2cb46846d9c42f8e08c29c39ad8fdbde12bc2ed9..5eb8124be309ad2e55ca01ece23a942b5e1b0101 100644 +index fedefafc9837f681ad1c3fc48d06a333fea893e2..f07a090c24382c9330e8bd8baa3de47ec76da956 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm -@@ -557,10 +557,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -561,10 +561,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -61,10 +61,10 @@ index 2cb46846d9c42f8e08c29c39ad8fdbde12bc2ed9..5eb8124be309ad2e55ca01ece23a942b // Beware: This view was briefly removed (in favor of a bare CALayer) in // crrev/c/1236675. The ordering of unassociated layers relative to NSView diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -index bea5957a47ebc4d75eafa52051be669ac2af9ffd..1f37c096cc4fa40ed26050db1cbdd28aea5dd681 100644 +index 2cd40c288f42937688e4f846a002779158ada68f..f4c7bb0ab75835bfdbd100ce852646bf77817c9e 100644 --- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm +++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm -@@ -75,8 +75,10 @@ id GetFocusedBrowserAccessibilityElement() override { +@@ -73,8 +73,10 @@ id GetFocusedBrowserAccessibilityElement() override { return nil; } void SetAccessibilityWindow(NSWindow* window) override { @@ -75,7 +75,7 @@ index bea5957a47ebc4d75eafa52051be669ac2af9ffd..1f37c096cc4fa40ed26050db1cbdd28a } void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event, -@@ -138,8 +140,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { +@@ -136,8 +138,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override { mojo::AssociatedRemote host_; std::unique_ptr bridge_; @@ -87,7 +87,7 @@ index bea5957a47ebc4d75eafa52051be669ac2af9ffd..1f37c096cc4fa40ed26050db1cbdd28a } diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h -index 7d6b64bc764d16929ecad44dbf0187514a984b76..ed14f9459418e493a3baa6eb3a1265072a46ca76 100644 +index 80d639b4a9eb7fa9265da4977782d125b72db719..5f82a49f6336cf89c8d404f8aef7b103709c95e9 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.h +++ b/content/browser/renderer_host/render_widget_host_view_mac.h @@ -49,7 +49,9 @@ class ScopedPasswordInputEnabler; @@ -100,7 +100,7 @@ index 7d6b64bc764d16929ecad44dbf0187514a984b76..ed14f9459418e493a3baa6eb3a126507 @class RenderWidgetHostViewCocoa; namespace content { -@@ -667,10 +669,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac +@@ -665,10 +667,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; @@ -114,7 +114,7 @@ index 7d6b64bc764d16929ecad44dbf0187514a984b76..ed14f9459418e493a3baa6eb3a126507 // Used to force the NSApplication's focused accessibility element to be the // content::BrowserAccessibilityCocoa accessibility tree when the NSView for diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab16489665eb29e24 100644 +index 09ada3b859e1862cbf365960422871a56af54983..58002d37ba340f84f47e2522c0d7bf7c1a64c5d2 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -253,8 +253,10 @@ @@ -128,7 +128,7 @@ index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab1648966 // Disconnect from the previous bridge (this will have the effect of // destroying the associated bridge), and close the receiver (to allow it -@@ -1484,8 +1486,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1498,8 +1500,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { @@ -139,7 +139,7 @@ index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab1648966 return [GetInProcessNSView() window]; } -@@ -1529,9 +1533,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1543,9 +1547,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -151,7 +151,7 @@ index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab1648966 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2030,12 +2036,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2038,12 +2044,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken( const std::vector& window_token) { @@ -167,10 +167,10 @@ index 72099de3d33e760cfcc56ee475da9c68f9389c07..7bdca5042ada597afe4228bab1648966 /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 37151bca8d18a3decc418812b6a9ea76eb0c8f3a..3ac702aede00c3eba77751115d6663f561b43c05 100644 +index 37f37c3a8e8a00cf9d4b8959ac2d97fe31629ad8..fa06bafbbaa69a20ce5a3260ca92947cb2bb9228 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -318,6 +318,13 @@ component("base") { +@@ -317,6 +317,13 @@ component("base") { ] } @@ -205,10 +205,10 @@ index e7adfee3210ec723c687adfcc4bee8827ef643e7..25a924a47eeb30d783ef83dbb4896c4b + #endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_ diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h -index 0dfd2de62df57def834a3be4349685da3aab72fb..1881932c122daad0d62e3382bd0e221402b6d380 100644 +index 1964f624abc96c54645d1697b598799cfd9a2a00..30580103974b99dcaed2adb0b460b1af17658927 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h -@@ -29,7 +29,9 @@ +@@ -31,7 +31,9 @@ #include "ui/views/window/dialog_observer.h" @class NativeWidgetMacNSWindow; @@ -218,7 +218,7 @@ index 0dfd2de62df57def834a3be4349685da3aab72fb..1881932c122daad0d62e3382bd0e2214 @class NSView; namespace remote_cocoa { -@@ -429,11 +431,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost +@@ -445,11 +447,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost mojo::AssociatedRemote remote_ns_window_remote_; @@ -233,10 +233,10 @@ index 0dfd2de62df57def834a3be4349685da3aab72fb..1881932c122daad0d62e3382bd0e2214 // Used to force the NSApplication's focused accessibility element to be the // views::Views accessibility tree when the NSView for this is focused. diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -index 48dd1adb4a74201a866b254cfaec85b996ee7517..5b2a46594a23968034a17fbfed173e1031867df9 100644 +index b77478d96caba7e94c198e9cc8cdd7a6b78e6b25..79af41886c66b51219b69282db17497c5af702d5 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -286,14 +286,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -294,14 +294,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator, NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const { if (in_process_ns_window_bridge_) return in_process_ns_window_bridge_->ns_view(); @@ -259,7 +259,7 @@ index 48dd1adb4a74201a866b254cfaec85b996ee7517..5b2a46594a23968034a17fbfed173e10 } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1206,6 +1214,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1275,6 +1283,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -267,7 +267,7 @@ index 48dd1adb4a74201a866b254cfaec85b996ee7517..5b2a46594a23968034a17fbfed173e10 remote_window_accessible_ = ui::RemoteAccessibility::GetRemoteElementFromToken(window_token); remote_view_accessible_ = -@@ -1213,14 +1222,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1282,14 +1291,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator, [remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()]; [remote_view_accessible_ setTopLevelUIElement:remote_window_accessible_.get()]; diff --git a/patches/chromium/mas_disable_remote_layer.patch b/patches/chromium/mas_disable_remote_layer.patch index 20cabc776d492..541ac9b7e977d 100644 --- a/patches/chromium/mas_disable_remote_layer.patch +++ b/patches/chromium/mas_disable_remote_layer.patch @@ -16,10 +16,10 @@ cases where performance improves when disabling remote CoreAnimation (remote CoreAnimation is really only about battery usage). diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h -index c384f18ec959303bd3671c570af87b604d20cf23..f420bd94951f5a2b03d20e5892a4039271ed2078 100644 +index 1b84c9df5990d0905d068ca822d5173313a74edd..89a90a5c8e0c3ede1b0fe63d45c5768b42394474 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h -@@ -20,7 +20,9 @@ +@@ -21,7 +21,9 @@ #include "ui/gl/gl_surface_egl.h" #endif @@ -29,7 +29,7 @@ index c384f18ec959303bd3671c570af87b604d20cf23..f420bd94951f5a2b03d20e5892a40392 @class CALayer; namespace ui { -@@ -113,7 +115,9 @@ class ImageTransportSurfaceOverlayMacBase : public BaseClass, +@@ -116,7 +118,9 @@ class ImageTransportSurfaceOverlayMacBase : public BaseClass, base::WeakPtr delegate_; bool use_remote_layer_api_; @@ -40,10 +40,10 @@ index c384f18ec959303bd3671c570af87b604d20cf23..f420bd94951f5a2b03d20e5892a40392 gfx::Size pixel_size_; diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -index 79a357037df22c78d31ace77ee8cf6291818ecee..3c7d5add7e4f4372708a1b2f7bf31f7b0a4aa0af 100644 +index 224542e2a70e980684d5d882af7fe3988c5ee96b..7a726eea86f21fe31077aaa447cccc05007d5eaa 100644 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm -@@ -53,7 +53,7 @@ +@@ -59,7 +59,7 @@ ca_layer_tree_coordinator_ = std::make_unique( use_remote_layer_api_, allow_av_sample_buffer_display_layer); @@ -52,7 +52,7 @@ index 79a357037df22c78d31ace77ee8cf6291818ecee..3c7d5add7e4f4372708a1b2f7bf31f7b // Create the CAContext to send this to the GPU process, and the layer for // the context. if (use_remote_layer_api_) { -@@ -62,6 +62,7 @@ +@@ -68,6 +68,7 @@ options:@{}] retain]); [ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()]; } @@ -60,7 +60,7 @@ index 79a357037df22c78d31ace77ee8cf6291818ecee..3c7d5add7e4f4372708a1b2f7bf31f7b } template -@@ -142,7 +143,9 @@ +@@ -148,7 +149,9 @@ "GLImpl", static_cast(gl::GetGLImplementation()), "width", pixel_size_.width()); if (use_remote_layer_api_) { @@ -114,18 +114,28 @@ index d684614589c9e55965450d712ee6dc0deef6aade..e0446753a3d972215423c079160fe8bf // This function will check if all of the interfaces listed above are supported diff --git a/ui/base/cocoa/remote_layer_api.mm b/ui/base/cocoa/remote_layer_api.mm -index bbaf9f466f4999acb5bfccf3b9565fd8f556ca2f..8c846ce9523a4b2f6fbdbdbeae4f94b45ac3c115 100644 +index e6baf74c966791ed5326fea23e7d23259a781313..7fab070b8b06dfc5c9940c3b800735d187a72cf9 100644 --- a/ui/base/cocoa/remote_layer_api.mm +++ b/ui/base/cocoa/remote_layer_api.mm -@@ -12,6 +12,7 @@ +@@ -10,14 +10,17 @@ + namespace ui { ++#ifndef MAS_BUILD + namespace { + // Control use of cross-process CALayers to display content directly from the + // GPU process on Mac. + base::Feature kRemoteCoreAnimationAPI{"RemoteCoreAnimationAPI", + base::FEATURE_ENABLED_BY_DEFAULT}; + } // namespace ++#endif + bool RemoteLayerAPISupported() { +#ifndef MAS_BUILD - static bool disabled_at_command_line = - base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableRemoteCoreAnimation); -@@ -46,6 +47,9 @@ bool RemoteLayerAPISupported() { + if (!base::FeatureList::IsEnabled(kRemoteCoreAnimationAPI)) + return false; + +@@ -49,6 +52,9 @@ bool RemoteLayerAPISupported() { // If everything is there, we should be able to use the API. return true; diff --git a/patches/chromium/mas_no_private_api.patch b/patches/chromium/mas_no_private_api.patch index 71b40012bb4e9..02127ca0ad5c1 100644 --- a/patches/chromium/mas_no_private_api.patch +++ b/patches/chromium/mas_no_private_api.patch @@ -139,10 +139,10 @@ index 3f7dce0281f7b5a540d7b9377ef14a8a6aa9a2fa..11d8419791f3e45d5242081422d452d4 void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 5e1b1f542e98f9257938f909a2d92e3117e298af..4b9825694c8b8d6bbe671ebeef8eb57baf8b05a1 100644 +index 6ffc09426b92b0623957f4a5f547865f49e29546..45cf4e11a77c175d61c2ffe69009802596c97e25 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -174,6 +174,12 @@ source_set("audio") { +@@ -175,6 +175,12 @@ source_set("audio") { "mac/scoped_audio_unit.cc", "mac/scoped_audio_unit.h", ] @@ -169,10 +169,10 @@ index ebdc6364312ee710d416318836c03aeec9bfb65c..aa9b50de7efaf0e1b64effea93204984 } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index 3a541ac224c53b2809e8634286dac91873d46b72..89c9b095a2a96b9cae5e8d4bba85847f9585f985 100644 +index e59fec60e9d593d311b21c12daf2d611a36a2d6e..b812dee59b55edee6efe73ce4b1da0a89b45240e 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc -@@ -140,8 +140,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { +@@ -129,8 +129,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { bool Watch() override { CheckOnCorrectSequence(); @@ -182,10 +182,10 @@ index 3a541ac224c53b2809e8634286dac91873d46b72..89c9b095a2a96b9cae5e8d4bba85847f if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged, base::Unretained(this)))) { LOG(ERROR) << "DNS config watch failed to start."; -@@ -158,6 +158,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { +@@ -147,6 +147,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher { success = false; } - #endif // !defined(OS_IOS) + #endif // !BUILDFLAG(IS_IOS) +#endif return success; } @@ -285,3 +285,23 @@ index d59a16112d27e2696437163483c44eca414c225c..1ccd20fe7efa3cbae48f99d0660b0252 default: NOTREACHED(); return nullptr; +diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm +index 7cb34e119cd30353fe56e7c71ed5e1d417896888..dbb6cc8e37eff9b30269687f29808ec3ca46b243 100644 +--- a/ui/accessibility/platform/inspect/ax_transform_mac.mm ++++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm +@@ -86,6 +86,7 @@ + } + } + ++#ifndef MAS_BUILD + // AXTextMarker + if (IsAXTextMarker(value)) { + return AXTextMarkerToBaseValue(value, indexer); +@@ -94,6 +95,7 @@ + // AXTextMarkerRange + if (IsAXTextMarkerRange(value)) + return AXTextMarkerRangeToBaseValue(value, indexer); ++#endif + + // Accessible object + if (IsNSAccessibilityElement(value) || IsAXUIElement(value)) { diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index 55391abb060cd..d4aaf27702eea 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,12 +7,12 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1f9b6e47e 100644 +index 8ff62f92ed6efdbfc18db53db3c5bb59c1acfe34..ca62a13420aa9c114c00054bbe1215f96285a4e9 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -119,6 +119,11 @@ - #include "services/network/web_transport.h" +@@ -126,6 +126,11 @@ #include "third_party/abseil-cpp/absl/types/optional.h" + #include "url/gurl.h" +// Electron +#include "net/cert/caching_cert_verifier.h" @@ -102,7 +102,7 @@ index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1 constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::PendingCertVerify::PendingCertVerify() = default; -@@ -659,6 +737,13 @@ void NetworkContext::SetClient( +@@ -671,6 +749,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -116,10 +116,10 @@ index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2135,6 +2220,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2226,6 +2311,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); - #endif // BUILDFLAG(IS_CHROMEOS_ASH) + #endif // BUILDFLAG(IS_CHROMEOS) + auto remote_cert_verifier = std::make_unique(std::move(cert_verifier)); + remote_cert_verifier_ = remote_cert_verifier.get(); + cert_verifier = std::make_unique(std::move(remote_cert_verifier)); @@ -127,10 +127,10 @@ index f8e93f5926b60e496cf649a56c161158f6eb8044..13c730e6d8c977e014c28d7eeb2513d1 builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index 6784d76ced7754c44054b243a75a6265314b4d56..55cff37a1ad0ae89bde3ffda11c3d1e9d194e22d 100644 +index 6de81678e62d6921d0df5944ab01705402caa568..e412608e7720004462c48698c8ec39602b2b900e 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -103,6 +103,7 @@ class DomainReliabilityMonitor; +@@ -105,6 +105,7 @@ class URLMatcher; namespace network { class CertVerifierWithTrustAnchors; @@ -138,7 +138,7 @@ index 6784d76ced7754c44054b243a75a6265314b4d56..55cff37a1ad0ae89bde3ffda11c3d1e9 class CookieManager; class ExpectCTReporter; class HostResolver; -@@ -217,6 +218,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -220,6 +221,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -147,7 +147,7 @@ index 6784d76ced7754c44054b243a75a6265314b4d56..55cff37a1ad0ae89bde3ffda11c3d1e9 void ResetURLLoaderFactories() override; void GetCookieManager( mojo::PendingReceiver receiver) override; -@@ -758,6 +761,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -793,6 +796,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr; #endif @@ -157,10 +157,10 @@ index 6784d76ced7754c44054b243a75a6265314b4d56..55cff37a1ad0ae89bde3ffda11c3d1e9 // CertNetFetcher is not used by the current platform, or if the actual // net::CertVerifier is instantiated outside of the network service. diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 8cdb76c6eac2bf3412b55ab1dd0fad0ccb1f954d..647b1e2fc81fb4ee177827d6909c816631009ec3 100644 +index 9cd06ee552f8e592dd9efd1e73b10e5998559c04..fa56cfed3703664232843ad26028096d95dca253 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -272,6 +272,17 @@ struct NetworkContextFilePaths { +@@ -277,6 +277,17 @@ struct NetworkContextFilePaths { bool trigger_migration = false; }; @@ -178,7 +178,7 @@ index 8cdb76c6eac2bf3412b55ab1dd0fad0ccb1f954d..647b1e2fc81fb4ee177827d6909c8166 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -787,6 +798,9 @@ interface NetworkContext { +@@ -807,6 +818,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 78dad69115f51..fbb057eaf0f80 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -7,7 +7,7 @@ Pass RenderFrameHost through to PlatformNotificationService so Electron can identify which renderer a notification came from. diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc -index e2aec3c3faf1dc35788c577b10f2944097a3b020..0c2ce17a3ce7ff70f47485b85fa8c70e8a1230b2 100644 +index 06a1db7fd9324de7d1fcf49c5b8a40b922a945be..c63b92a5a100785bf00b5e6da4c7f71bb9e769b7 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc @@ -196,6 +196,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( @@ -131,10 +131,10 @@ index 951075749b24814606f494c5a89ee2adf527f512..7036323ff8ee38ae92790dfd2e216df6 const GURL& document_url, mojo::PendingReceiver receiver); diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index ac1cbdad1eaa7ce7359a611a349b318ea7617f6c..dde9fb6174be8a0da70cf29d5428ef31035a39f7 100644 +index a1a3683b8da459a5859a2953536f3400a7fda213..602525302cfdd89bf2ddc2924076e7349de7562a 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2130,7 +2130,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2125,7 +2125,7 @@ void RenderProcessHostImpl::CreateNotificationService( document_url = rfh->GetLastCommittedURL(); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/pepper_plugin_support.patch b/patches/chromium/pepper_plugin_support.patch index b6097fe2e8f84..b9d73ff072c6d 100644 --- a/patches/chromium/pepper_plugin_support.patch +++ b/patches/chromium/pepper_plugin_support.patch @@ -156,13 +156,13 @@ index 40fafdbed313800a3f420d9d5a3daf8bbbdb7d95..1367725e04455ba5f299b8341a28f222 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_ISOLATED_FILE_SYSTEM_MESSAGE_FILTER_H_ diff --git a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc -index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a611926acb2 100644 +index 4b84f4ef068a76fa2be244a7f7ca2c6a8734bd46..13ae0a57535dfb516eb70b272fdaa5a4720d0591 100644 --- a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc +++ b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc -@@ -7,8 +7,13 @@ +@@ -6,8 +6,13 @@ + #include "base/check_op.h" #include "chrome/renderer/pepper/pepper_flash_font_file_host.h" - #include "chrome/renderer/pepper/pepper_flash_fullscreen_host.h" +#if 0 #include "chrome/renderer/pepper/pepper_uma_host.h" +#endif @@ -173,23 +173,7 @@ index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a61 #include "content/public/renderer/renderer_ppapi_host.h" #include "pdf/buildflags.h" #include "ppapi/host/ppapi_host.h" -@@ -37,6 +42,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( - if (!host_->IsValidInstance(instance)) - return nullptr; - -+#if 0 - if (host_->GetPpapiHost()->permissions().HasPermission( - ppapi::PERMISSION_FLASH)) { - switch (message.type()) { -@@ -46,6 +52,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( - } - } - } -+#endif - - // TODO(raymes): PDF also needs access to the FlashFontFileHost currently. - // We should either rename PPB_FlashFont_File to PPB_FontFile_Private or get -@@ -68,7 +75,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( +@@ -55,7 +60,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( } } @@ -198,7 +182,7 @@ index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a61 if (host_->GetPpapiHost()->permissions().HasPermission( ppapi::PERMISSION_PDF)) { switch (message.type()) { -@@ -79,6 +86,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( +@@ -66,6 +71,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( } #endif @@ -206,7 +190,7 @@ index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a61 // Permissions for the following interfaces will be checked at the // time of the corresponding instance's method calls. Currently these // interfaces are available only for whitelisted apps which may not have -@@ -88,6 +96,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( +@@ -75,6 +81,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost( return std::make_unique(host_, instance, resource); } } diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index 20da4288aef00..22bc937a11a4c 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -9,7 +9,7 @@ don't get errors for Chrome's generated resources, which are non-existent because we don't generate them in our build. diff --git a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc -index 3afa0d34a6aff1d8882592fc4a3720698124a9c4..18de9f4e9c3c9599d1ab83a638bbd887b9f7cc59 100644 +index 063cbf00a7ae871d426cef5cec00aa379c3ace11..444d3cc2e1b00a62f382232d3d2eccdd481abf11 100644 --- a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc +++ b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc @@ -5,7 +5,7 @@ @@ -22,7 +22,7 @@ index 3afa0d34a6aff1d8882592fc4a3720698124a9c4..18de9f4e9c3c9599d1ab83a638bbd887 #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" diff --git a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc -index 701d21200fe38870d08c2da93a1b8d139af79b5b..c5fc046b16e927efb017e40d980d98fa830b5bd4 100644 +index 648e199cb015155ba84cf1c846cf6d2a16858007..294bfb625d1155e640eeeb37bea597dc2d980e58 100644 --- a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc +++ b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc @@ -5,7 +5,7 @@ @@ -32,10 +32,10 @@ index 701d21200fe38870d08c2da93a1b8d139af79b5b..c5fc046b16e927efb017e40d980d98fa -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "third_party/skia/include/core/SkColor.h" + #include "ui/base/cursor/cursor.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc -index b40d96b754118c1dd1f1fb62f441a5a870d16ed9..7e205e324f5a8604ae6624c42b5b216e3070c072 100644 +index 0c1fa8676d00240e60ddd037664a409d1c9619dd..64d21f1878c3433324fc61353a10ee21d59c0b47 100644 --- a/chrome/browser/ui/views/overlay/close_image_button.cc +++ b/chrome/browser/ui/views/overlay/close_image_button.cc @@ -6,7 +6,7 @@ @@ -47,8 +47,117 @@ index b40d96b754118c1dd1f1fb62f441a5a870d16ed9..7e205e324f5a8604ae6624c42b5b216e #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" +diff --git a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc +index d12f196f2e7b1a4b3936af2cb16d872e91785fe4..4a015d21cf27b975c87d91d2149555d42815d9f4 100644 +--- a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc ++++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc +@@ -20,6 +20,7 @@ + #include "base/timer/timer.h" + #include "build/build_config.h" + #include "chrome/app/vector_icons/vector_icons.h" ++#if 0 + #include "chrome/browser/command_updater_delegate.h" + #include "chrome/browser/command_updater_impl.h" + #include "chrome/browser/profiles/profile.h" +@@ -28,14 +29,15 @@ + #include "chrome/browser/ui/browser_finder.h" + #include "chrome/browser/ui/toolbar/chrome_location_bar_model_delegate.h" + #include "chrome/browser/ui/views/location_bar/location_bar_view.h" ++#endif + #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" + #include "chrome/browser/ui/views/overlay/close_image_button.h" + #include "chrome/browser/ui/views/overlay/resize_handle_button.h" +-#include "chrome/grit/generated_resources.h" + #include "components/omnibox/browser/location_bar_model_impl.h" + #include "components/vector_icons/vector_icons.h" + #include "content/public/browser/document_picture_in_picture_window_controller.h" + #include "content/public/browser/web_contents.h" ++#include "electron/grit/electron_resources.h" + #include "content/public/common/content_constants.h" + #include "media/base/media_switches.h" + #include "media/base/video_util.h" +@@ -57,7 +59,7 @@ + #include "ui/aura/window.h" + #endif + +-#if BUILDFLAG(IS_WIN) ++#if 0 + #include "chrome/browser/shell_integration_win.h" + #include "ui/aura/window.h" + #include "ui/aura/window_tree_host.h" +@@ -91,7 +93,7 @@ T* AddChildView(std::vector>* views, + } // namespace + + OverlayLocationBarViewProxy::~OverlayLocationBarViewProxy() = default; +- ++#if 0 + class OverlayLocationBarViewImpl : public OverlayLocationBarViewProxy, + public ChromeLocationBarModelDelegate, + public LocationBarView::Delegate, +@@ -149,7 +151,7 @@ class OverlayLocationBarViewImpl : public OverlayLocationBarViewProxy, + const std::unique_ptr location_bar_model_; + CommandUpdaterImpl command_updater_; + }; +- ++#endif + // static + std::unique_ptr DocumentOverlayWindowViews::Create( + content::DocumentPictureInPictureWindowController* controller, +@@ -185,7 +187,7 @@ std::unique_ptr DocumentOverlayWindowViews::Create( + overlay_window->Init(std::move(params)); + overlay_window->OnRootViewReady(); + +-#if BUILDFLAG(IS_WIN) ++#if 0 + std::wstring app_user_model_id; + Browser* browser = + chrome::FindBrowserWithWebContents(controller->GetWebContents()); +@@ -260,12 +262,6 @@ views::View* DocumentOverlayWindowViews::GetControlsContainerView() const { + return controls_container_view_; + } + +-const ui::ThemeProvider* DocumentOverlayWindowViews::GetThemeProvider() const { +- // FIXME: is there a way to use a dark theme just for this window? +- DCHECK(profile_for_theme_); +- return &ThemeService::GetThemeProviderForProfile(profile_for_theme_); +-} +- + void DocumentOverlayWindowViews::SetUpViews() { + // The window content consists of the fixed-height controls_container_view at + // the top which is a box layout, and the remainder of the view is filled with +@@ -281,6 +277,7 @@ void DocumentOverlayWindowViews::SetUpViews() { + // +-------------------------------------+ + + content::WebContents* pip_contents = controller_->GetChildWebContents(); ++#if 0 + auto* profile = + Profile::FromBrowserContext(pip_contents->GetBrowserContext()); + profile_for_theme_ = profile; +@@ -291,8 +288,8 @@ void DocumentOverlayWindowViews::SetUpViews() { + location_bar_view_proxy_ = std::make_unique( + profile, controller_->GetWebContents()); + } +- +- auto web_view = std::make_unique(profile); ++#endif ++ auto web_view = std::make_unique(); + DVLOG(2) << __func__ << ": content WebView=" << web_view.get(); + web_view->SetWebContents(pip_contents); + +diff --git a/chrome/browser/ui/views/overlay/document_overlay_window_views.h b/chrome/browser/ui/views/overlay/document_overlay_window_views.h +index 86d385842501d28b5eb42f841822294eb597e6ed..43c19dfa6ec6b48f8694636cc184dd616e5d6aca 100644 +--- a/chrome/browser/ui/views/overlay/document_overlay_window_views.h ++++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.h +@@ -55,7 +55,6 @@ class DocumentOverlayWindowViews : public OverlayWindowViews, + bool IsVisible() const override; + void OnNativeWidgetMove() override; + void OnNativeWidgetDestroyed() override; +- const ui::ThemeProvider* GetThemeProvider() const override; + + // OverlayWindowViews + bool ControlsHitTestContainsPoint(const gfx::Point& point) override; diff --git a/chrome/browser/ui/views/overlay/hang_up_button.cc b/chrome/browser/ui/views/overlay/hang_up_button.cc -index 7b711bdbaf4afddd6ccf300af7bab26487942243..987a60b81554b676661d8f1a53facbc9dc08f5d5 100644 +index 8e54570ea4c83483eedee4c781f0498ba07bc3dd..b1eb0b2f1a3dfb71e1f5d3917c67e66ac2b27d22 100644 --- a/chrome/browser/ui/views/overlay/hang_up_button.cc +++ b/chrome/browser/ui/views/overlay/hang_up_button.cc @@ -4,7 +4,7 @@ @@ -59,53 +168,39 @@ index 7b711bdbaf4afddd6ccf300af7bab26487942243..987a60b81554b676661d8f1a53facbc9 +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/gfx/paint_vector_icon.h" + #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc -index d63256af63e93c7aab4ce348b9d27953d5346c6c..0f708806aa0e4555c288da38e0f9ecd4c89b1c3e 100644 +index d96a4937e6ff6bbf4311673b4c91e9f0e957832a..a06cae5f50eb671fc05bd3d41ae4d218a649e991 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc -@@ -16,9 +16,11 @@ +@@ -14,13 +14,15 @@ + #include "base/time/time.h" #include "base/timer/timer.h" #include "build/build_config.h" - #include "chrome/app/vector_icons/vector_icons.h" +#if 0 #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" -+#endif - #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" - #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" - #include "chrome/browser/ui/views/overlay/close_image_button.h" -@@ -29,7 +31,8 @@ - #include "chrome/browser/ui/views/overlay/toggle_camera_button.h" - #include "chrome/browser/ui/views/overlay/toggle_microphone_button.h" - #include "chrome/browser/ui/views/overlay/track_image_button.h" -#include "chrome/grit/generated_resources.h" -+#include "electron/grit/electron_resources.h" -+#include "components/url_formatter/url_formatter.h" ++#endif #include "components/vector_icons/vector_icons.h" #include "content/public/browser/picture_in_picture_window_controller.h" #include "content/public/browser/web_contents.h" -@@ -58,7 +61,7 @@ ++#include "electron/grit/electron_resources.h" + #include "ui/base/hit_test.h" + #include "ui/display/display.h" + #include "ui/display/screen.h" +@@ -36,7 +38,7 @@ #include "ui/aura/window.h" #endif --#if defined(OS_WIN) +-#if BUILDFLAG(IS_WIN) +#if 0 #include "chrome/browser/shell_integration_win.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host.h" -@@ -251,7 +254,7 @@ std::unique_ptr OverlayWindowViews::Create( - overlay_window->Init(std::move(params)); - overlay_window->OnRootViewReady(); - --#if defined(OS_WIN) -+#if 0 - std::wstring app_user_model_id; - Browser* browser = - chrome::FindBrowserWithWebContents(controller->GetWebContents()); diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc -index ab1717bd630e8f143a2ba6dddfeb04bc95beb7fd..2cf5bcd690a9db84cb14c409f31a82da6a9c0348 100644 +index ad413df822af98f4f80a460c6e464cf5237d5ac4..821b75400a7a4921e59a414516739c6de5a66df7 100644 --- a/chrome/browser/ui/views/overlay/playback_image_button.cc +++ b/chrome/browser/ui/views/overlay/playback_image_button.cc @@ -6,7 +6,7 @@ @@ -118,7 +213,7 @@ index ab1717bd630e8f143a2ba6dddfeb04bc95beb7fd..2cf5bcd690a9db84cb14c409f31a82da #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/resize_handle_button.cc b/chrome/browser/ui/views/overlay/resize_handle_button.cc -index 375efc8f931b1bfd595265829e47c8187a8d8d39..080e652f2c3e88b9a082dbd8fef82c461311cd9c 100644 +index 90c9dbbfa741da8cf72594738c1686b14e277663..34063436a7e8e36f624c1b86765fe886434df54a 100644 --- a/chrome/browser/ui/views/overlay/resize_handle_button.cc +++ b/chrome/browser/ui/views/overlay/resize_handle_button.cc @@ -6,7 +6,7 @@ @@ -131,7 +226,7 @@ index 375efc8f931b1bfd595265829e47c8187a8d8d39..080e652f2c3e88b9a082dbd8fef82c46 #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc -index 8153a0b667383374d787ce105c177eda0cdf2171..e5f33a4c43f2571669dd2bef2260e548e20be9b4 100644 +index ae3b37b13498d63b0bc8d7d66e228f974e1c4b4a..9a4e7de29921209a5a7807efeecb02e05f38692d 100644 --- a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc +++ b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc @@ -5,7 +5,7 @@ @@ -144,7 +239,7 @@ index 8153a0b667383374d787ce105c177eda0cdf2171..e5f33a4c43f2571669dd2bef2260e548 #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" diff --git a/chrome/browser/ui/views/overlay/toggle_camera_button.cc b/chrome/browser/ui/views/overlay/toggle_camera_button.cc -index a3cff2dfa906aa469abd5f12f3f70f0acea0adfe..93ad732afe209a9f51756112a5aa4f7dcd6a8b2e 100644 +index c5254509559fd89a8831d69498e2f120416b08df..711490193ac7a9a122fe2b85661dd1a63d3a06ac 100644 --- a/chrome/browser/ui/views/overlay/toggle_camera_button.cc +++ b/chrome/browser/ui/views/overlay/toggle_camera_button.cc @@ -5,7 +5,7 @@ @@ -155,9 +250,9 @@ index a3cff2dfa906aa469abd5f12f3f70f0acea0adfe..93ad732afe209a9f51756112a5aa4f7d +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/gfx/paint_vector_icon.h" + #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc -index a681ba4ed2de3226b20c5e89361c4bec47dfb8ea..5cd85706018fe163d1e0a9e48e3b8a4be5dec7e9 100644 +index 98d653475bf2aaa57bd11961df3697882a9a40d7..3870cad08c531a2a8b3f6ba84088065a0d31f033 100644 --- a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc +++ b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc @@ -5,7 +5,7 @@ @@ -168,9 +263,9 @@ index a681ba4ed2de3226b20c5e89361c4bec47dfb8ea..5cd85706018fe163d1e0a9e48e3b8a4b +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/gfx/paint_vector_icon.h" + #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc -index 4fceb3f5d802e7f01df59d1b3e9c80cc48af714a..70075228f6104b5a16f551af56eafc6829124143 100644 +index d5690233eb85d9f2992ae90461c0d1fd83730d84..d32ee40d1dc7a0004d534540189179b240964888 100644 --- a/chrome/browser/ui/views/overlay/track_image_button.cc +++ b/chrome/browser/ui/views/overlay/track_image_button.cc @@ -6,7 +6,7 @@ @@ -182,3 +277,49 @@ index 4fceb3f5d802e7f01df59d1b3e9c80cc48af714a..70075228f6104b5a16f551af56eafc68 #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" +diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +index d25bffe434d866760d1efc4dd972b6ba4946acd0..2819bcefb83b6b4cb10114b7ad1df881ccade58d 100644 +--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc ++++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +@@ -15,9 +15,11 @@ + #include "base/timer/timer.h" + #include "build/build_config.h" + #include "chrome/app/vector_icons/vector_icons.h" ++#if 0 + #include "chrome/browser/profiles/profile.h" + #include "chrome/browser/ui/browser.h" + #include "chrome/browser/ui/browser_finder.h" ++#endif + #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h" + #include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h" + #include "chrome/browser/ui/views/overlay/close_image_button.h" +@@ -28,10 +30,10 @@ + #include "chrome/browser/ui/views/overlay/toggle_camera_button.h" + #include "chrome/browser/ui/views/overlay/toggle_microphone_button.h" + #include "chrome/browser/ui/views/overlay/track_image_button.h" +-#include "chrome/grit/generated_resources.h" + #include "components/vector_icons/vector_icons.h" + #include "content/public/browser/video_picture_in_picture_window_controller.h" + #include "content/public/browser/web_contents.h" ++#include "electron/grit/electron_resources.h" + #include "media/base/media_switches.h" + #include "media/base/video_util.h" + #include "third_party/skia/include/core/SkColor.h" +@@ -53,7 +55,7 @@ + #include "ui/aura/window.h" + #endif + +-#if BUILDFLAG(IS_WIN) ++#if 0 + #include "chrome/browser/shell_integration_win.h" + #include "ui/aura/window.h" + #include "ui/aura/window_tree_host.h" +@@ -127,7 +129,7 @@ std::unique_ptr VideoOverlayWindowViews::Create( + overlay_window->Init(std::move(params)); + overlay_window->OnRootViewReady(); + +-#if BUILDFLAG(IS_WIN) ++#if 0 + std::wstring app_user_model_id; + Browser* browser = + chrome::FindBrowserWithWebContents(controller->GetWebContents()); diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch new file mode 100644 index 0000000000000..686010806fc75 --- /dev/null +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -0,0 +1,97 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Mon, 14 Feb 2022 19:24:36 +0900 +Subject: Port autofill colors to the color pipeline. + +https://chromium-review.googlesource.com/c/chromium/src/+/1652925 removed colors as they are no longer +needed in chromium but our autofill implementation uses them. This patch can be removed if we refactor +our autofill implementation to work like Chromium's. + +diff --git a/ui/color/color_id.h b/ui/color/color_id.h +index 1b9518366ba6c44421a86565ea3eba80e14b6c43..203ac8902eda26262f4178985ee565874bf879b8 100644 +--- a/ui/color/color_id.h ++++ b/ui/color/color_id.h +@@ -121,6 +121,10 @@ + E_CPONLY(kColorPwaSecurityChipForegroundSecure) \ + E_CPONLY(kColorPwaToolbarBackground) \ + E_CPONLY(kColorPwaToolbarForeground) \ ++ E_CPONLY(kColorResultsTableNormalBackground) \ ++ E_CPONLY(kColorResultsTableHoveredBackground) \ ++ E_CPONLY(kColorResultsTableNormalText) \ ++ E_CPONLY(kColorResultsTableDimmedText) \ + E_CPONLY(kColorSeparator) \ + E_CPONLY(kColorShadowBase) \ + E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \ +@@ -173,6 +177,7 @@ + E_CPONLY(kColorTreeNodeForeground) \ + E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ + E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ ++ E_CPONLY(kColorUnfocusedBorder) \ + E_CPONLY(kColorWindowBackground) + + #if BUILDFLAG(IS_CHROMEOS) +diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc +index 1d8415814c6245e3f2dfd01de7a2de11f09cdc7a..6db48efe454820e242b862edbfaf4d40cf16eb9d 100644 +--- a/ui/color/ui_color_mixer.cc ++++ b/ui/color/ui_color_mixer.cc +@@ -141,6 +141,17 @@ void AddUiColorMixer(ColorProvider* provider, + kColorPwaSecurityChipForeground}; + mixer[kColorPwaToolbarBackground] = {kColorEndpointBackground}; + mixer[kColorPwaToolbarForeground] = {kColorEndpointForeground}; ++ mixer[kColorResultsTableNormalBackground] = {SK_ColorWHITE}; ++ mixer[kColorResultsTableHoveredBackground] = ++ SetAlpha(kColorResultsTableNormalText, 0x0D); ++ mixer[kColorResultsTableNormalText] = {SK_ColorBLACK}; ++ mixer[kColorResultsTableDimmedText] = {SkColorSetRGB(0x64, 0x64, 0x64)}; ++ if (dark_mode) { ++ mixer[kColorResultsTableNormalBackground] = {SkColorSetRGB(0x28, 0x28, 0x28)}; ++ mixer[kColorResultsTableNormalText] = {SK_ColorWHITE}; ++ mixer[kColorResultsTableDimmedText] = ++ SetAlpha(kColorResultsTableNormalText, 0x80); ++ } + mixer[kColorSeparator] = {kColorMidground}; + mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800}; + mixer[kColorShadowValueAmbientShadowElevationThree] = +@@ -216,6 +227,7 @@ void AddUiColorMixer(ColorProvider* provider, + mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground}; + mixer[kColorTreeNodeForegroundSelectedUnfocused] = { + kColorTreeNodeForegroundSelectedFocused}; ++ mixer[kColorUnfocusedBorder] = {kColorMidground}; + mixer[kColorWindowBackground] = {kColorPrimaryBackground}; + } + +diff --git a/ui/color/win/native_color_mixers_win.cc b/ui/color/win/native_color_mixers_win.cc +index 5faab22f665829e04cc07125f2486b9cb35f1f56..9776dbcc576c62ee44cbdd0d59542856363fb8f4 100644 +--- a/ui/color/win/native_color_mixers_win.cc ++++ b/ui/color/win/native_color_mixers_win.cc +@@ -136,16 +136,22 @@ void AddNativeUiColorMixer(ColorProvider* provider, + SetAlpha(kColorNotificationInputForeground, gfx::kGoogleGreyAlpha700); + mixer[kColorSliderTrack] = AlphaBlend( + kColorNativeHighlight, kColorNativeWindow, gfx::kGoogleGreyAlpha400); ++ mixer[kColorResultsTableHoveredBackground] = AlphaBlend( ++ kColorNativeHighlight, kColorNativeWindow, gfx::kGoogleGreyAlpha400); ++ mixer[kColorResultsTableDimmedText] = AlphaBlend( ++ kColorNativeWindowText, kColorNativeWindow, gfx::kGoogleGreyAlpha600); + + // Window Background + mixer[kColorBubbleFooterBackground] = {kColorNativeWindow}; + mixer[kColorTooltipBackground] = {kColorNativeWindow}; + mixer[kColorButtonBackgroundProminentDisabled] = {kColorNativeWindow}; ++ mixer[kColorResultsTableNormalBackground] = {kColorNativeWindow}; + + // Window Text + mixer[kColorTableGroupingIndicator] = {kColorNativeWindowText}; + mixer[kColorThrobber] = {kColorNativeWindowText}; + mixer[kColorTooltipForeground] = {kColorNativeWindowText}; ++ mixer[kColorResultsTableNormalText] = {kColorNativeWindowText}; + + // Hyperlinks + mixer[kColorLinkForeground] = {kColorNativeHotlight}; +@@ -179,6 +185,7 @@ void AddNativeUiColorMixer(ColorProvider* provider, + mixer[kColorTextfieldForeground] = {kColorNativeBtnText}; + mixer[kColorTextfieldForegroundPlaceholder] = {kColorNativeBtnText}; + mixer[kColorTextfieldForegroundDisabled] = {kColorNativeBtnText}; ++ mixer[kColorUnfocusedBorder] = {kColorNativeBtnText}; + + // Highlight/Selected Background + mixer[kColorButtonBorder] = {kColorNativeHighlight}; diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index cc7c628d48689..86e14be4b6659 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -11,10 +11,10 @@ majority of changes originally come from these PRs: This patch also fixes callback for manual user cancellation and success. diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc -index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7d1aae142 100644 +index 8d40bbf98d4d58704f118cb42039b0956a9f6639..06196c0fa02012a5faa82471bd39fac087918f54 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc -@@ -88,6 +88,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { +@@ -89,6 +89,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) { return base::FeatureList::IsEnabled(features::kPrintWithReducedRasterization); } @@ -22,15 +22,15 @@ index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7 PrefService* GetPrefsForWebContents(content::WebContents* web_contents) { // TODO(thestig): Figure out why crbug.com/1083911 occurred, which is likely // because `web_contents` was null. As a result, this section has many more -@@ -96,6 +97,7 @@ PrefService* GetPrefsForWebContents(content::WebContents* web_contents) { +@@ -97,6 +98,7 @@ PrefService* GetPrefsForWebContents(content::WebContents* web_contents) { web_contents ? web_contents->GetBrowserContext() : nullptr; return context ? Profile::FromBrowserContext(context)->GetPrefs() : nullptr; } +#endif - #endif // defined(OS_WIN) + #endif // BUILDFLAG(IS_WIN) -@@ -355,8 +357,10 @@ void PrintJob::StartPdfToEmfConversion( +@@ -356,8 +358,10 @@ void PrintJob::StartPdfToEmfConversion( const PrintSettings& settings = document()->settings(); @@ -42,7 +42,7 @@ index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7 using RenderMode = PdfRenderSettings::Mode; RenderMode mode = print_with_reduced_rasterization -@@ -446,8 +450,10 @@ void PrintJob::StartPdfToPostScriptConversion( +@@ -447,8 +451,10 @@ void PrintJob::StartPdfToPostScriptConversion( if (ps_level2) { mode = PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2; } else { @@ -55,10 +55,10 @@ index 0de0532d64897c91ce0f72d165976e12e1dec03e..735da67a83b10c56d747e2a2b512f7b7 : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3; } diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h -index e19f62354edb8acad722c6680296b7d2f55f51fe..51c41b4dbab81ffe5840d59ef45b661cf5c5534b 100644 +index 650c78f16c812170aeda99d75300ff88f47347a0..c33ce445a23f97a744db3a4ac30ef471c359553b 100644 --- a/chrome/browser/printing/print_job.h +++ b/chrome/browser/printing/print_job.h -@@ -257,6 +257,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { +@@ -261,6 +261,9 @@ class JobEventDetails : public base::RefCountedThreadSafe { public: // Event type. enum Type { @@ -69,7 +69,7 @@ index e19f62354edb8acad722c6680296b7d2f55f51fe..51c41b4dbab81ffe5840d59ef45b661c NEW_DOC, diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..4283a5743c695a7376722f80925722d9e7a6496e 100644 +index 7dbb9aea759e4a80a4ef3133eeffcd952bbe6d50..62fbaa0e24dff2037f47ef4ccf09993aa79b3ef8 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -20,13 +20,13 @@ @@ -87,13 +87,13 @@ index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..4283a5743c695a7376722f80925722d9 #include "printing/backend/print_backend.h" #include "printing/buildflags/buildflags.h" #include "printing/mojom/print.mojom.h" -@@ -245,16 +245,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, - #endif // defined(OS_LINUX) && defined(USE_CUPS) +@@ -239,16 +239,21 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings, + #endif // BUILDFLAG(IS_LINUX) && defined(USE_CUPS) } - mojom::ResultCode result; { - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) // Blocking is needed here because Windows printer drivers are oftentimes // not thread-safe and have to be accessed on the UI thread. base::ScopedAllowBlocking allow_blocking; @@ -111,9 +111,22 @@ index d8f67ab5116483eb2eeb4cc09f19bbcbccb74b37..4283a5743c695a7376722f80925722d9 - GetSettingsDone(std::move(callback), result); } - #if defined(OS_CHROMEOS) + #if BUILDFLAG(IS_CHROMEOS) +diff --git a/chrome/browser/printing/print_job_worker_oop.cc b/chrome/browser/printing/print_job_worker_oop.cc +index 457749cf31578666304c30a5df1b8428629caafe..21c4a76411ee06775fb5bbb2d5a2ac17911d1c2a 100644 +--- a/chrome/browser/printing/print_job_worker_oop.cc ++++ b/chrome/browser/printing/print_job_worker_oop.cc +@@ -225,7 +225,7 @@ void PrintJobWorkerOop::OnFailure() { + } + + void PrintJobWorkerOop::ShowErrorDialog() { +- ShowPrintErrorDialog(); ++ // [electron]: removed. + } + + void PrintJobWorkerOop::UnregisterServiceManagerClient() { diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e0478e3b15c 100644 +index 9ed04fffa69c23834dec23836532dc3cc71299a6..2e332aab1d316569998f8d349af386bd0828b8a1 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -29,10 +29,10 @@ @@ -137,8 +150,8 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 #include "mojo/public/cpp/system/buffer.h" #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" -@@ -110,6 +111,8 @@ crosapi::mojom::PrintJobPtr PrintJobToMojom(int job_id, - #endif +@@ -81,6 +82,8 @@ using PrintSettingsCallback = + base::OnceCallback)>; void ShowWarningMessageBox(const std::u16string& message) { + LOG(ERROR) << "Invalid printer settings " << message; @@ -146,7 +159,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -118,6 +121,7 @@ void ShowWarningMessageBox(const std::u16string& message) { +@@ -89,6 +92,7 @@ void ShowWarningMessageBox(const std::u16string& message) { base::AutoReset auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, std::u16string(), message); @@ -154,7 +167,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -217,7 +221,9 @@ void UpdatePrintSettingsReplyOnIO( +@@ -188,7 +192,9 @@ void UpdatePrintSettingsReplyOnIO( DCHECK_CURRENTLY_ON(content::BrowserThread::IO); DCHECK(printer_query); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -165,7 +178,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 RenderParamsFromPrintSettings(printer_query->settings(), params->params.get()); params->params->document_cookie = printer_query->cookie(); -@@ -270,6 +276,7 @@ void ScriptedPrintReplyOnIO( +@@ -241,6 +247,7 @@ void ScriptedPrintReplyOnIO( mojom::PrintManagerHost::ScriptedPrintCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr(); @@ -173,7 +186,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (printer_query->last_status() == mojom::ResultCode::kSuccess && printer_query->settings().dpi()) { RenderParamsFromPrintSettings(printer_query->settings(), -@@ -279,8 +286,9 @@ void ScriptedPrintReplyOnIO( +@@ -250,8 +257,9 @@ void ScriptedPrintReplyOnIO( } bool has_valid_cookie = params->params->document_cookie; bool has_dpi = !params->params->dpi.IsEmpty(); @@ -184,7 +197,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (has_dpi && has_valid_cookie) { queue->QueuePrinterQuery(std::move(printer_query)); -@@ -319,12 +327,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -290,12 +298,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) : PrintManager(web_contents), queue_(g_browser_process->print_job_manager()->queue()) { DCHECK(queue_); @@ -199,7 +212,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -332,7 +342,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -303,7 +313,10 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -208,10 +221,10 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 + bool silent, + base::Value settings, + CompletionCallback callback) { - auto weak_this = weak_ptr_factory_.GetWeakPtr(); - DisconnectFromCurrentPrintJob(); - if (!weak_this) -@@ -347,7 +360,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { + // Remember the ID for `rfh`, to enable checking that the `RenderFrameHost` + // is still valid after a possible inner message loop runs in + // `DisconnectFromCurrentPrintJob()`. +@@ -326,7 +339,9 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) { // go in `ReleasePrintJob()`. SetPrintingRFH(rfh); @@ -222,7 +235,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 for (auto& observer : GetObservers()) observer.OnPrintNow(rfh); -@@ -491,7 +506,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( +@@ -470,7 +485,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply( void PrintViewManagerBase::ScriptedPrintReply( ScriptedPrintCallback callback, int process_id, @@ -232,7 +245,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (!content::RenderProcessHost::FromID(process_id)) { -@@ -499,16 +515,19 @@ void PrintViewManagerBase::ScriptedPrintReply( +@@ -478,16 +494,19 @@ void PrintViewManagerBase::ScriptedPrintReply( return; } @@ -256,7 +269,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 } void PrintViewManagerBase::NavigationStopped() { -@@ -622,12 +641,13 @@ void PrintViewManagerBase::DidPrintDocument( +@@ -601,12 +620,13 @@ void PrintViewManagerBase::DidPrintDocument( void PrintViewManagerBase::GetDefaultPrintSettings( GetDefaultPrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -271,7 +284,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame(); auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::GetDefaultPrintSettingsReply, -@@ -645,18 +665,20 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -624,18 +644,20 @@ void PrintViewManagerBase::UpdatePrintSettings( base::Value job_settings, UpdatePrintSettingsCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -293,7 +306,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 content::BrowserContext* context = web_contents() ? web_contents()->GetBrowserContext() : nullptr; PrefService* prefs = -@@ -666,6 +688,7 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -645,6 +667,7 @@ void PrintViewManagerBase::UpdatePrintSettings( if (value > 0) job_settings.SetIntKey(kSettingRasterizePdfDpi, value); } @@ -301,7 +314,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 auto callback_wrapper = base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply, -@@ -691,7 +714,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, +@@ -670,7 +693,7 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params, // didn't happen for some reason. bad_message::ReceivedBadMessage( render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME); @@ -310,7 +323,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 return; } int process_id = render_process_host->GetID(); -@@ -714,7 +737,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { +@@ -693,7 +716,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) { PrintManager::PrintingFailed(cookie); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -318,7 +331,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 #endif ReleasePrinterQuery(); -@@ -729,6 +751,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { +@@ -708,6 +730,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) { } void PrintViewManagerBase::ShowInvalidPrinterSettingsError() { @@ -330,7 +343,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&ShowWarningMessageBox, l10n_util::GetStringUTF16( -@@ -739,8 +766,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( +@@ -718,8 +745,10 @@ void PrintViewManagerBase::RenderFrameHostStateChanged( content::RenderFrameHost* render_frame_host, content::RenderFrameHost::LifecycleState /*old_state*/, content::RenderFrameHost::LifecycleState new_state) { @@ -341,7 +354,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 } void PrintViewManagerBase::DidStartLoading() { -@@ -808,6 +837,11 @@ void PrintViewManagerBase::OnJobDone() { +@@ -779,6 +808,11 @@ void PrintViewManagerBase::OnJobDone() { ReleasePrintJob(); } @@ -353,7 +366,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 void PrintViewManagerBase::OnFailed() { TerminatePrintJob(true); } -@@ -869,7 +903,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( +@@ -840,7 +874,10 @@ bool PrintViewManagerBase::CreateNewPrintJob( // Disconnect the current |print_job_|. auto weak_this = weak_ptr_factory_.GetWeakPtr(); @@ -365,7 +378,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (!weak_this) return false; -@@ -944,6 +981,13 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -915,6 +952,13 @@ void PrintViewManagerBase::ReleasePrintJob() { content::RenderFrameHost* rfh = printing_rfh_; printing_rfh_ = nullptr; @@ -379,7 +392,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (!print_job_) return; -@@ -989,7 +1033,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { +@@ -964,7 +1008,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() { } bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) { @@ -389,7 +402,7 @@ index c9f1502da55d89de0eede73a7d39047c090594d0..c857a48e00c3535c74691f4e36d44e04 if (!cookie) { diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..fb3af5e3f57f868fd00716f76f70aa63c4cb99c9 100644 +index 2661776307f773ac8f2c62529ec86349b045ee8f..4fa8f358ee59baed32ef4fd0684d010256206a54 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -37,6 +37,8 @@ namespace printing { @@ -412,7 +425,7 @@ index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..fb3af5e3f57f868fd00716f76f70aa63 + CompletionCallback callback); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) - // Prints the document in |print_data| with settings specified in + // Prints the document in `print_data` with settings specified in @@ -106,6 +111,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { ScriptedPrintCallback callback) override; void ShowInvalidPrinterSettingsError() override; @@ -421,7 +434,7 @@ index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..fb3af5e3f57f868fd00716f76f70aa63 // Adds and removes observers for `PrintViewManagerBase` events. The order in // which notifications are sent to observers is undefined. Observers must be -@@ -197,7 +203,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -193,7 +199,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // Runs `callback` with `params` to reply to ScriptedPrint(). void ScriptedPrintReply(ScriptedPrintCallback callback, int process_id, @@ -431,7 +444,7 @@ index 5771a3ebd76145c6cf8a2ccc33abc886802ed59f..fb3af5e3f57f868fd00716f76f70aa63 // Requests the RenderView to render all the missing pages for the print job. // No-op if no print job is pending. Returns true if at least one page has -@@ -252,9 +259,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { +@@ -248,9 +255,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { // The current RFH that is printing with a system printing dialog. raw_ptr printing_rfh_ = nullptr; @@ -470,10 +483,10 @@ index 51ebcb4ae399018d3fd8566656596a7ef1f148af..c0fbff95137e2e5bccb9702a8cc858df // Tells the browser that there are invalid printer settings. ShowInvalidPrinterSettingsError(); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19544cfe12 100644 +index 553b199325714b2ac91c996ef5d32abf76169573..93821dc9c6d79d2c13e6c8db12a75cd9c832bf5a 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -39,6 +39,7 @@ +@@ -40,6 +40,7 @@ #include "printing/metafile_skia.h" #include "printing/mojom/print.mojom.h" #include "printing/print_job_constants.h" @@ -481,7 +494,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 #include "printing/units.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" -@@ -1226,7 +1227,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1254,7 +1255,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { if (!weak_this) return; @@ -491,7 +504,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 if (!weak_this) return; -@@ -1257,7 +1259,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1285,7 +1287,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -500,7 +513,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; -@@ -1272,7 +1274,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { +@@ -1300,7 +1302,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() { // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -509,7 +522,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 if (!render_frame_gone_) frame->DispatchAfterPrintEvent(); -@@ -1303,7 +1305,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { +@@ -1331,7 +1333,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() { } Print(frame, print_preview_context_.source_node(), @@ -519,7 +532,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 if (!render_frame_gone_) print_preview_context_.DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1350,6 +1353,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { +@@ -1378,6 +1381,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -528,7 +541,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 print_preview_context_.OnPrintPreview(); if (print_preview_context_.IsForArc()) { -@@ -1886,7 +1891,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1915,7 +1920,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { return; Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -538,7 +551,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 // Check if |this| is still valid. if (!weak_this) return; -@@ -1901,7 +1907,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1930,7 +1936,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -549,7 +562,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1909,7 +1917,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1938,7 +1946,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, FrameReference frame_ref(frame); uint32_t expected_page_count = 0; @@ -558,7 +571,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1928,8 +1936,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1957,8 +1965,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -575,7 +588,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 // Check if |this| is still valid. if (!self) return; -@@ -2177,36 +2192,51 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2206,36 +2221,51 @@ void PrintRenderFrameHelper::IPCProcessed() { } } @@ -639,7 +652,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 notify_browser_of_print_failure_ = false; GetPrintManagerHost()->ShowInvalidPrinterSettingsError(); return false; -@@ -2350,7 +2380,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( +@@ -2380,7 +2410,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser( std::move(params), base::BindOnce( [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output, @@ -648,7 +661,7 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 *output = std::move(input); std::move(quit_closure).Run(); }, -@@ -2579,18 +2609,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) { +@@ -2625,18 +2655,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type, } bool PrintRenderFrameHelper::CheckForCancel() { @@ -669,10 +682,10 @@ index 650b5550f982fa5c5c522efaa9b8e305b7edc5e7..1b776a614d6e0f6c3ae13ef3c705bc19 bool PrintRenderFrameHelper::PreviewPageRendered( diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h -index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519076e91b9 100644 +index 2b703118bf94a82262adc293368dcfcdb67807ff..a07f307ff48f3ce5409354a5ba8d54b43325da73 100644 --- a/components/printing/renderer/print_render_frame_helper.h +++ b/components/printing/renderer/print_render_frame_helper.h -@@ -256,7 +256,7 @@ class PrintRenderFrameHelper +@@ -254,7 +254,7 @@ class PrintRenderFrameHelper mojo::PendingAssociatedReceiver receiver); // printing::mojom::PrintRenderFrame: @@ -681,7 +694,7 @@ index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintForSystemDialog() override; void SetPrintPreviewUI( -@@ -323,7 +323,9 @@ class PrintRenderFrameHelper +@@ -321,7 +321,9 @@ class PrintRenderFrameHelper // WARNING: |this| may be gone after this method returns. void Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -692,7 +705,7 @@ index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519 // Notification when printing is done - signal tear-down/free resources. void DidFinishPrinting(PrintingResult result); -@@ -332,12 +334,14 @@ class PrintRenderFrameHelper +@@ -330,12 +332,14 @@ class PrintRenderFrameHelper // Initialize print page settings with default settings. // Used only for native printing workflow. @@ -710,7 +723,7 @@ index 90236920457c931c86426049c6cbc30b592b597f..353178863eba37b9112e784ffa4b3519 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Set options for print preset from source PDF document. diff --git a/printing/printing_context.cc b/printing/printing_context.cc -index f8f0f4bdfbb8db883f883f62f9d6e4b987d7b113..c2505f5e0049dc7ee8783056538ca4c2d0968744 100644 +index 3d8281c8af9a4339bdd492c67edafc4ec6efb09d..6f8b9d42e051579cf1d0774afa771a7e45d31ff2 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc @@ -120,7 +120,6 @@ mojom::ResultCode PrintingContext::UsePdfSettings() { @@ -722,12 +735,12 @@ index f8f0f4bdfbb8db883f883f62f9d6e4b987d7b113..c2505f5e0049dc7ee8783056538ca4c2 std::unique_ptr settings = PrintSettingsFromJobSettings(job_settings); diff --git a/printing/printing_context.h b/printing/printing_context.h -index 7d937e7e3f19df351d410185fc4dc3b7c8937f2e..e87170e6957733f06bcc296bcca3fc331557ed46 100644 +index 3f36303105b7979a1a771bf26b42596abe5b3cce..52f740bb832db4a8d76431d9bc77cab10bb7e0c7 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h -@@ -175,6 +175,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -170,6 +170,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { - std::unique_ptr TakeAndResetSettings(); + bool PrintingAborted() const { return abort_printing_; } + // Reinitializes the settings for object reuse. + void ResetSettings(); @@ -735,7 +748,7 @@ index 7d937e7e3f19df351d410185fc4dc3b7c8937f2e..e87170e6957733f06bcc296bcca3fc33 int job_id() const { return job_id_; } protected: -@@ -185,9 +188,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -180,9 +183,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { static std::unique_ptr CreateImpl(Delegate* delegate, bool skip_system_calls); diff --git a/patches/chromium/process_singleton.patch b/patches/chromium/process_singleton.patch index f67f292c483f1..58d5bc201d4af 100644 --- a/patches/chromium/process_singleton.patch +++ b/patches/chromium/process_singleton.patch @@ -1,11 +1,10 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Raymond Zhao Date: Wed, 18 Aug 2021 08:24:10 -0700 -Subject: Convert Electron ProcessSingleton changes to patch +Subject: extend ProcessSingleton -This patch applies Electron ProcessSingleton changes -onto the Chromium files, so that Electron doesn't need to maintain -separate copies of those files. +This patch applies Electron ProcessSingleton changes onto the Chromium +files. This patch adds a few changes to the Chromium code: 1. It adds a parameter `program_name` to the Windows constructor, making @@ -25,7 +24,7 @@ This patch adds a few changes to the Chromium code: before the browser thread is ready. diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h -index fd88cc5122ad5e02a6694b2dec9fd0d16a300cc0..13b325ecad9ba48398173e89680287c63efd4fa6 100644 +index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..8f94cc300b58e8a94b6ca155aa3cf370bcb948d8 100644 --- a/chrome/browser/process_singleton.h +++ b/chrome/browser/process_singleton.h @@ -102,12 +102,19 @@ class ProcessSingleton { @@ -58,7 +57,7 @@ index fd88cc5122ad5e02a6694b2dec9fd0d16a300cc0..13b325ecad9ba48398173e89680287c6 // Sets ourself up as the singleton instance. Returns true on success. If // false is returned, we are not the singleton instance and the caller must @@ -173,6 +182,8 @@ class ProcessSingleton { - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) bool EscapeVirtualization(const base::FilePath& user_data_dir); + std::string program_name_; // Used for mutexName. @@ -74,19 +73,19 @@ index fd88cc5122ad5e02a6694b2dec9fd0d16a300cc0..13b325ecad9ba48398173e89680287c6 + bool listen_on_ready_ = false; #endif - #if defined(OS_MAC) + #if BUILDFLAG(IS_MAC) diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc -index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5b87acdf2 100644 +index c9f26ea2d2ea16484d416fdce095ec1b8b885991..47e60bfd8239d4a2e292b835c49132bdbb751555 100644 --- a/chrome/browser/process_singleton_posix.cc +++ b/chrome/browser/process_singleton_posix.cc -@@ -65,6 +65,7 @@ - #include "base/files/file_descriptor_watcher_posix.h" - #include "base/files/file_path.h" - #include "base/files/file_util.h" -+#include "base/ignore_result.h" - #include "base/location.h" - #include "base/logging.h" - #include "base/memory/ref_counted.h" +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + #include + + #include @@ -82,6 +83,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/task/sequenced_task_runner_helpers.h" @@ -95,19 +94,19 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 #include "base/threading/platform_thread.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" -@@ -97,9 +99,11 @@ +@@ -98,9 +100,11 @@ #include "net/base/network_interfaces.h" #include "ui/base/l10n/l10n_util.h" +#if 0 - #if defined(OS_LINUX) || defined(OS_CHROMEOS) + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #include "chrome/browser/ui/process_singleton_dialog_linux.h" #endif +#endif #if defined(TOOLKIT_VIEWS) && \ - (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -348,6 +352,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { + (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) +@@ -349,6 +353,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) { bool DisplayProfileInUseError(const base::FilePath& lock_path, const std::string& hostname, int pid) { @@ -117,7 +116,7 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 std::u16string error = l10n_util::GetStringFUTF16( IDS_PROFILE_IN_USE_POSIX, base::NumberToString16(pid), base::ASCIIToUTF16(hostname)); -@@ -367,6 +374,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, +@@ -368,6 +375,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path, NOTREACHED(); return false; @@ -125,7 +124,7 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 } bool IsChromeProcess(pid_t pid) { -@@ -407,6 +415,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { +@@ -408,6 +416,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) { return (cookie == ReadLink(path)); } @@ -147,18 +146,18 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 bool ConnectSocket(ScopedSocket* socket, const base::FilePath& socket_path, const base::FilePath& cookie_path) { -@@ -788,6 +811,10 @@ ProcessSingleton::ProcessSingleton( +@@ -775,6 +798,10 @@ ProcessSingleton::ProcessSingleton( ProcessSingleton::~ProcessSingleton() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // Manually free resources with IO explicitly allowed. + base::ThreadRestrictions::ScopedAllowIO allow_io; + watcher_ = nullptr; -+ ignore_result(socket_dir_.Delete()); ++ std::ignore = socket_dir_.Delete(); } ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() { -@@ -956,6 +983,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -947,6 +974,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() { base::Seconds(kTimeoutInSeconds)); } @@ -179,7 +178,7 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate( const base::CommandLine& command_line, -@@ -1055,14 +1096,32 @@ bool ProcessSingleton::Create() { +@@ -1046,14 +1087,32 @@ bool ProcessSingleton::Create() { #endif } @@ -217,7 +216,7 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 // Check that the directory was created with the correct permissions. int dir_mode = 0; CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) && -@@ -1105,10 +1164,13 @@ bool ProcessSingleton::Create() { +@@ -1096,10 +1155,13 @@ bool ProcessSingleton::Create() { if (listen(sock, 5) < 0) NOTREACHED() << "listen failed: " << base::safe_strerror(errno); @@ -236,12 +235,12 @@ index 16a85061560ad7fbd45d516adac956179cf5283f..0d74cd93a21b937f65f3d417b4734ae5 return true; } diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc -index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f86c2fc0f 100644 +index 8eb7de0cd4007a5fd5431bcc7fb7be4962bd608e..0ea5eb3e3cf055d981ab73486115bac53287f2d7 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc -@@ -27,7 +27,9 @@ - #include "base/win/windows_version.h" +@@ -28,7 +28,9 @@ #include "base/win/wmi.h" + #include "chrome/browser/process_singleton_internal.h" #include "chrome/browser/shell_integration.h" +#if 0 #include "chrome/browser/ui/simple_message_box.h" @@ -249,11 +248,12 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f #include "chrome/browser/win/chrome_process_finder.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" -@@ -179,10 +181,15 @@ bool ProcessLaunchNotification( +@@ -163,11 +165,16 @@ bool ProcessLaunchNotification( } bool DisplayShouldKillMessageBox() { +#if 0 + TRACE_EVENT0("startup", "ProcessSingleton:DisplayShouldKillMessageBox"); return chrome::ShowQuestionMessageBoxSync( NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), l10n_util::GetStringUTF16(IDS_BROWSER_HUNGBROWSER_MESSAGE)) != @@ -264,8 +264,8 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f + return false; } - void SendRemoteProcessInteractionResultHistogram( -@@ -264,9 +271,13 @@ bool ProcessSingleton::EscapeVirtualization( + // Function was copied from Process::Terminate. +@@ -245,9 +252,13 @@ bool ProcessSingleton::EscapeVirtualization( } ProcessSingleton::ProcessSingleton( @@ -279,7 +279,7 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f is_virtualized_(false), lock_file_(INVALID_HANDLE_VALUE), user_data_dir_(user_data_dir), -@@ -371,11 +382,14 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { +@@ -361,13 +372,16 @@ ProcessSingleton::NotifyOtherProcessOrCreate() { return PROFILE_IN_USE; } @@ -290,12 +290,14 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f // isn't one, create a message window with its title set to the profile // directory path. bool ProcessSingleton::Create() { + TRACE_EVENT0("startup", "ProcessSingleton::Create"); + - static const wchar_t kMutexName[] = L"Local\\ChromeProcessSingletonStartup!"; + std::wstring mutexName = base::UTF8ToWide("Local\\" + program_name_ + "ProcessSingletonStartup"); remote_window_ = chrome::FindRunningChromeWindow(user_data_dir_); if (!remote_window_ && !EscapeVirtualization(user_data_dir_)) { -@@ -384,7 +398,7 @@ bool ProcessSingleton::Create() { +@@ -376,7 +390,7 @@ bool ProcessSingleton::Create() { // access. As documented, it's clearer to NOT request ownership on creation // since it isn't guaranteed we will get it. It is better to create it // without ownership and explicitly get the ownership afterward. @@ -304,7 +306,7 @@ index 1df74f5299b1b3bdd180034a6895796dc4b2ec60..679350dd08ca0211653ea669405e3f4f if (!only_me.IsValid()) { DPLOG(FATAL) << "CreateMutex failed"; return false; -@@ -423,6 +437,17 @@ bool ProcessSingleton::Create() { +@@ -415,6 +429,17 @@ bool ProcessSingleton::Create() { window_.CreateNamed(base::BindRepeating(&ProcessLaunchNotification, notification_callback_), user_data_dir_.value()); diff --git a/patches/chromium/proxy_config_monitor.patch b/patches/chromium/proxy_config_monitor.patch index 7e21dff1be572..155415a59b428 100644 --- a/patches/chromium/proxy_config_monitor.patch +++ b/patches/chromium/proxy_config_monitor.patch @@ -6,7 +6,7 @@ Subject: proxy_config_monitor.patch Allow monitoring proxy config changes for a pref service. diff --git a/chrome/browser/net/proxy_config_monitor.cc b/chrome/browser/net/proxy_config_monitor.cc -index 583ae4a36a5dae700a8e11767839e4d9a5c6e9b4..2510362a4df21fd57c56ec1f336589ccde86694c 100644 +index 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a8bb9daae 100644 --- a/chrome/browser/net/proxy_config_monitor.cc +++ b/chrome/browser/net/proxy_config_monitor.cc @@ -11,7 +11,9 @@ diff --git a/patches/chromium/put_back_deleted_colors_for_autofill.patch b/patches/chromium/put_back_deleted_colors_for_autofill.patch deleted file mode 100644 index 6ce6432d17aba..0000000000000 --- a/patches/chromium/put_back_deleted_colors_for_autofill.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: John Kleinschmidt -Date: Thu, 20 Jun 2019 16:49:25 -0400 -Subject: put_back_deleted_colors_for_autofill.patch - -https://chromium-review.googlesource.com/c/chromium/src/+/1652925 removed colors as they are no longer -needed in chromium but our autofill implementation uses them. This patch can be removed if we refactor -our autofill implementation to work like Chromium's. - -diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc -index a8d95abb69da8d42aed26d3b215cc05d79ba676b..74fc4d9bb7f183765b05e94b7133599ccf714042 100644 ---- a/ui/native_theme/common_theme.cc -+++ b/ui/native_theme/common_theme.cc -@@ -32,6 +32,7 @@ absl::optional GetHighContrastColor( - NativeTheme::ColorScheme color_scheme) { - switch (color_id) { - case NativeTheme::kColorId_MenuSeparatorColor: -+ case NativeTheme::kColorId_UnfocusedBorderColor: - return color_scheme == NativeTheme::ColorScheme::kDark ? SK_ColorWHITE - : SK_ColorBLACK; - case NativeTheme::kColorId_FocusedBorderColor: -@@ -53,6 +54,15 @@ absl::optional GetDarkSchemeColor(NativeTheme::ColorId color_id, - return gfx::kGoogleBlue400; - case NativeTheme::kColorId_MenuSeparatorColor: - return gfx::kGoogleGrey800; -+ -+ // Results Tables -+ case NativeTheme::kColorId_ResultsTableNormalBackground: -+ return SkColorSetRGB(0x28, 0x28, 0x28); -+ case NativeTheme::kColorId_ResultsTableNormalText: -+ return SK_ColorWHITE; -+ case NativeTheme::kColorId_ResultsTableDimmedText: -+ return SkColorSetA(base_theme->GetSystemColor(NativeTheme::kColorId_ResultsTableNormalText), 0x80); -+ - case NativeTheme::kColorId_ProminentButtonColor: - return gfx::kGoogleBlue300; - case NativeTheme::kColorId_WindowBackground: -@@ -67,6 +77,8 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id, - NativeTheme::ColorScheme color_scheme) { - switch (color_id) { - // Border -+ case NativeTheme::kColorId_UnfocusedBorderColor: -+ return gfx::kGoogleGrey300; - case NativeTheme::kColorId_FocusedBorderColor: - return gfx::kGoogleBlue500; - -@@ -136,6 +148,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id, - case NativeTheme::kColorId_WindowBackground: - return SK_ColorWHITE; - -+ // Results Tables -+ case NativeTheme::kColorId_ResultsTableNormalBackground: -+ return SK_ColorWHITE; -+ case NativeTheme::kColorId_ResultsTableHoveredBackground: -+ return SkColorSetA(base_theme->GetSystemColor( -+ NativeTheme::kColorId_ResultsTableNormalText), -+ 0x0D); -+ case NativeTheme::kColorId_ResultsTableNormalText: -+ return SK_ColorBLACK; -+ case NativeTheme::kColorId_ResultsTableDimmedText: -+ return SkColorSetRGB(0x64, 0x64, 0x64); -+ - case NativeTheme::kColorId_NumColors: - // Keeping the kColorId_NumColors case instead of using the default case - // allows ColorId additions to trigger compile error for an incomplete -diff --git a/ui/native_theme/native_theme_color_id.h b/ui/native_theme/native_theme_color_id.h -index a1b39a03776c287bc2b1f9a0a6ce11d0d9efde79..9132ff83b672b51c5f2f7ed95da877be7114c691 100644 ---- a/ui/native_theme/native_theme_color_id.h -+++ b/ui/native_theme/native_theme_color_id.h -@@ -10,6 +10,7 @@ - #define NATIVE_THEME_CROSS_PLATFORM_COLOR_IDS \ - OP(kColorId_DefaultIconColor), \ - OP(kColorId_FocusedBorderColor), \ -+ OP(kColorId_UnfocusedBorderColor), \ - OP(kColorId_FocusedMenuItemBackgroundColor), \ - OP(kColorId_MenuBackgroundColor), \ - OP(kColorId_MenuIconColor), \ -@@ -20,6 +21,11 @@ - OP(kColorId_OverlayScrollbarThumbStroke), \ - OP(kColorId_ProminentButtonColor), \ - OP(kColorId_TextOnProminentButtonColor), \ -+ /* Results Tables, such as the omnibox */ \ -+ OP(kColorId_ResultsTableNormalBackground), \ -+ OP(kColorId_ResultsTableHoveredBackground), \ -+ OP(kColorId_ResultsTableNormalText), \ -+ OP(kColorId_ResultsTableDimmedText), \ - OP(kColorId_ThrobberSpinningColor), \ - OP(kColorId_ThrobberWaitingColor), \ - OP(kColorId_WindowBackground) -diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index 99256ffaf918e9d12a7c21b89d66cd41a0d29ac2..07852493fd23b8c1f057dc7ad830b6884db50a88 100644 ---- a/ui/native_theme/native_theme_win.cc -+++ b/ui/native_theme/native_theme_win.cc -@@ -623,10 +623,23 @@ absl::optional NativeThemeWin::GetPlatformHighContrastColor( - case kColorId_ThrobberWaitingColor: - return system_colors_[SystemThemeColor::kGrayText]; - -+ // Results Tables -+ case kColorId_ResultsTableNormalBackground: -+ return system_colors_[SystemThemeColor::kWindow]; -+ case kColorId_ResultsTableHoveredBackground: -+ return color_utils::AlphaBlend(system_colors_[SystemThemeColor::kWindowText], -+ system_colors_[SystemThemeColor::kWindow], 0.25f); -+ case kColorId_ResultsTableNormalText: -+ return system_colors_[SystemThemeColor::kWindowText]; -+ case kColorId_ResultsTableDimmedText: -+ return color_utils::AlphaBlend(system_colors_[SystemThemeColor::kWindowText], -+ system_colors_[SystemThemeColor::kWindow], 0.5f); -+ - case kColorId_MenuBackgroundColor: - return system_colors_[SystemThemeColor::kButtonFace]; - - case kColorId_MenuSeparatorColor: -+ case kColorId_UnfocusedBorderColor: - case kColorId_FocusedBorderColor: - return system_colors_[SystemThemeColor::kButtonText]; - diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index 9555776dafd78..ec5cabb02673a 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -30,10 +30,10 @@ index 059ff2b47e7aa8b9707e71ae9a1793bfdd86d319..529637f8b6af6b8b45f9de61d27b5e9c // RenderWidgetHost on the primary main frame, and false otherwise. virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index b0820c4411952ee0adf3dd4cbc6abb26c0368373..cd2770dee3fac7f6b09c3fafbf87a5537de716fe 100644 +index 59437e69e25fe85cffc9b558dec2284123ac48be..d3af2aed32f6047cbb86bd2b4ce1df9fee80437c 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2075,6 +2075,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -2082,6 +2082,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) view_->UpdateCursor(WebCursor(cursor)); @@ -43,10 +43,10 @@ index b0820c4411952ee0adf3dd4cbc6abb26c0368373..cd2770dee3fac7f6b09c3fafbf87a553 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 131e74e1789632f59086b2bfb390654207f6d18f..3bc6a0207a5273e7a7b64ab59d4e3499482e4bd8 100644 +index c8e49eeaca8b31479aa908be9c349ccd625e9e51..5c63a024827359ccf697d0b7fc8fa2092eb107b7 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4415,6 +4415,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -4486,6 +4486,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -59,10 +59,10 @@ index 131e74e1789632f59086b2bfb390654207f6d18f..3bc6a0207a5273e7a7b64ab59d4e3499 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 1c40c728a99fbcadedab1a8cc67efde90c7b164c..b693a98ef9e4333b0d1825ee156860a5c2dafcf6 100644 +index 85b426a7552cf925157a76fcd1ed7de47cd27a54..7440f2025701ccde0ade36cda22467dd0614109b 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -963,6 +963,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, +@@ -965,6 +965,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, blink::mojom::FrameVisibility visibility) override; void SendScreenRects() override; TextInputManager* GetTextInputManager() override; @@ -71,7 +71,7 @@ index 1c40c728a99fbcadedab1a8cc67efde90c7b164c..b693a98ef9e4333b0d1825ee156860a5 RenderWidgetHostImpl* render_widget_host) override; bool IsShowingContextMenuOnPage() const override; diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h -index 5df646636e3d78f66a2f5a76fb53bf57a7be8535..5e7b3055b34cfa252f6236b84cb183f9d0f6471d 100644 +index b68d706fe204c3e8d65b2bf523950840c0398db2..8852a8da29bc9b7f9b832ad392741751f46e3fd7 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -13,6 +13,7 @@ @@ -82,7 +82,7 @@ index 5df646636e3d78f66a2f5a76fb53bf57a7be8535..5e7b3055b34cfa252f6236b84cb183f9 #include "content/public/browser/allow_service_worker_result.h" #include "content/public/browser/reload_type.h" #include "content/public/browser/render_frame_host.h" -@@ -511,6 +512,9 @@ class CONTENT_EXPORT WebContentsObserver { +@@ -527,6 +528,9 @@ class CONTENT_EXPORT WebContentsObserver { // Invoked when the primary main frame changes size. virtual void PrimaryMainFrameWasResized(bool width_changed) {} diff --git a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch index 3ed2afc5fd742..ddd75f00d4f9a 100644 --- a/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch +++ b/patches/chromium/refactor_restore_base_adaptcallbackforrepeating.patch @@ -12,7 +12,7 @@ should be removed as soon as those have been updated. Patching because every instance is a FTBFS that prevents testing any one instance's fix. diff --git a/base/callback_helpers.h b/base/callback_helpers.h -index da876907836f0dbbd02a90ad7e0556304a9532cf..c3401f4cdd276e0f1b094b29753f37b10e72222d 100644 +index 046130ff8cbc4945e94a4ee71ac6320b4f7c5369..c71c3e1720b3f4c7b7362d99957cd2479bf88a37 100644 --- a/base/callback_helpers.h +++ b/base/callback_helpers.h @@ -94,6 +94,22 @@ class OnceCallbackHolder final { diff --git a/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch b/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch index 74f18d7d81dfb..4bcaed9c6c175 100644 --- a/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch +++ b/patches/chromium/remove_usage_of_incognito_apis_in_the_spellchecker.patch @@ -9,10 +9,10 @@ change to move more of //chrome spellchecker logic into //components so that we can further separate our dependency from //chrome. diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc -index 1d426c35c539064e899b848d0ccc19306f1c4db8..2b7aa1add57dccbcbf8202cead5b7d2d5a174270 100644 +index 9d238b5de516a672d5b99f2f66316a205fc705a7..7c3b6a69acb16186add5d467dbc22360d90d46d4 100644 --- a/chrome/browser/spellchecker/spellcheck_factory.cc +++ b/chrome/browser/spellchecker/spellcheck_factory.cc -@@ -71,7 +71,10 @@ void SpellcheckServiceFactory::RegisterProfilePrefs( +@@ -72,7 +72,10 @@ void SpellcheckServiceFactory::RegisterProfilePrefs( content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse( content::BrowserContext* context) const { diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index bf2178a3183de..24054daa57a97 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch ... something to do with OSR? and maybe as well? terrifying. diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc -index 0399fd10fffc282a3e2752ddc33d53823dd7b3f4..c04b5e11bc5e0c7746372dadfa49e34232f82507 100644 +index 5fd8cb63f589dd204c2477f2375ec1d3716b55f0..85e52f7a99fe350da05270cf6fde0fe82a1bec40 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -649,6 +649,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( +@@ -660,6 +660,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor( return false; } @@ -24,7 +24,7 @@ index 0399fd10fffc282a3e2752ddc33d53823dd7b3f4..c04b5e11bc5e0c7746372dadfa49e342 const blink::WebMouseEvent& event, const ui::LatencyInfo& latency) { diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h -index e15b08a576e27687801e4ef547bbd299ae60444e..f35cbc8be8a9496eaafbf693680746fc96a13144 100644 +index abdd3cf7d93ab9a1f80351d38ddcee52664414da..98da92a6d31103dfa0a48e278c3a15ee0533791e 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -26,8 +26,10 @@ diff --git a/patches/chromium/render_widget_host_view_mac.patch b/patches/chromium/render_widget_host_view_mac.patch index bb15a437035e9..9500c595ccfb4 100644 --- a/patches/chromium/render_widget_host_view_mac.patch +++ b/patches/chromium/render_widget_host_view_mac.patch @@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`. Additionally, disables usage of some private APIs in MAS builds. diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a45cca2132 100644 +index 57b797c2e730a76d4910f8bcd5b35cc515a61012..61575390665f00b96d593a2e1066be3b28d8de6f 100644 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -@@ -153,6 +153,15 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -154,6 +154,15 @@ void ExtractUnderlines(NSAttributedString* string, } // namespace @@ -29,7 +29,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 // These are not documented, so use only after checking -respondsToSelector:. @interface NSApplication (UndocumentedSpeechMethods) - (void)speakString:(NSString*)string; -@@ -609,6 +618,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { +@@ -610,6 +619,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -39,7 +39,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 return [self acceptsMouseEventsWhenInactive]; } -@@ -685,6 +697,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { +@@ -686,6 +698,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent { // its parent view. BOOL hitSelf = NO; while (view) { @@ -50,7 +50,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 if (view == self) hitSelf = YES; if ([view isKindOfClass:[self class]] && ![view isEqual:self] && -@@ -1005,6 +1021,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { +@@ -1006,6 +1022,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSKeyDown && !(modifierFlags & NSCommandKeyMask); @@ -61,7 +61,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 // We only handle key down events and just simply forward other events. if (eventType != NSKeyDown) { _hostHelper->ForwardKeyboardEvent(event, latency_info); -@@ -1749,9 +1769,11 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -1752,9 +1772,11 @@ - (NSAccessibilityRole)accessibilityRole { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -73,7 +73,7 @@ index 4d8320110bdf8cf732ffa0110139ead3b2330d88..1cdbe6ef86c02f34ae7cfe5a941ab3a4 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1760,7 +1782,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1763,7 +1785,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index 2ba001509c8a3..6ed6e2f5790a2 100644 --- a/patches/chromium/resource_file_conflict.patch +++ b/patches/chromium/resource_file_conflict.patch @@ -52,10 +52,10 @@ Some alternatives to this patch: None of these options seems like a substantial maintainability win over this patch to me (@nornagon). diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index 4b2632d89f3f2961975f1437fe9f533a4799894b..33e8d4f5b27532d015d8cd4dbe7d2550916eb436 100644 +index 04546cad2b3e6355d667fe725b85836f128f0df7..7caaf66cad9d5b9f787cea0d49c32c26801571c2 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1543,7 +1543,7 @@ if (is_chrome_branded && !is_android) { +@@ -1591,7 +1591,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 4b2632d89f3f2961975f1437fe9f533a4799894b..33e8d4f5b27532d015d8cd4dbe7d2550 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1571,6 +1571,12 @@ if (!is_android) { +@@ -1619,6 +1619,12 @@ if (!is_android) { } } diff --git a/patches/chromium/revert_stop_using_nsrunloop_in_renderer_process.patch b/patches/chromium/revert_stop_using_nsrunloop_in_renderer_process.patch deleted file mode 100644 index 5007b7204d4f9..0000000000000 --- a/patches/chromium/revert_stop_using_nsrunloop_in_renderer_process.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Tue, 4 Jan 2022 11:10:27 +0100 -Subject: revert: stop using NSRunLoop in renderer process - -https://chromium-review.googlesource.com/c/chromium/src/+/3344749 - -This can be removed once we update to a DEPS has which -includes 4787f034924d0b05a2e4815a197a8ecf4a9c623c. - -diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc -index 261e6de9ad03cb017fd2c71e30aef14f51312b60..625c984fc5255fe7ab01f5e38767ada73c21ffec 100644 ---- a/content/renderer/renderer_main.cc -+++ b/content/renderer/renderer_main.cc -@@ -91,7 +91,12 @@ void HandleRendererErrorTestParameters(const base::CommandLine& command_line) { - } - - std::unique_ptr CreateMainThreadMessagePump() { --#if defined(OS_FUCHSIA) -+#if defined(OS_MAC) -+ // As long as scrollbars on Mac are painted with Cocoa, the message pump -+ // needs to be backed by a Foundation-level loop to process NSTimers. See -+ // http://crbug.com/306348#c24 for details. -+ return base::MessagePump::Create(base::MessagePumpType::NS_RUNLOOP); -+#elif defined(OS_FUCHSIA) - // Allow FIDL APIs on renderer main thread. - return base::MessagePump::Create(base::MessagePumpType::IO); - #else diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 7523a9870acbc..0a1e41b6d04e2 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch Patch to make scrollBounce option work. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index e59425121af678283a2866ff954d1ea6b389404a..4b118deb8f6ce2233bb43e00755cbc7465646d29 100644 +index 0b42cba8667225c25df2405d99efe119a26c3585..ee8b42500499dc6a1700bc38e5b75976bb408490 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1303,7 +1303,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1344,7 +1344,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/skip_atk_toolchain_check.patch b/patches/chromium/skip_atk_toolchain_check.patch index 7fd7a7315bad1..51d38cce62e36 100644 --- a/patches/chromium/skip_atk_toolchain_check.patch +++ b/patches/chromium/skip_atk_toolchain_check.patch @@ -21,7 +21,7 @@ See //ui/accessibility/BUILD.gn:297:20: which caused the file to be included. which we don't build diff --git a/build/config/linux/atk/BUILD.gn b/build/config/linux/atk/BUILD.gn -index 92baff2a9b6eea1bcfaa53a9e70b4857b68cea77..8fd6031dda6afa42e9ed0742ccc4e71a93df7583 100644 +index 647bef697ec8f6bf02d60e3984ae3ad01f480552..be79a50aad1213a299c606f2a00f6b5bbf8eab2a 100644 --- a/build/config/linux/atk/BUILD.gn +++ b/build/config/linux/atk/BUILD.gn @@ -11,7 +11,7 @@ import("//build/config/ui.gni") @@ -34,7 +34,7 @@ index 92baff2a9b6eea1bcfaa53a9e70b4857b68cea77..8fd6031dda6afa42e9ed0742ccc4e71a if (use_atk) { assert(use_glib, "use_atk=true requires that use_glib=true") diff --git a/build/config/linux/atspi2/BUILD.gn b/build/config/linux/atspi2/BUILD.gn -index 988a9956813617456ee1945de8e857d43543e411..e6e17e9e8f5ff99404b52c0a42d508f97c61e7fc 100644 +index d103d09a39a519e65daab6db40ef7896de49b0ee..bfdef652886382eb87d5a19d2f9ed90dc91c14d2 100644 --- a/build/config/linux/atspi2/BUILD.gn +++ b/build/config/linux/atspi2/BUILD.gn @@ -6,7 +6,6 @@ import("//build/config/linux/pkg_config.gni") diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 965db355cfc84..dd479d4ad0215 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index dde9fb6174be8a0da70cf29d5428ef31035a39f7..e044bc3739ad21c3d9704ddfa56116fae944e57a 100644 +index 602525302cfdd89bf2ddc2924076e7349de7562a..ac9570fa3d9cb3b0026f70465e5b21ac7778c3df 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1835,9 +1835,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1836,9 +1836,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get(), IsJitDisabled()); @@ -39,10 +39,10 @@ index dde9fb6174be8a0da70cf29d5428ef31035a39f7..e044bc3739ad21c3d9704ddfa56116fa std::make_unique(); +#endif #endif - auto snapshot_files = GetV8SnapshotFilesToPreload(*cmd_line); // Spawn the child process asynchronously to avoid blocking the UI thread. + // As long as there's no renderer prefix, we can use the zygote process diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc -index 9c0e928067d86121ee3732440c80e84dcbbe0dd9..b5c84dc74cf71bc226787c9609dd2c99915710fb 100644 +index e8d6ef94664bb37996871c0cc0db7c815783b786..0d56fa0aebee80883019a100900119972bf02edd 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.cc @@ -25,6 +25,9 @@ namespace content { @@ -66,7 +66,7 @@ index 9c0e928067d86121ee3732440c80e84dcbbe0dd9..b5c84dc74cf71bc226787c9609dd2c99 dynamic_code_can_be_disabled_ = true; return; diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h -index 29d99ad59af67a9ac1206c059c8236da93c582a1..b4d09173d836bc9f666d7e3733e8b515cef8eb87 100644 +index 463df70c55df932427c761a67dbc89d7657f9703..d6d8094e31129eb7ca1f0bf36523d48204281795 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h @@ -18,6 +18,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate @@ -82,7 +82,7 @@ index 29d99ad59af67a9ac1206c059c8236da93c582a1..b4d09173d836bc9f666d7e3733e8b515 #if BUILDFLAG(USE_ZYGOTE_HANDLE) @@ -29,6 +34,11 @@ class CONTENT_EXPORT RendererSandboxedProcessLauncherDelegate - #endif // defined(OS_MAC) + #endif // BUILDFLAG(IS_MAC) sandbox::mojom::Sandbox GetSandboxType() override; + @@ -92,4 +92,4 @@ index 29d99ad59af67a9ac1206c059c8236da93c582a1..b4d09173d836bc9f666d7e3733e8b515 +#endif }; - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) diff --git a/patches/chromium/ui_gtk_public_header.patch b/patches/chromium/ui_gtk_public_header.patch index 62922abc391ad..f54224072007c 100644 --- a/patches/chromium/ui_gtk_public_header.patch +++ b/patches/chromium/ui_gtk_public_header.patch @@ -6,10 +6,10 @@ Subject: ui_gtk_public_header.patch Allow electron to depend on //ui/gtk/gtk_util.h diff --git a/ui/gtk/BUILD.gn b/ui/gtk/BUILD.gn -index db29cdca6f02fb8ca9dd0f25e13ed902589adc25..6fa1496b4d529ccf7e4e543579462f990aae5ede 100644 +index 4093df78da0bbb1d8df743942f364cf728ad3414..2f31d99b207ffc3531b5334b5a01239cc1fefb35 100644 --- a/ui/gtk/BUILD.gn +++ b/ui/gtk/BUILD.gn -@@ -39,7 +39,7 @@ generate_stubs("gtk_stubs") { +@@ -69,7 +69,7 @@ generate_stubs("gtk_stubs") { } component("gtk") { @@ -18,9 +18,9 @@ index db29cdca6f02fb8ca9dd0f25e13ed902589adc25..6fa1496b4d529ccf7e4e543579462f99 sources = [ "gtk_color_mixers.cc", -@@ -53,7 +53,6 @@ component("gtk") { - "gtk_ui_factory.cc", - "gtk_ui_platform.h", +@@ -85,7 +85,6 @@ component("gtk") { + "gtk_ui_platform_stub.cc", + "gtk_ui_platform_stub.h", "gtk_util.cc", - "gtk_util.h", "input_method_context_impl_gtk.cc", diff --git a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch index 99dfa2d8a8c8a..b3d8608dc3a5c 100644 --- a/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch +++ b/patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch @@ -6,18 +6,18 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch Unsandboxed ppapi processes should skip zygote. diff --git a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc -index 833c20796bd9404e4f5d7ca738fce97143d33fac..f4bc4f94e7eb5014f7c2844d6486fbc1bc88892f 100644 +index a0d6f0353bb387e6eca9f2b13ab1d40996234110..8548abdfae14d630794abc1033f9b9eda59f771b 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.cc -@@ -6,6 +6,7 @@ - +@@ -7,6 +7,7 @@ + #include "build/build_config.h" #include "content/public/common/content_switches.h" #include "sandbox/policy/mojom/sandbox.mojom.h" +#include "sandbox/policy/switches.h" - #if defined(OS_WIN) + #if BUILDFLAG(IS_WIN) #include "base/win/windows_version.h" -@@ -62,6 +63,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( +@@ -63,6 +64,9 @@ bool PpapiPluginSandboxedProcessLauncherDelegate::PreSpawnTarget( ZygoteHandle PpapiPluginSandboxedProcessLauncherDelegate::GetZygote() { const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); diff --git a/patches/chromium/v8_context_snapshot_generator.patch b/patches/chromium/v8_context_snapshot_generator.patch index e878445e6d584..6e7f5ad9c9de6 100644 --- a/patches/chromium/v8_context_snapshot_generator.patch +++ b/patches/chromium/v8_context_snapshot_generator.patch @@ -7,10 +7,10 @@ v8_context_snapshot_generator is a build time executable. The patch adds the config. diff --git a/tools/v8_context_snapshot/BUILD.gn b/tools/v8_context_snapshot/BUILD.gn -index d868696dbf28bfcb2a1dceda20057c5043819b91..985943ba31b31b3604072493a666979e111a3213 100644 +index a06eae4ab3217210f997126f7dcc318785cdb759..9484ccd615817459f17daf76ff9f82e88cfacbdd 100644 --- a/tools/v8_context_snapshot/BUILD.gn +++ b/tools/v8_context_snapshot/BUILD.gn -@@ -120,6 +120,7 @@ if (use_v8_context_snapshot) { +@@ -114,6 +114,7 @@ if (use_v8_context_snapshot) { configs += [ "//v8:external_startup_data", ":disable_icf", diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 6a8ee000ba377..849e94be20ccd 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -9,12 +9,12 @@ is needed for OSR. Originally landed in https://github.com/electron/libchromiumcontent/pull/226. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 676c77b2ac7be7445d92db3fcfc94b5ec4915696..303a0e00f8c797be63c92c6ae122d3b06d561f34 100644 +index 3da88b5831717c979373c064b4c1520c28d4fd98..cf3ea07bb7d708f9078c46af2c4583215f9cd189 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2971,6 +2971,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { - params.renderer_initiated_creation, - params.main_frame_name, GetOriginalOpener()); +@@ -3040,6 +3040,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, + site_instance.get(), params.renderer_initiated_creation, + params.main_frame_name, GetOriginalOpener(), primary_main_frame_policy); + if (params.view && params.delegate_view) { + view_.reset(params.view); @@ -26,7 +26,7 @@ index 676c77b2ac7be7445d92db3fcfc94b5ec4915696..303a0e00f8c797be63c92c6ae122d3b0 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2981,6 +2988,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -3050,6 +3057,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_.reset(CreateWebContentsView(this, delegate, &render_view_host_delegate_view_)); } @@ -35,7 +35,7 @@ index 676c77b2ac7be7445d92db3fcfc94b5ec4915696..303a0e00f8c797be63c92c6ae122d3b0 CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index ccbad7b5ea7c26e58d9a8d2208f534ae686364ec..d59f80df234872e0e7a89c9283e820a49c30b0e4 100644 +index ad5c13965f1ccc078de5f25b08d51ed43e37f259..cd1b44d4ff5ce8924749ba9e41b3f599108bb8fd 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -93,10 +93,13 @@ class BrowserContext; diff --git a/patches/chromium/webview_cross_drag.patch b/patches/chromium/webview_cross_drag.patch index 770598601bbce..67d32c0a23bbd 100644 --- a/patches/chromium/webview_cross_drag.patch +++ b/patches/chromium/webview_cross_drag.patch @@ -8,10 +8,10 @@ This allows dragging and dropping between s. Originally landed in https://github.com/electron/libchromiumcontent/pull/267 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc -index e8a5b04582da86f6ec0004c32f3b622c7599510e..1f9cd4e4c1d7be6d51b490c4b909e86b0bd2c057 100644 +index eff6616ef019ea8b661b878cc5fccd1e4b9217aa..9aff1848395dc41311df575dd7cbf0771271ed03 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -880,10 +880,7 @@ bool WebContentsViewAura::IsValidDragTarget( +@@ -890,10 +890,7 @@ bool WebContentsViewAura::IsValidDragTarget( // TODO(https://crbug.com/1266953): There are some known gaps caused by // comparing `RenderViewHost` IDs, as `RenderViewHost` ID is not really a // strong signal for page identity. diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 0a2b571d8fa2e..af32042b3d84e 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -14,10 +14,10 @@ Note that we also need to manually update embedder's `api::WebContents::IsFullscreenForTabOrPending` value. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 165d6b8eb5cb0ce949c71c1707687960c49a4ebb..35a40c4b493ec4e57bff4d4701c18e55afc5841c 100644 +index 713e2883139bca4bb56dcc7e3efcf6d6dfc4a02b..be2721cc6dc0582a05c74ac3d50c123666d7d5a3 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -6004,6 +6004,15 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -6102,6 +6102,15 @@ void RenderFrameHostImpl::EnterFullscreen( notified_instances.insert(parent_site_instance); } diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 57bafdd8b09ee..099e2f15e3205 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected: https://chromium-review.googlesource.com/c/chromium/src/+/1954347 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index 4352aada84d7fe5abbc2f3320a3a643e838774dc..b6d5fe0a21e9343d82323a9f7c06f9b5891316cc 100644 +index 63ead7f8ab838693bade7163ddebd1787cc82344..8512a66eda07202b6c6faea049736fd8f16c93db 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -356,6 +356,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -361,6 +361,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -26,10 +26,10 @@ index 4352aada84d7fe5abbc2f3320a3a643e838774dc..b6d5fe0a21e9343d82323a9f7c06f9b5 // An empty URL is returned if the URL is not overriden. virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index df9f357a597c7d5990058e7c3ab26b32cc4e7252..f72f927bfcd9fe42e49682b12b361ae8a877ace8 100644 +index a64d78c9d8112610af6a17c8f8b8b9124b9d40a3..0bd64497495cfd8eee5e7cae3eca69937f2e79e0 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -925,6 +925,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -932,6 +932,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index df9f357a597c7d5990058e7c3ab26b32cc4e7252..f72f927bfcd9fe42e49682b12b361ae8 const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index cba574c571ded199c70374ffe01bad5f88b5902f..7801b60329802c92e6b6103ccc74d6871584c9b2 100644 +index 10c96d3915e64ebebd283c70292b33e22612b8eb..9fa6853a2945e2a34ed319f874f356a4afd72dd3 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -207,6 +207,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -208,6 +208,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -55,10 +55,10 @@ index cba574c571ded199c70374ffe01bad5f88b5902f..7801b60329802c92e6b6103ccc74d687 const blink::WebSecurityOrigin& script_origin) override; blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel() diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index f545c18c2e142a46481b1669bb726b60d9815600..14bd8c3436602689e44e3c718388406a7de6b211 100644 +index d188491afffbd259d4287b0668a9d1cec291934a..2fe5234832f8a3510326171e1ccf5dbfeca49fc9 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -713,6 +713,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -720,6 +720,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index aa34b13457d37..8c14560076af0 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop initialized. diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index b6d5fe0a21e9343d82323a9f7c06f9b5891316cc..f141ba30ac0cfd1c35fb89dc513b92c5f41f6d74 100644 +index 8512a66eda07202b6c6faea049736fd8f16c93db..afe767350c8878da38ab2b566fa89bcb831f8716 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -356,6 +356,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -361,6 +361,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -35,10 +35,10 @@ index b6d5fe0a21e9343d82323a9f7c06f9b5891316cc..f141ba30ac0cfd1c35fb89dc513b92c5 // from the worker thread. virtual void WillDestroyWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index f72f927bfcd9fe42e49682b12b361ae8a877ace8..73e4853cb335722b2aaf7d98a8ed4b2ff4ece0ab 100644 +index 0bd64497495cfd8eee5e7cae3eca69937f2e79e0..9ab68aabff203127dba5a0ccdf16fa62f3ef4c40 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -937,6 +937,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -944,6 +944,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index f72f927bfcd9fe42e49682b12b361ae8a877ace8..73e4853cb335722b2aaf7d98a8ed4b2f const blink::WebSecurityOrigin& script_origin) { return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 7801b60329802c92e6b6103ccc74d6871584c9b2..df5c449ac011104cbce52b737729c4f9af2b2f9e 100644 +index 9fa6853a2945e2a34ed319f874f356a4afd72dd3..87f9190d227e501a648dbbaa350bbb105601fbfb 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -207,6 +207,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -208,6 +208,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -65,10 +65,10 @@ index 7801b60329802c92e6b6103ccc74d6871584c9b2..df5c449ac011104cbce52b737729c4f9 bool AllowScriptExtensionForServiceWorker( const blink::WebSecurityOrigin& script_origin) override; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index 14bd8c3436602689e44e3c718388406a7de6b211..46551fcbb671ae7f6f5528afa7ea62bb199a3dbf 100644 +index 2fe5234832f8a3510326171e1ccf5dbfeca49fc9..b36a118861b2efae6ae28ef0e7f14db5d284b929 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -713,6 +713,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -720,6 +720,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -78,13 +78,13 @@ index 14bd8c3436602689e44e3c718388406a7de6b211..46551fcbb671ae7f6f5528afa7ea62bb virtual bool AllowScriptExtensionForServiceWorker( const WebSecurityOrigin& script_origin) { diff --git a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc -index 1efbaf0adb1fd6c0ef332f015d8b09d130e4bd3f..033438ccc8db0ef396922ac23b7f3bd80fcc5cde 100644 +index 03288c7b1897ee2c18b80677ee5837246d36568a..fc10bbf3d92c7f88c734d8ecfb20dbc4b72ae200 100644 --- a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc +++ b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc @@ -257,6 +257,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { V8PerContextData* per_context_data = script_state_->PerContextData(); - ignore_result(per_context_data->ConstructorForType( - global_scope_->GetWrapperTypeInfo())); + std::ignore = + per_context_data->ConstructorForType(global_scope_->GetWrapperTypeInfo()); + Platform::Current()->WorkerScriptReadyForEvaluation(script_state_->GetContext()); // Inform V8 that origin trial information is now connected with the context, // and V8 can extend the context with origin trial features. diff --git a/patches/config.json b/patches/config.json index 1ba34fa0955cd..1f10e013b33b3 100644 --- a/patches/config.json +++ b/patches/config.json @@ -11,6 +11,10 @@ "src/electron/patches/node": "src/third_party/electron_node", + "src/electron/patches/nan": "src/third_party/nan", + + "src/electron/patches/perfetto": "src/third_party/perfetto", + "src/electron/patches/squirrel.mac": "src/third_party/squirrel.mac", "src/electron/patches/Mantle": "src/third_party/squirrel.mac/vendor/Mantle", diff --git a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch index 56bd33b8d6d47..98510d24c4e2c 100644 --- a/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch +++ b/patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch @@ -36,10 +36,10 @@ index 89255a0927a647ca32d1a9508853425a3207b441..f0e1e32f80d79e400ad139818edce60a import '../../ui/legacy/components/source_frame/source_frame-meta.js'; import '../../panels/console_counters/console_counters-meta.js'; diff --git a/front_end/ui/legacy/BUILD.gn b/front_end/ui/legacy/BUILD.gn -index fe7c150cf6ce24b10821fa5a91d55f82cf865222..7177d495ec9e2b31a641c7a531b63584c597cf97 100644 +index 8cefe7e1b0cd298ce52ea06186b43f3412115a4f..c03f52d42aef6e094a922d342276439f8628ff42 100644 --- a/front_end/ui/legacy/BUILD.gn +++ b/front_end/ui/legacy/BUILD.gn -@@ -182,5 +182,6 @@ devtools_entrypoint("legacy") { +@@ -181,5 +181,6 @@ devtools_entrypoint("legacy") { visibility = [ "../..:legacy_entrypoints", "../../legacy_test_runner/*", diff --git a/patches/nan/.patches b/patches/nan/.patches new file mode 100644 index 0000000000000..5a0539df8d7b2 --- /dev/null +++ b/patches/nan/.patches @@ -0,0 +1 @@ +use_new_constructor_for_scriptorigin.patch diff --git a/patches/nan/use_new_constructor_for_scriptorigin.patch b/patches/nan/use_new_constructor_for_scriptorigin.patch new file mode 100644 index 0000000000000..dfa36b750afc2 --- /dev/null +++ b/patches/nan/use_new_constructor_for_scriptorigin.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Fri, 28 Jan 2022 13:46:07 -0800 +Subject: use new constructor for ScriptOrigin + +https://chromium-review.googlesource.com/c/v8/v8/+/3395880 + +diff --git a/test/cpp/nannew.cpp b/test/cpp/nannew.cpp +index 64c857996c4626f3a447bdb796d4d581a37d9299..95a12f9521b8c9bed0e5eed85b6e56917069ea09 100644 +--- a/test/cpp/nannew.cpp ++++ b/test/cpp/nannew.cpp +@@ -248,7 +248,7 @@ NAN_METHOD(testScript) { + + #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 8 || \ + (V8_MAJOR_VERSION == 8 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 9)) +- ScriptOrigin origin(New("foo").ToLocalChecked(), 5); ++ ScriptOrigin origin(v8::Isolate::GetCurrent(), New("foo").ToLocalChecked(), 5); + #else + ScriptOrigin origin(New("foo").ToLocalChecked(), New(5)); + #endif +diff --git a/test/cpp/news.cpp b/test/cpp/news.cpp +index 5b54c0cedaaa824be71b8c6fee948139a34d3310..f0aa65cc80741d57ba6675f7d5d5908b24f601c5 100644 +--- a/test/cpp/news.cpp ++++ b/test/cpp/news.cpp +@@ -114,7 +114,7 @@ NAN_METHOD(NewScript) { + } + + NAN_METHOD(NewScript2) { +- v8::ScriptOrigin origin(New("x").ToLocalChecked()); ++ v8::ScriptOrigin origin(v8::Isolate::GetCurrent(), New("x").ToLocalChecked()); + v8::Local script = + New( + New("2+4").ToLocalChecked() +@@ -131,7 +131,7 @@ NAN_METHOD(CompileScript) { + } + + NAN_METHOD(CompileScript2) { +- v8::ScriptOrigin origin(New("x").ToLocalChecked()); ++ v8::ScriptOrigin origin(v8::Isolate::GetCurrent(), New("x").ToLocalChecked()); + v8::Local script = + CompileScript(New("2+4").ToLocalChecked(), origin).ToLocalChecked(); + info.GetReturnValue().Set( diff --git a/patches/node/.patches b/patches/node/.patches index e58c33a4d4e15..3dd50b85a8588 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -30,3 +30,5 @@ fix_don_t_create_console_window_when_creating_process.patch darwin_remove_eprototype_error_workaround_3405.patch darwin_translate_eprototype_to_econnreset_3413.patch darwin_bump_minimum_supported_version_to_10_15_3406.patch +fix_serdes_test.patch +fix_failing_node_js_test_on_outdated.patch diff --git a/patches/node/fix_failing_node_js_test_on_outdated.patch b/patches/node/fix_failing_node_js_test_on_outdated.patch new file mode 100644 index 0000000000000..d1018e0b112a6 --- /dev/null +++ b/patches/node/fix_failing_node_js_test_on_outdated.patch @@ -0,0 +1,35 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shelley Vohr +Date: Wed, 16 Feb 2022 13:33:41 +0100 +Subject: fix: failing Node.js test on outdated + CurrentValueSerializerFormatVersion + +Corrects for a test that started failing as of https://chromium-review.googlesource.com/c/v8/v8/+/3417189 +becuase V8 updated the return value of CurrentValueSerializerFormatVersion() +from 14 to 15, and Node.js still expected 14 (0x0e). + +This patch can be removed as soon as Node.js updates to a version of V8 +containing the above CL. + +diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js +index 586698129680cef29595c39e77c7d1c186f3d60a..43a3d9dd5907af6aa11b902b01f6ef7539768fbb 100644 +--- a/test/parallel/test-v8-serdes.js ++++ b/test/parallel/test-v8-serdes.js +@@ -155,7 +155,7 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); + } + + { +- const buf = Buffer.from('ff0e6f2203666f6f5e007b01', 'hex'); ++ const buf = Buffer.from('ff0f6f2203666f6f5e007b01', 'hex'); + + const des = new v8.DefaultDeserializer(buf); + des.readHeader(); +@@ -166,7 +166,7 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); + ser.writeValue(des.readValue()); + + assert.deepStrictEqual(buf, ser.releaseBuffer()); +- assert.strictEqual(des.getWireFormatVersion(), 0x0e); ++ assert.strictEqual(des.getWireFormatVersion(), 0x0f); + } + + { diff --git a/patches/node/fix_serdes_test.patch b/patches/node/fix_serdes_test.patch new file mode 100644 index 0000000000000..ec2452c0ae5ee --- /dev/null +++ b/patches/node/fix_serdes_test.patch @@ -0,0 +1,36 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Fri, 28 Jan 2022 13:50:21 -0800 +Subject: fix serdes test + +The V8 wire format version changed. + +diff --git a/test/parallel/test-v8-serdes.js b/test/parallel/test-v8-serdes.js +index 4dffedd3c32b4b1b6eb75e46f8bfb447260046bb..586698129680cef29595c39e77c7d1c186f3d60a 100644 +--- a/test/parallel/test-v8-serdes.js ++++ b/test/parallel/test-v8-serdes.js +@@ -155,7 +155,7 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); + } + + { +- const buf = Buffer.from('ff0d6f2203666f6f5e007b01', 'hex'); ++ const buf = Buffer.from('ff0e6f2203666f6f5e007b01', 'hex'); + + const des = new v8.DefaultDeserializer(buf); + des.readHeader(); +@@ -166,13 +166,13 @@ const hostObject = new (internalBinding('js_stream').JSStream)(); + ser.writeValue(des.readValue()); + + assert.deepStrictEqual(buf, ser.releaseBuffer()); +- assert.strictEqual(des.getWireFormatVersion(), 0x0d); ++ assert.strictEqual(des.getWireFormatVersion(), 0x0e); + } + + { + // Unaligned Uint16Array read, with padding in the underlying array buffer. + let buf = Buffer.alloc(32 + 9); +- buf.write('ff0d5c0404addeefbe', 32, 'hex'); ++ buf.write('ff0e5c0404addeefbe', 32, 'hex'); + buf = buf.slice(32); + + const expectedResult = os.endianness() === 'LE' ? diff --git a/patches/perfetto/.patches b/patches/perfetto/.patches new file mode 100644 index 0000000000000..f96cd9f9d7559 --- /dev/null +++ b/patches/perfetto/.patches @@ -0,0 +1 @@ +define_ssize_t_to_be_intptr_t_to_match_libuv.patch diff --git a/patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch b/patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch new file mode 100644 index 0000000000000..b48b0e2e37343 --- /dev/null +++ b/patches/perfetto/define_ssize_t_to_be_intptr_t_to_match_libuv.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jeremy Rose +Date: Fri, 28 Jan 2022 15:07:54 -0800 +Subject: define ssize_t to be intptr_t to match libuv + +This definition conflicts with libuv's: https://github.com/libuv/libuv/blob/bb0b4bb783da45ca995d8fb3d5dec0ed84133446/include/uv/win.h#L26-L31 + +Breaks the build on 32-bit windows. + +diff --git a/include/perfetto/ext/base/sys_types.h b/include/perfetto/ext/base/sys_types.h +index 999a1522f4397def080ad0056ff3f626e2f0cdbe..a3e24ae047a2185b66136184e95427e6e849194f 100644 +--- a/include/perfetto/ext/base/sys_types.h ++++ b/include/perfetto/ext/base/sys_types.h +@@ -32,11 +32,7 @@ using uid_t = unsigned int; + using pid_t = int; + #endif // !GCC + +-#if defined(_WIN64) +-using ssize_t = int64_t; +-#else +-using ssize_t = long; +-#endif // _WIN64 ++using ssize_t = intptr_t; + + #endif // OS_WIN + diff --git a/patches/v8/.patches b/patches/v8/.patches index 5d74c796bcf93..1e5615f3ce254 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -6,4 +6,4 @@ workaround_an_undefined_symbol_error.patch do_not_export_private_v8_symbols_on_windows.patch fix_build_deprecated_attirbute_for_older_msvc_versions.patch fix_disable_implies_dcheck_for_node_stream_array_buffers.patch -fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch +revert_fix_cppgc_removed_deleted_cstors_in_cppheapcreateparams.patch diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index b006ad66ddbb8..13649f1c4acc8 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,10 +9,10 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 5fef5805939ced748e03b34c1e365a00d6a5834d..623b4d792c04c5d7978fe7c16c92e21499294a5f 100644 +index fb68d0ec4d121aaac31fd6e4c317a59976ef034c..dbbe9ae10bebdd71f441fda00c7dbfa187603a84 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -575,7 +575,7 @@ config("internal_config") { +@@ -598,7 +598,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index 5fef5805939ced748e03b34c1e365a00d6a5834d..623b4d792c04c5d7978fe7c16c92e214 defines += [ "BUILDING_V8_SHARED" ] } -@@ -5660,7 +5660,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5733,7 +5733,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 5fef5805939ced748e03b34c1e365a00d6a5834d..623b4d792c04c5d7978fe7c16c92e214 deps = [ ":v8_libbase", -@@ -5698,6 +5698,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5771,6 +5771,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/dcheck.patch b/patches/v8/dcheck.patch index a708140339fbe..b4231609ce27d 100644 --- a/patches/v8/dcheck.patch +++ b/patches/v8/dcheck.patch @@ -6,10 +6,10 @@ Subject: dcheck.patch https://github.com/auchenberg/volkswagen diff --git a/src/api/api.cc b/src/api/api.cc -index 880e198be36cdfefb1acc37612c65022551c5d4c..f7e18fabb020827c5c194609db68555c10ac1cc8 100644 +index e6797c92a52ab7805261ace2156a39fe368bd747..1aed7cad8b7dfff9fc7b1f93040c3eda33693af3 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -9141,7 +9141,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -9097,7 +9097,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { } void Isolate::PerformMicrotaskCheckpoint() { @@ -19,10 +19,10 @@ index 880e198be36cdfefb1acc37612c65022551c5d4c..f7e18fabb020827c5c194609db68555c isolate->default_microtask_queue()->PerformCheckpoint(this); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index cf3f1dce5571353cb90bb5997c489b0f202951f9..f54f60489385a25c5bce4e3d38da19ee9df6ada4 100644 +index 8e4ad43c1957f4ed555327588c41d049824c1dc5..54cf3b263ac5654b370897b951aa0be8f8d566e5 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -6132,9 +6132,9 @@ void Heap::TearDown() { +@@ -6235,9 +6235,9 @@ void Heap::TearDown() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); diff --git a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch index 1ef0f366c945e..59cf1289c5fab 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index 46cff2d17ff0e189b84a180805c008818a20fd3a..de269d03d3376f1fe31809d9c2079860724b731a 100644 +index c784f859ba874b9a79be3dd9c69d306b8a590660..93158da71e2e7dd1aecc421664d4d21687cb38a6 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -575,6 +575,10 @@ config("internal_config") { +@@ -598,6 +598,10 @@ config("internal_config") { ":cppgc_header_features", ] diff --git a/patches/v8/export_symbols_needed_for_windows_build.patch b/patches/v8/export_symbols_needed_for_windows_build.patch index c26ad60031d16..4068e9b55533e 100644 --- a/patches/v8/export_symbols_needed_for_windows_build.patch +++ b/patches/v8/export_symbols_needed_for_windows_build.patch @@ -6,7 +6,7 @@ Subject: Export symbols needed for Windows build These symbols are required to build v8 with BUILD_V8_SHARED on Windows. diff --git a/src/objects/objects.h b/src/objects/objects.h -index 2baa10a2b35cd247cec53ee63feb5280bc05db6f..803789169eb3305b0827b221acfb7f425c120fa8 100644 +index 48f595a24ec7ead3076e1d44afb4f18b7bb810c3..df7cb44387a42fa173ce68ee8464d6abc050986f 100644 --- a/src/objects/objects.h +++ b/src/objects/objects.h @@ -886,7 +886,7 @@ enum AccessorComponent { ACCESSOR_GETTER, ACCESSOR_SETTER }; @@ -19,7 +19,7 @@ index 2baa10a2b35cd247cec53ee63feb5280bc05db6f..803789169eb3305b0827b221acfb7f42 explicit inline Relocatable(Isolate* isolate); inline virtual ~Relocatable(); diff --git a/src/objects/ordered-hash-table.h b/src/objects/ordered-hash-table.h -index 45682e45e906fe9556bef578d5386cdf4e73d71a..569c632f6933ca7aec3ac239258207dede3e2d5e 100644 +index ec304170542f8a6053c60cbebb22c536cb56ac6c..be8f33d5e8bc2ff388f199dacebd408ccd32dda5 100644 --- a/src/objects/ordered-hash-table.h +++ b/src/objects/ordered-hash-table.h @@ -64,7 +64,7 @@ namespace internal { diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 04d14f07aefcc..ae318986f9b8a 100644 --- a/patches/v8/expose_mksnapshot.patch +++ b/patches/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index 623b4d792c04c5d7978fe7c16c92e21499294a5f..46cff2d17ff0e189b84a180805c008818a20fd3a 100644 +index dbbe9ae10bebdd71f441fda00c7dbfa187603a84..c784f859ba874b9a79be3dd9c69d306b8a590660 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5672,7 +5672,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5745,7 +5745,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch b/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch index f33bcb58dccc2..ad3c1b6198b4c 100644 --- a/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch +++ b/patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch @@ -9,7 +9,7 @@ higher versions, but native module compiling with this version will have an issue. diff --git a/include/v8config.h b/include/v8config.h -index 1242d4289ceb937e2679408ca7ee734c0c342bf0..50f59293e3fc617ac7b6f964ae091e92391c8a38 100644 +index b16ab3ff88d1054d12af4de3ad0018c97c0b7fcc..c9963b43c121964c0c37c858adb228cd090d5c2a 100644 --- a/include/v8config.h +++ b/include/v8config.h @@ -452,10 +452,13 @@ path. Add it with -I to the command line diff --git a/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch b/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch index 781e0ed36f7ce..ce960703ace71 100644 --- a/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch +++ b/patches/v8/fix_disable_implies_dcheck_for_node_stream_array_buffers.patch @@ -18,7 +18,7 @@ This patch can be removed when streams support rab/gsab, or when support is synchronized across both v8 and node. diff --git a/src/objects/js-array-buffer.cc b/src/objects/js-array-buffer.cc -index 57d8773b7be9a04ab0b27ddac9aac1da2254c550..cf3c4ee7422728822e62f25d0092f3c0da07914b 100644 +index cd760b9e67820c6ab69164992bccf19411cf1db6..f28258bf1b797c2a2d904e25802a17b14ad0c19a 100644 --- a/src/objects/js-array-buffer.cc +++ b/src/objects/js-array-buffer.cc @@ -72,9 +72,9 @@ void JSArrayBuffer::Attach(std::shared_ptr backing_store) { @@ -32,5 +32,5 @@ index 57d8773b7be9a04ab0b27ddac9aac1da2254c550..cf3c4ee7422728822e62f25d0092f3c0 + // !backing_store->is_wasm_memory() && !backing_store->is_resizable(), + // backing_store->byte_length() == backing_store->max_byte_length()); DCHECK(!was_detached()); - DCHECK(IsValidBackingStorePointer(backing_store->buffer_start())); Isolate* isolate = GetIsolate(); + diff --git a/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch b/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch deleted file mode 100644 index 8f8790ddeec93..0000000000000 --- a/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: VerteDinde -Date: Tue, 4 Jan 2022 14:55:00 -0800 -Subject: fix: use allocationtype kold in v8 scriptormodule legacy lifetime - -Changed in this CL: https://chromium-review.googlesource.com/c/v8/v8/+/3211575 -Upstream proposed fix: https://chromium-review.googlesource.com/c/v8/v8/+/3354087 - -Enabling V8_SCRIPTORMODULE_LEGACY_LIFETIME is necessary to fix ESM in -Node.js, but Blink expects old allocations so we change this in the -interim while Node.js works to remove their usage of WeakRefs to -ScriptOrModule. - -This patch can be removed when the upsteam fix is merged, or -when support is added in Node.js - -diff --git a/src/heap/factory-base.cc b/src/heap/factory-base.cc -index ff1056ee57d1fade0e851c08010a81cde64d48b3..1fbf8ecbec0458106afea1b5ba4273ccfb5d80f4 100644 ---- a/src/heap/factory-base.cc -+++ b/src/heap/factory-base.cc -@@ -250,7 +250,7 @@ Handle