From dd03cceda0384f62540b0cea650e73b091eab34b Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:53:29 -0400 Subject: [PATCH] chore: bump chromium to 137.0.7128.1 (main) (#46482) * chore: bump chromium in DEPS to 137.0.7107.0 * chore: bump chromium in DEPS to 137.0.7109.0 * chore: bump chromium in DEPS to 137.0.7111.0 * chore: bump chromium in DEPS to 137.0.7113.0 * 6384240: Remove double-declaration for accessibility on macOS | https://chromium-review.googlesource.com/c/chromium/src/+/6384240 * 6422872: Remove unused includes in isolation_info_mojom_traits.h | https://chromium-review.googlesource.com/c/chromium/src/+/6422872 * chore: update patches * 6400733: Avoid ipc_message_macros.h usage in some foo_param_traits_macros.h files | https://chromium-review.googlesource.com/c/chromium/src/+/6400733 * chore: update patches * 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410 * chore: iwyu * refactor: prefer value initialization over memset() From the looks up upstream commits in base/, it looks like memset() could trigger `-Wunsafe-buffer-usage` warnings soon? Value initialization is more C++ish and less error-prone anyway, due to memset()'s easily swappable parameters. * refactor: NotifyIcon::InitIconData() returns a NOTIFYICONDATA This follows F.20 in the C++ Core Guidelines and also removes the need for memset() * 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410 remove all uses of: - strcmp() * fixup! 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410 * 6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | https://chromium-review.googlesource.com/c/chromium/src/+/6433203 * chore: bump chromium in DEPS to 137.0.7115.0 * 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077 * chore: update patches * 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077 * fix: add pragma for MacSDK unsafe buffers | 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410 * chore: bump chromium in DEPS to 137.0.7117.0 * chore: update patches * chore: update filesnames.libcxx.gni * 6431756: Replace SetOwnedByWidget() bool arg with a PassKey. | https://chromium-review.googlesource.com/c/chromium/src/+/6431756 * 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077 * 6428345: Remove ExtensionService usage from ChromeExtensionRegistrarDelegate | https://chromium-review.googlesource.com/c/chromium/src/+/6428345 * 6384315: Migrate extensions_enabled from ExtensionService to Registrar | https://chromium-review.googlesource.com/c/chromium/src/+/6384315 * 6428749: [extensions] Refactor ExtensionService for AddNewAndUpdateExtension. | https://chromium-review.googlesource.com/c/chromium/src/+/6428749 * chore: bump chromium in DEPS to 137.0.7119.0 * 6440290: corner-shape: support inset shadow | https://chromium-review.googlesource.com/c/chromium/src/+/6440290 * 6429230: FSA: Move blocked paths to the PermissionContext class | https://chromium-review.googlesource.com/c/chromium/src/+/6429230 * chore: update patches * chore: bump chromium in DEPS to 137.0.7121.0 * chore: update patches * fix: partially revert 6443473: Remove ItemDelete from the Mac version of AppleKeychain | https://chromium-review.googlesource.com/c/chromium/src/+/6443473 * fix: update filenames.libcxx.gni * chore: bump chromium in DEPS to 137.0.7123.0 * chore: update patches * chore: "grandfather in" electron views too Lock further access to View::set_owned_by_client() | https://chromium-review.googlesource.com/c/chromium/src/+/6448510 * chore: update feat_corner_smoothing_css_rule_and_blink_painting.patch corner-shape: support inset shadow | https://chromium-review.googlesource.com/c/chromium/src/+/6440290 * refactor: grandfather in AutofillPopupView as a subclass of WidgetDelegateView Add a PassKey for std::make_unique() | https://chromium-review.googlesource.com/c/chromium/src/+/6442265 * Provide dbus appmenu information on Wayland | https://chromium-review.googlesource.com/c/chromium/src/+/6405535 * [extensions] Move OnExtensionInstalled out of ExtensionService. | https://chromium-review.googlesource.com/c/chromium/src/+/6443325 * refactor: grandfather in NativeWindowViews for delete callbacks 6433203: Add a PassKey to RegisterDeleteDelegateCallback(). | https://chromium-review.googlesource.com/c/chromium/src/+/6433203 * chore: merge the four "grandfather" patches into one * [A11yPerformance] Remove IsAccessibilityAllowed() | 6404386: [A11yPerformance] Remove IsAccessibilityAllowed() | https://chromium-review.googlesource.com/c/chromium/src/+/6404386 NB: the changes here are copied from the upstream changes in chrome/browser/ui/webui/accessibility/accessibility_ui.cc * 6420753: [PermissionOptions] Use PermissionDescriptorPtr in PermissionController | https://chromium-review.googlesource.com/c/chromium/src/+/6420753 * 6429573: [accessibility] Move mode change out of AccessibilityNotificationWaiter | https://chromium-review.googlesource.com/c/chromium/src/+/6429573 * chore: e patches all * 6419936: [win] Change ScreenWin public static methods to virtual | https://chromium-review.googlesource.com/c/chromium/src/+/6419936 * 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410 remove all uses of: - fprintf() - fputs() - snprintf() - vsnprintf() * fix: size conversion FTBFS on Win * 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410 remove all uses of: - wcscpy_s() * 6423410: Enable unsafe buffer warnings for chromium, try #3. | https://chromium-review.googlesource.com/c/chromium/src/+/6423410 remove all uses of: - wcsncpy_s() * chore: update mas_avoid_private_macos_api_usage.patch.patch 6394283: Remove double-declaration for accessibility on iOS | https://chromium-review.googlesource.com/c/chromium/src/+/6394283 Lots of context shear in this commit but the only interesting part is: -+ return nullptr; ++ return {}; Which is needed because the return type is sometimes not a pointer. * chore: e patches all * chore: disable -Wmacro-redefined warning in electron_main_win.cc * chore: bump chromium in DEPS to 137.0.7123.5 * refactor: patch electron PermissionTypes into blink 6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077 * chore: e patches all * chore: remove the box_painter_base.cc part of feat_corner_smoothing_css_rule_and_blink_painting.patch as per code review @ https://github.com/electron/electron/pull/46482#pullrequestreview-2777338370 * test: enable window-smaller-than-64x64 test on Linux * chore: bump chromium in DEPS to 137.0.7124.1 * chore: bump chromium in DEPS to 137.0.7125.1 * chore: bump chromium in DEPS to 137.0.7127.3 * 6459201: [Extensions] Remove ExtensionSystem::FinishDelayedInstallationIfReady() | https://chromium-review.googlesource.com/c/chromium/src/+/6459201 * 6454796: [Extensions] Move (most) registrar delayed install logic to //extensions | https://chromium-review.googlesource.com/c/chromium/src/+/6454796 * chore: bump chromium in DEPS to 137.0.7128.1 * chore: e patches all * chore: node ./script/gen-libc++-filenames.js * [views] Gate DesktopWindowTreeHostWin::window_enlargement_ behind flag Refs https://chromium-review.googlesource.com/c/chromium/src/+/6428649 * feat: allow opt-out animated_content_sampler. Refs https://chromium-review.googlesource.com/c/chromium/src/+/6438681 * Trigger CI --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Keeley Hammond Co-authored-by: Charles Kerr Co-authored-by: Keeley Hammond Co-authored-by: deepak1556 Co-authored-by: John Kleinschmidt --- DEPS | 2 +- filenames.libcxx.gni | 448 +----------------- patches/boringssl/expose_ripemd160.patch | 4 +- ...ack_ssl_error_zero_return_explicitly.patch | 2 +- patches/chromium/.patches | 3 +- ...client_precreatemessageloop_callback.patch | 6 +- .../add_didinstallconditionalfeatures.patch | 16 +- ...adjust_accessibility_ui_for_electron.patch | 26 +- ..._scheduler_throttling_per_renderview.patch | 12 +- patches/chromium/blink_local_frame.patch | 8 +- .../build_add_electron_tracing_category.patch | 2 +- ..._mojom_interfaces_to_depend_on_blink.patch | 4 +- ...ld_allow_electron_to_use_exec_script.patch | 2 +- ..._depend_on_packed_resource_integrity.patch | 14 +- .../build_libc_as_static_library.patch | 6 +- patches/chromium/can_create_window.patch | 26 +- ...hore_add_electron_deps_to_gitignores.patch | 2 +- ...ther_in_electron_views_and_delegates.patch | 93 ++++ ...fy_chromium_handling_of_mouse_events.patch | 24 +- .../chromium/chore_partial_revert_of.patch | 4 +- ...screationoverridden_with_full_params.patch | 20 +- .../crash_allow_setting_more_options.patch | 6 +- ...e_browser_v8_snapshot_file_name_fuse.patch | 8 +- .../disable_compositor_recycling.patch | 4 +- patches/chromium/disable_hidden.patch | 8 +- patches/chromium/disable_unload_metrics.patch | 6 +- .../chromium/enable_reset_aspect_ratio.patch | 8 +- ...xpose_setuseragent_on_networkcontext.patch | 16 +- .../extend_apply_webpreferences.patch | 6 +- ...dd_set_theme_source_to_allow_apps_to.patch | 4 +- ..._registry_to_multibuffer_data_source.patch | 6 +- ...t_allow_code_cache_in_custom_schemes.patch | 8 +- ...e_launch_options_for_service_process.patch | 10 +- ...moothing_css_rule_and_blink_painting.patch | 61 +-- ...screen_rendering_with_viz_compositor.patch | 28 +- ...g_exit_code_on_service_process_crash.patch | 4 +- ...same_application_can_use_safestorage.patch | 31 ++ ..._raw_response_headers_from_urlloader.patch | 24 +- ...allback_for_sync_and_async_clipboard.patch | 47 +- ...ivate_background_material_on_windows.patch | 8 +- ..._exclusive_access_for_electron_needs.patch | 18 +- ...dless_mode_handling_in_native_widget.patch | 8 +- .../fix_aspect_ratio_with_max_size.patch | 4 +- ...ding_non-standard_schemes_in_iframes.patch | 6 +- ..._background_throttling_in_compositor.patch | 14 +- .../chromium/fix_export_zlib_symbols.patch | 2 +- ...x_harden_blink_scriptstate_maybefrom.patch | 4 +- ...ingshelper_behind_branding_buildflag.patch | 2 +- ...king_and_message_bubbling_on_windows.patch | 2 +- ...board_hides_on_input_blur_in_webview.patch | 4 +- ...sr_stutter_fix_backport_for_electron.patch | 290 ------------ ...x_remove_caption-removing_style_call.patch | 4 +- ...original_resize_performance_on_macos.patch | 4 +- ...from_localframe_requestexecutescript.patch | 22 +- ...t_menu_item_when_opened_via_keyboard.patch | 2 +- ...ated_generic_capturer_when_available.patch | 6 +- patches/chromium/frame_host_manager.patch | 8 +- .../chromium/gritsettings_resource_ids.patch | 4 +- ...sync_with_host_os_mac_on_linux_in_ci.patch | 2 +- ...tform_electron_can_call_x11_property.patch | 6 +- .../load_v8_snapshot_in_browser_process.patch | 4 +- .../chromium/make_gtk_getlibgtk_public.patch | 2 +- ..._avoid_private_macos_api_usage.patch.patch | 151 +++--- ...emote_certificate_verification_logic.patch | 28 +- .../chromium/notification_provenance.patch | 26 +- ...xture_remove_keyed_mutex_on_win_dxgi.patch | 10 +- ...eated_to_allow_for_browser_initiated.patch | 4 +- patches/chromium/picture-in-picture.patch | 2 +- ...utofill_colors_to_the_color_pipeline.patch | 6 +- patches/chromium/preconnect_manager.patch | 6 +- patches/chromium/printing.patch | 22 +- ...r_changes_to_the_webcontentsobserver.patch | 16 +- ..._expose_file_system_access_blocklist.patch | 425 ++++++++--------- ..._electron_permissiontypes_into_blink.patch | 226 +++++++++ ...efactor_unfilter_unresponsive_events.patch | 4 +- .../render_widget_host_view_base.patch | 12 +- patches/chromium/resource_file_conflict.patch | 6 +- ...ean_up_stale_macwebcontentsocclusion.patch | 10 +- ...revert_enable_crel_for_arm32_targets.patch | 4 +- patches/chromium/scroll_bounce_flag.patch | 4 +- ...ecks_in_mediastreamdevicescontroller.patch | 20 +- .../support_mixed_sandbox_with_zygote.patch | 4 +- .../upload_list_add_loadsync_method.patch | 2 +- patches/chromium/web_contents.patch | 12 +- patches/chromium/webview_fullscreen.patch | 10 +- .../worker_context_will_destroy.patch | 12 +- ...feat_add_hook_to_notify_script_ready.patch | 16 +- ...i_to_allow_electron_to_set_dock_side.patch | 4 +- patches/ffmpeg/link_with_loader_path.patch | 4 +- ...8_object_setinternalfieldfornodecore.patch | 4 +- ...pturer_initialization_and_management.patch | 2 +- shell/app/electron_main_mac.cc | 14 +- shell/app/electron_main_win.cc | 7 + shell/app/node_main.cc | 3 +- shell/browser/api/electron_api_app.cc | 6 +- shell/browser/api/electron_api_app.h | 1 + shell/browser/api/electron_api_screen.cc | 16 +- shell/browser/api/electron_api_view.cc | 2 +- .../api/views/electron_api_image_view.cc | 2 +- shell/browser/electron_browser_context.cc | 12 +- .../electron_browser_main_parts_posix.cc | 9 +- shell/browser/electron_permission_manager.cc | 41 +- shell/browser/electron_permission_manager.h | 13 +- ...ctron_web_contents_utility_handler_impl.cc | 7 +- .../runtime/electron_runtime_api_delegate.cc | 30 +- .../extensions/electron_extension_loader.cc | 16 +- .../extensions/electron_extension_loader.h | 12 +- .../extensions/electron_extension_system.cc | 6 - .../extensions/electron_extension_system.h | 2 - shell/browser/feature_list.cc | 10 + .../file_system_access_permission_context.cc | 11 +- shell/browser/hid/electron_hid_delegate.cc | 4 +- shell/browser/hid/hid_chooser_context.cc | 19 +- shell/browser/mac/dict_util.mm | 17 +- shell/browser/mac/electron_application.mm | 6 +- shell/browser/native_window.cc | 10 +- shell/browser/native_window_mac.mm | 17 +- shell/browser/native_window_views.cc | 50 +- shell/browser/native_window_views_win.cc | 4 +- .../net/system_network_context_manager.h | 1 + shell/browser/relauncher_linux.cc | 3 +- .../browser/serial/serial_chooser_context.cc | 17 +- shell/browser/ui/cocoa/electron_ns_window.mm | 11 +- shell/browser/ui/cocoa/root_view_mac.mm | 2 +- shell/browser/ui/file_dialog_win.cc | 32 +- .../ui/inspectable_web_contents_view.cc | 8 +- shell/browser/ui/message_box_gtk.cc | 23 +- shell/browser/ui/views/autofill_popup_view.cc | 4 +- shell/browser/ui/views/root_view.cc | 4 +- shell/browser/ui/views/win_frame_view.cc | 11 +- shell/browser/ui/webui/accessibility_ui.cc | 21 +- shell/browser/ui/win/notify_icon.cc | 71 +-- shell/browser/ui/win/notify_icon.h | 2 +- shell/browser/ui/win/taskbar_host.cc | 18 +- shell/browser/usb/electron_usb_delegate.cc | 4 +- shell/browser/usb/usb_chooser_context.cc | 14 +- .../browser/web_contents_permission_helper.cc | 22 +- .../browser/web_contents_permission_helper.h | 9 - shell/common/api/electron_api_url_loader.cc | 26 +- .../gin_converters/content_converter.cc | 33 +- shell/common/language_util_linux.cc | 4 +- shell/common/node_bindings.cc | 6 +- shell/common/node_bindings_mac.cc | 6 + shell/renderer/preload_utils.cc | 6 +- spec/api-browser-window-spec.ts | 2 +- 145 files changed, 1414 insertions(+), 1780 deletions(-) create mode 100644 patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch delete mode 100644 patches/chromium/fix_osr_stutter_fix_backport_for_electron.patch create mode 100644 patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch diff --git a/DEPS b/DEPS index bd8ba726c01c..ed23cd4c1022 100644 --- a/DEPS +++ b/DEPS @@ -2,7 +2,7 @@ gclient_gn_args_from = 'src' vars = { 'chromium_version': - '136.0.7095.0', + '137.0.7128.1', 'node_version': 'v22.14.0', 'nan_version': diff --git a/filenames.libcxx.gni b/filenames.libcxx.gni index 914055bfb682..56f9f72b06a1 100644 --- a/filenames.libcxx.gni +++ b/filenames.libcxx.gni @@ -65,6 +65,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__algorithm/next_permutation.h", "//third_party/libc++/src/include/__algorithm/none_of.h", "//third_party/libc++/src/include/__algorithm/nth_element.h", + "//third_party/libc++/src/include/__algorithm/out_value_result.h", "//third_party/libc++/src/include/__algorithm/partial_sort.h", "//third_party/libc++/src/include/__algorithm/partial_sort_copy.h", "//third_party/libc++/src/include/__algorithm/partition.h", @@ -341,7 +342,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__algorithm/all_of.h", "//third_party/libc++/src/include/__cxx03/__algorithm/any_of.h", "//third_party/libc++/src/include/__cxx03/__algorithm/binary_search.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/clamp.h", "//third_party/libc++/src/include/__cxx03/__algorithm/comp.h", "//third_party/libc++/src/include/__cxx03/__algorithm/comp_ref_type.h", "//third_party/libc++/src/include/__cxx03/__algorithm/copy.h", @@ -361,19 +361,11 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__algorithm/find_if.h", "//third_party/libc++/src/include/__cxx03/__algorithm/find_if_not.h", "//third_party/libc++/src/include/__cxx03/__algorithm/find_segment_if.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/fold.h", "//third_party/libc++/src/include/__cxx03/__algorithm/for_each.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/for_each_n.h", "//third_party/libc++/src/include/__cxx03/__algorithm/for_each_segment.h", "//third_party/libc++/src/include/__cxx03/__algorithm/generate.h", "//third_party/libc++/src/include/__cxx03/__algorithm/generate_n.h", "//third_party/libc++/src/include/__cxx03/__algorithm/half_positive.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/in_found_result.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/in_fun_result.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/in_in_out_result.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/in_in_result.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/in_out_out_result.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/in_out_result.h", "//third_party/libc++/src/include/__cxx03/__algorithm/includes.h", "//third_party/libc++/src/include/__cxx03/__algorithm/inplace_merge.h", "//third_party/libc++/src/include/__cxx03/__algorithm/is_heap.h", @@ -385,7 +377,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__algorithm/iter_swap.h", "//third_party/libc++/src/include/__cxx03/__algorithm/iterator_operations.h", "//third_party/libc++/src/include/__cxx03/__algorithm/lexicographical_compare.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/lexicographical_compare_three_way.h", "//third_party/libc++/src/include/__cxx03/__algorithm/lower_bound.h", "//third_party/libc++/src/include/__cxx03/__algorithm/make_heap.h", "//third_party/libc++/src/include/__cxx03/__algorithm/make_projected.h", @@ -394,7 +385,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__algorithm/merge.h", "//third_party/libc++/src/include/__cxx03/__algorithm/min.h", "//third_party/libc++/src/include/__cxx03/__algorithm/min_element.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/min_max_result.h", "//third_party/libc++/src/include/__cxx03/__algorithm/minmax.h", "//third_party/libc++/src/include/__cxx03/__algorithm/minmax_element.h", "//third_party/libc++/src/include/__cxx03/__algorithm/mismatch.h", @@ -410,99 +400,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__algorithm/partition_point.h", "//third_party/libc++/src/include/__cxx03/__algorithm/pop_heap.h", "//third_party/libc++/src/include/__cxx03/__algorithm/prev_permutation.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/pstl.h", "//third_party/libc++/src/include/__cxx03/__algorithm/push_heap.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_adjacent_find.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_all_of.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_any_of.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_binary_search.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_clamp.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_contains.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_contains_subrange.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_copy.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_copy_backward.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_copy_if.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_copy_n.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_count.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_count_if.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_ends_with.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_equal.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_equal_range.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_fill.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_fill_n.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_end.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_first_of.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_if.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_if_not.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_find_last.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_for_each.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_for_each_n.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_generate.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_generate_n.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_includes.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_inplace_merge.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_heap.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_heap_until.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_partitioned.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_permutation.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_sorted.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_is_sorted_until.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_iterator_concept.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_lexicographical_compare.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_lower_bound.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_make_heap.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_max.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_max_element.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_merge.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_min.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_min_element.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_minmax.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_minmax_element.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_mismatch.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_move.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_move_backward.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_next_permutation.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_none_of.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_nth_element.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partial_sort.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partial_sort_copy.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partition.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partition_copy.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_partition_point.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_pop_heap.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_prev_permutation.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_push_heap.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_remove.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_remove_copy.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_remove_copy_if.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_remove_if.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_replace.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_replace_copy.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_replace_copy_if.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_replace_if.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_reverse.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_reverse_copy.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_rotate.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_rotate_copy.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_sample.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_search.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_search_n.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_set_difference.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_set_intersection.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_set_symmetric_difference.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_set_union.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_shuffle.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_sort.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_sort_heap.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_stable_partition.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_stable_sort.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_starts_with.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_swap_ranges.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_transform.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_unique.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_unique_copy.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/ranges_upper_bound.h", "//third_party/libc++/src/include/__cxx03/__algorithm/remove.h", "//third_party/libc++/src/include/__cxx03/__algorithm/remove_copy.h", "//third_party/libc++/src/include/__cxx03/__algorithm/remove_copy_if.h", @@ -515,15 +413,12 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__algorithm/reverse_copy.h", "//third_party/libc++/src/include/__cxx03/__algorithm/rotate.h", "//third_party/libc++/src/include/__cxx03/__algorithm/rotate_copy.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/sample.h", "//third_party/libc++/src/include/__cxx03/__algorithm/search.h", "//third_party/libc++/src/include/__cxx03/__algorithm/search_n.h", "//third_party/libc++/src/include/__cxx03/__algorithm/set_difference.h", "//third_party/libc++/src/include/__cxx03/__algorithm/set_intersection.h", "//third_party/libc++/src/include/__cxx03/__algorithm/set_symmetric_difference.h", "//third_party/libc++/src/include/__cxx03/__algorithm/set_union.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/shift_left.h", - "//third_party/libc++/src/include/__cxx03/__algorithm/shift_right.h", "//third_party/libc++/src/include/__cxx03/__algorithm/shuffle.h", "//third_party/libc++/src/include/__cxx03/__algorithm/sift_down.h", "//third_party/libc++/src/include/__cxx03/__algorithm/simd_utils.h", @@ -547,7 +442,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__atomic/atomic_flag.h", "//third_party/libc++/src/include/__cxx03/__atomic/atomic_init.h", "//third_party/libc++/src/include/__cxx03/__atomic/atomic_lock_free.h", - "//third_party/libc++/src/include/__cxx03/__atomic/atomic_ref.h", "//third_party/libc++/src/include/__cxx03/__atomic/atomic_sync.h", "//third_party/libc++/src/include/__cxx03/__atomic/check_memory_order.h", "//third_party/libc++/src/include/__cxx03/__atomic/contention_t.h", @@ -557,100 +451,19 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__atomic/kill_dependency.h", "//third_party/libc++/src/include/__cxx03/__atomic/memory_order.h", "//third_party/libc++/src/include/__cxx03/__atomic/to_gcc_order.h", - "//third_party/libc++/src/include/__cxx03/__bit/bit_cast.h", - "//third_party/libc++/src/include/__cxx03/__bit/bit_ceil.h", - "//third_party/libc++/src/include/__cxx03/__bit/bit_floor.h", - "//third_party/libc++/src/include/__cxx03/__bit/bit_log2.h", - "//third_party/libc++/src/include/__cxx03/__bit/bit_width.h", "//third_party/libc++/src/include/__cxx03/__bit/blsr.h", - "//third_party/libc++/src/include/__cxx03/__bit/byteswap.h", "//third_party/libc++/src/include/__cxx03/__bit/countl.h", "//third_party/libc++/src/include/__cxx03/__bit/countr.h", - "//third_party/libc++/src/include/__cxx03/__bit/endian.h", - "//third_party/libc++/src/include/__cxx03/__bit/has_single_bit.h", "//third_party/libc++/src/include/__cxx03/__bit/invert_if.h", "//third_party/libc++/src/include/__cxx03/__bit/popcount.h", "//third_party/libc++/src/include/__cxx03/__bit/rotate.h", "//third_party/libc++/src/include/__cxx03/__bit_reference", - "//third_party/libc++/src/include/__cxx03/__charconv/chars_format.h", - "//third_party/libc++/src/include/__cxx03/__charconv/from_chars_integral.h", - "//third_party/libc++/src/include/__cxx03/__charconv/from_chars_result.h", - "//third_party/libc++/src/include/__cxx03/__charconv/tables.h", - "//third_party/libc++/src/include/__cxx03/__charconv/to_chars.h", - "//third_party/libc++/src/include/__cxx03/__charconv/to_chars_base_10.h", - "//third_party/libc++/src/include/__cxx03/__charconv/to_chars_floating_point.h", - "//third_party/libc++/src/include/__cxx03/__charconv/to_chars_integral.h", - "//third_party/libc++/src/include/__cxx03/__charconv/to_chars_result.h", - "//third_party/libc++/src/include/__cxx03/__charconv/traits.h", - "//third_party/libc++/src/include/__cxx03/__chrono/calendar.h", - "//third_party/libc++/src/include/__cxx03/__chrono/concepts.h", "//third_party/libc++/src/include/__cxx03/__chrono/convert_to_timespec.h", - "//third_party/libc++/src/include/__cxx03/__chrono/convert_to_tm.h", - "//third_party/libc++/src/include/__cxx03/__chrono/day.h", "//third_party/libc++/src/include/__cxx03/__chrono/duration.h", - "//third_party/libc++/src/include/__cxx03/__chrono/exception.h", - "//third_party/libc++/src/include/__cxx03/__chrono/file_clock.h", - "//third_party/libc++/src/include/__cxx03/__chrono/formatter.h", - "//third_party/libc++/src/include/__cxx03/__chrono/hh_mm_ss.h", "//third_party/libc++/src/include/__cxx03/__chrono/high_resolution_clock.h", - "//third_party/libc++/src/include/__cxx03/__chrono/leap_second.h", - "//third_party/libc++/src/include/__cxx03/__chrono/literals.h", - "//third_party/libc++/src/include/__cxx03/__chrono/local_info.h", - "//third_party/libc++/src/include/__cxx03/__chrono/month.h", - "//third_party/libc++/src/include/__cxx03/__chrono/month_weekday.h", - "//third_party/libc++/src/include/__cxx03/__chrono/monthday.h", - "//third_party/libc++/src/include/__cxx03/__chrono/ostream.h", - "//third_party/libc++/src/include/__cxx03/__chrono/parser_std_format_spec.h", - "//third_party/libc++/src/include/__cxx03/__chrono/statically_widen.h", "//third_party/libc++/src/include/__cxx03/__chrono/steady_clock.h", - "//third_party/libc++/src/include/__cxx03/__chrono/sys_info.h", "//third_party/libc++/src/include/__cxx03/__chrono/system_clock.h", "//third_party/libc++/src/include/__cxx03/__chrono/time_point.h", - "//third_party/libc++/src/include/__cxx03/__chrono/time_zone.h", - "//third_party/libc++/src/include/__cxx03/__chrono/time_zone_link.h", - "//third_party/libc++/src/include/__cxx03/__chrono/tzdb.h", - "//third_party/libc++/src/include/__cxx03/__chrono/tzdb_list.h", - "//third_party/libc++/src/include/__cxx03/__chrono/weekday.h", - "//third_party/libc++/src/include/__cxx03/__chrono/year.h", - "//third_party/libc++/src/include/__cxx03/__chrono/year_month.h", - "//third_party/libc++/src/include/__cxx03/__chrono/year_month_day.h", - "//third_party/libc++/src/include/__cxx03/__chrono/year_month_weekday.h", - "//third_party/libc++/src/include/__cxx03/__chrono/zoned_time.h", - "//third_party/libc++/src/include/__cxx03/__compare/common_comparison_category.h", - "//third_party/libc++/src/include/__cxx03/__compare/compare_partial_order_fallback.h", - "//third_party/libc++/src/include/__cxx03/__compare/compare_strong_order_fallback.h", - "//third_party/libc++/src/include/__cxx03/__compare/compare_three_way.h", - "//third_party/libc++/src/include/__cxx03/__compare/compare_three_way_result.h", - "//third_party/libc++/src/include/__cxx03/__compare/compare_weak_order_fallback.h", - "//third_party/libc++/src/include/__cxx03/__compare/is_eq.h", - "//third_party/libc++/src/include/__cxx03/__compare/ordering.h", - "//third_party/libc++/src/include/__cxx03/__compare/partial_order.h", - "//third_party/libc++/src/include/__cxx03/__compare/strong_order.h", - "//third_party/libc++/src/include/__cxx03/__compare/synth_three_way.h", - "//third_party/libc++/src/include/__cxx03/__compare/three_way_comparable.h", - "//third_party/libc++/src/include/__cxx03/__compare/weak_order.h", - "//third_party/libc++/src/include/__cxx03/__concepts/arithmetic.h", - "//third_party/libc++/src/include/__cxx03/__concepts/assignable.h", - "//third_party/libc++/src/include/__cxx03/__concepts/boolean_testable.h", - "//third_party/libc++/src/include/__cxx03/__concepts/class_or_enum.h", - "//third_party/libc++/src/include/__cxx03/__concepts/common_reference_with.h", - "//third_party/libc++/src/include/__cxx03/__concepts/common_with.h", - "//third_party/libc++/src/include/__cxx03/__concepts/constructible.h", - "//third_party/libc++/src/include/__cxx03/__concepts/convertible_to.h", - "//third_party/libc++/src/include/__cxx03/__concepts/copyable.h", - "//third_party/libc++/src/include/__cxx03/__concepts/derived_from.h", - "//third_party/libc++/src/include/__cxx03/__concepts/destructible.h", - "//third_party/libc++/src/include/__cxx03/__concepts/different_from.h", - "//third_party/libc++/src/include/__cxx03/__concepts/equality_comparable.h", - "//third_party/libc++/src/include/__cxx03/__concepts/invocable.h", - "//third_party/libc++/src/include/__cxx03/__concepts/movable.h", - "//third_party/libc++/src/include/__cxx03/__concepts/predicate.h", - "//third_party/libc++/src/include/__cxx03/__concepts/regular.h", - "//third_party/libc++/src/include/__cxx03/__concepts/relation.h", - "//third_party/libc++/src/include/__cxx03/__concepts/same_as.h", - "//third_party/libc++/src/include/__cxx03/__concepts/semiregular.h", - "//third_party/libc++/src/include/__cxx03/__concepts/swappable.h", - "//third_party/libc++/src/include/__cxx03/__concepts/totally_ordered.h", "//third_party/libc++/src/include/__cxx03/__condition_variable/condition_variable.h", "//third_party/libc++/src/include/__cxx03/__config", "//third_party/libc++/src/include/__cxx03/__config_site.in", @@ -660,10 +473,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__configuration/config_site_shim.h", "//third_party/libc++/src/include/__cxx03/__configuration/language.h", "//third_party/libc++/src/include/__cxx03/__configuration/platform.h", - "//third_party/libc++/src/include/__cxx03/__coroutine/coroutine_handle.h", - "//third_party/libc++/src/include/__cxx03/__coroutine/coroutine_traits.h", - "//third_party/libc++/src/include/__cxx03/__coroutine/noop_coroutine_handle.h", - "//third_party/libc++/src/include/__cxx03/__coroutine/trivial_awaitables.h", "//third_party/libc++/src/include/__cxx03/__debug_utils/randomize_range.h", "//third_party/libc++/src/include/__cxx03/__debug_utils/sanitizers.h", "//third_party/libc++/src/include/__cxx03/__debug_utils/strict_weak_ordering_check.h", @@ -672,81 +481,18 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__exception/nested_exception.h", "//third_party/libc++/src/include/__cxx03/__exception/operations.h", "//third_party/libc++/src/include/__cxx03/__exception/terminate.h", - "//third_party/libc++/src/include/__cxx03/__expected/bad_expected_access.h", - "//third_party/libc++/src/include/__cxx03/__expected/expected.h", - "//third_party/libc++/src/include/__cxx03/__expected/unexpect.h", - "//third_party/libc++/src/include/__cxx03/__expected/unexpected.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/copy_options.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/directory_entry.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/directory_iterator.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/directory_options.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/file_status.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/file_time_type.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/file_type.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/filesystem_error.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/operations.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/path.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/path_iterator.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/perm_options.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/perms.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/recursive_directory_iterator.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/space_info.h", - "//third_party/libc++/src/include/__cxx03/__filesystem/u8path.h", - "//third_party/libc++/src/include/__cxx03/__format/buffer.h", - "//third_party/libc++/src/include/__cxx03/__format/concepts.h", - "//third_party/libc++/src/include/__cxx03/__format/container_adaptor.h", - "//third_party/libc++/src/include/__cxx03/__format/enable_insertable.h", - "//third_party/libc++/src/include/__cxx03/__format/escaped_output_table.h", - "//third_party/libc++/src/include/__cxx03/__format/extended_grapheme_cluster_table.h", - "//third_party/libc++/src/include/__cxx03/__format/format_arg.h", - "//third_party/libc++/src/include/__cxx03/__format/format_arg_store.h", - "//third_party/libc++/src/include/__cxx03/__format/format_args.h", - "//third_party/libc++/src/include/__cxx03/__format/format_context.h", - "//third_party/libc++/src/include/__cxx03/__format/format_error.h", - "//third_party/libc++/src/include/__cxx03/__format/format_functions.h", - "//third_party/libc++/src/include/__cxx03/__format/format_parse_context.h", - "//third_party/libc++/src/include/__cxx03/__format/format_string.h", - "//third_party/libc++/src/include/__cxx03/__format/format_to_n_result.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter_bool.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter_char.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter_floating_point.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter_integer.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter_integral.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter_output.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter_pointer.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter_string.h", - "//third_party/libc++/src/include/__cxx03/__format/formatter_tuple.h", - "//third_party/libc++/src/include/__cxx03/__format/indic_conjunct_break_table.h", - "//third_party/libc++/src/include/__cxx03/__format/parser_std_format_spec.h", - "//third_party/libc++/src/include/__cxx03/__format/range_default_formatter.h", - "//third_party/libc++/src/include/__cxx03/__format/range_formatter.h", - "//third_party/libc++/src/include/__cxx03/__format/unicode.h", - "//third_party/libc++/src/include/__cxx03/__format/width_estimation_table.h", - "//third_party/libc++/src/include/__cxx03/__format/write_escaped.h", "//third_party/libc++/src/include/__cxx03/__functional/binary_function.h", "//third_party/libc++/src/include/__cxx03/__functional/binary_negate.h", "//third_party/libc++/src/include/__cxx03/__functional/bind.h", - "//third_party/libc++/src/include/__cxx03/__functional/bind_back.h", - "//third_party/libc++/src/include/__cxx03/__functional/bind_front.h", "//third_party/libc++/src/include/__cxx03/__functional/binder1st.h", "//third_party/libc++/src/include/__cxx03/__functional/binder2nd.h", - "//third_party/libc++/src/include/__cxx03/__functional/boyer_moore_searcher.h", - "//third_party/libc++/src/include/__cxx03/__functional/compose.h", - "//third_party/libc++/src/include/__cxx03/__functional/default_searcher.h", - "//third_party/libc++/src/include/__cxx03/__functional/function.h", "//third_party/libc++/src/include/__cxx03/__functional/hash.h", "//third_party/libc++/src/include/__cxx03/__functional/identity.h", - "//third_party/libc++/src/include/__cxx03/__functional/invoke.h", - "//third_party/libc++/src/include/__cxx03/__functional/is_transparent.h", "//third_party/libc++/src/include/__cxx03/__functional/mem_fn.h", "//third_party/libc++/src/include/__cxx03/__functional/mem_fun_ref.h", - "//third_party/libc++/src/include/__cxx03/__functional/not_fn.h", "//third_party/libc++/src/include/__cxx03/__functional/operations.h", - "//third_party/libc++/src/include/__cxx03/__functional/perfect_forward.h", "//third_party/libc++/src/include/__cxx03/__functional/pointer_to_binary_function.h", "//third_party/libc++/src/include/__cxx03/__functional/pointer_to_unary_function.h", - "//third_party/libc++/src/include/__cxx03/__functional/ranges_operations.h", "//third_party/libc++/src/include/__cxx03/__functional/reference_wrapper.h", "//third_party/libc++/src/include/__cxx03/__functional/unary_function.h", "//third_party/libc++/src/include/__cxx03/__functional/unary_negate.h", @@ -755,24 +501,19 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__fwd/bit_reference.h", "//third_party/libc++/src/include/__cxx03/__fwd/complex.h", "//third_party/libc++/src/include/__cxx03/__fwd/deque.h", - "//third_party/libc++/src/include/__cxx03/__fwd/format.h", "//third_party/libc++/src/include/__cxx03/__fwd/fstream.h", "//third_party/libc++/src/include/__cxx03/__fwd/functional.h", "//third_party/libc++/src/include/__cxx03/__fwd/ios.h", "//third_party/libc++/src/include/__cxx03/__fwd/istream.h", - "//third_party/libc++/src/include/__cxx03/__fwd/mdspan.h", "//third_party/libc++/src/include/__cxx03/__fwd/memory.h", - "//third_party/libc++/src/include/__cxx03/__fwd/memory_resource.h", "//third_party/libc++/src/include/__cxx03/__fwd/ostream.h", "//third_party/libc++/src/include/__cxx03/__fwd/pair.h", "//third_party/libc++/src/include/__cxx03/__fwd/queue.h", - "//third_party/libc++/src/include/__cxx03/__fwd/span.h", "//third_party/libc++/src/include/__cxx03/__fwd/sstream.h", "//third_party/libc++/src/include/__cxx03/__fwd/stack.h", "//third_party/libc++/src/include/__cxx03/__fwd/streambuf.h", "//third_party/libc++/src/include/__cxx03/__fwd/string.h", "//third_party/libc++/src/include/__cxx03/__fwd/string_view.h", - "//third_party/libc++/src/include/__cxx03/__fwd/subrange.h", "//third_party/libc++/src/include/__cxx03/__fwd/tuple.h", "//third_party/libc++/src/include/__cxx03/__fwd/vector.h", "//third_party/libc++/src/include/__cxx03/__hash_table", @@ -782,43 +523,22 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__iterator/aliasing_iterator.h", "//third_party/libc++/src/include/__cxx03/__iterator/back_insert_iterator.h", "//third_party/libc++/src/include/__cxx03/__iterator/bounded_iter.h", - "//third_party/libc++/src/include/__cxx03/__iterator/common_iterator.h", - "//third_party/libc++/src/include/__cxx03/__iterator/concepts.h", - "//third_party/libc++/src/include/__cxx03/__iterator/counted_iterator.h", "//third_party/libc++/src/include/__cxx03/__iterator/cpp17_iterator_concepts.h", - "//third_party/libc++/src/include/__cxx03/__iterator/data.h", - "//third_party/libc++/src/include/__cxx03/__iterator/default_sentinel.h", "//third_party/libc++/src/include/__cxx03/__iterator/distance.h", - "//third_party/libc++/src/include/__cxx03/__iterator/empty.h", "//third_party/libc++/src/include/__cxx03/__iterator/erase_if_container.h", "//third_party/libc++/src/include/__cxx03/__iterator/front_insert_iterator.h", - "//third_party/libc++/src/include/__cxx03/__iterator/incrementable_traits.h", - "//third_party/libc++/src/include/__cxx03/__iterator/indirectly_comparable.h", "//third_party/libc++/src/include/__cxx03/__iterator/insert_iterator.h", "//third_party/libc++/src/include/__cxx03/__iterator/istream_iterator.h", "//third_party/libc++/src/include/__cxx03/__iterator/istreambuf_iterator.h", - "//third_party/libc++/src/include/__cxx03/__iterator/iter_move.h", - "//third_party/libc++/src/include/__cxx03/__iterator/iter_swap.h", "//third_party/libc++/src/include/__cxx03/__iterator/iterator.h", "//third_party/libc++/src/include/__cxx03/__iterator/iterator_traits.h", - "//third_party/libc++/src/include/__cxx03/__iterator/iterator_with_data.h", - "//third_party/libc++/src/include/__cxx03/__iterator/mergeable.h", "//third_party/libc++/src/include/__cxx03/__iterator/move_iterator.h", - "//third_party/libc++/src/include/__cxx03/__iterator/move_sentinel.h", "//third_party/libc++/src/include/__cxx03/__iterator/next.h", "//third_party/libc++/src/include/__cxx03/__iterator/ostream_iterator.h", "//third_party/libc++/src/include/__cxx03/__iterator/ostreambuf_iterator.h", - "//third_party/libc++/src/include/__cxx03/__iterator/permutable.h", "//third_party/libc++/src/include/__cxx03/__iterator/prev.h", - "//third_party/libc++/src/include/__cxx03/__iterator/projected.h", - "//third_party/libc++/src/include/__cxx03/__iterator/ranges_iterator_traits.h", - "//third_party/libc++/src/include/__cxx03/__iterator/readable_traits.h", - "//third_party/libc++/src/include/__cxx03/__iterator/reverse_access.h", "//third_party/libc++/src/include/__cxx03/__iterator/reverse_iterator.h", "//third_party/libc++/src/include/__cxx03/__iterator/segmented_iterator.h", - "//third_party/libc++/src/include/__cxx03/__iterator/size.h", - "//third_party/libc++/src/include/__cxx03/__iterator/sortable.h", - "//third_party/libc++/src/include/__cxx03/__iterator/unreachable_sentinel.h", "//third_party/libc++/src/include/__cxx03/__iterator/wrap_iter.h", "//third_party/libc++/src/include/__cxx03/__locale", "//third_party/libc++/src/include/__cxx03/__locale_dir/locale_base_api/android.h", @@ -849,16 +569,9 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__math/remainder.h", "//third_party/libc++/src/include/__cxx03/__math/roots.h", "//third_party/libc++/src/include/__cxx03/__math/rounding_functions.h", - "//third_party/libc++/src/include/__cxx03/__math/special_functions.h", "//third_party/libc++/src/include/__cxx03/__math/traits.h", "//third_party/libc++/src/include/__cxx03/__math/trigonometric_functions.h", "//third_party/libc++/src/include/__cxx03/__mbstate_t.h", - "//third_party/libc++/src/include/__cxx03/__mdspan/default_accessor.h", - "//third_party/libc++/src/include/__cxx03/__mdspan/extents.h", - "//third_party/libc++/src/include/__cxx03/__mdspan/layout_left.h", - "//third_party/libc++/src/include/__cxx03/__mdspan/layout_right.h", - "//third_party/libc++/src/include/__cxx03/__mdspan/layout_stride.h", - "//third_party/libc++/src/include/__cxx03/__mdspan/mdspan.h", "//third_party/libc++/src/include/__cxx03/__memory/addressof.h", "//third_party/libc++/src/include/__cxx03/__memory/align.h", "//third_party/libc++/src/include/__cxx03/__memory/aligned_alloc.h", @@ -872,14 +585,9 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__memory/auto_ptr.h", "//third_party/libc++/src/include/__cxx03/__memory/builtin_new_allocator.h", "//third_party/libc++/src/include/__cxx03/__memory/compressed_pair.h", - "//third_party/libc++/src/include/__cxx03/__memory/concepts.h", "//third_party/libc++/src/include/__cxx03/__memory/construct_at.h", "//third_party/libc++/src/include/__cxx03/__memory/destruct_n.h", - "//third_party/libc++/src/include/__cxx03/__memory/inout_ptr.h", - "//third_party/libc++/src/include/__cxx03/__memory/out_ptr.h", "//third_party/libc++/src/include/__cxx03/__memory/pointer_traits.h", - "//third_party/libc++/src/include/__cxx03/__memory/ranges_construct_at.h", - "//third_party/libc++/src/include/__cxx03/__memory/ranges_uninitialized_algorithms.h", "//third_party/libc++/src/include/__cxx03/__memory/raw_storage_iterator.h", "//third_party/libc++/src/include/__cxx03/__memory/shared_ptr.h", "//third_party/libc++/src/include/__cxx03/__memory/swap_allocator.h", @@ -888,54 +596,18 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__memory/uninitialized_algorithms.h", "//third_party/libc++/src/include/__cxx03/__memory/unique_ptr.h", "//third_party/libc++/src/include/__cxx03/__memory/uses_allocator.h", - "//third_party/libc++/src/include/__cxx03/__memory/uses_allocator_construction.h", "//third_party/libc++/src/include/__cxx03/__memory/voidify.h", - "//third_party/libc++/src/include/__cxx03/__memory_resource/memory_resource.h", - "//third_party/libc++/src/include/__cxx03/__memory_resource/monotonic_buffer_resource.h", - "//third_party/libc++/src/include/__cxx03/__memory_resource/polymorphic_allocator.h", - "//third_party/libc++/src/include/__cxx03/__memory_resource/pool_options.h", - "//third_party/libc++/src/include/__cxx03/__memory_resource/synchronized_pool_resource.h", - "//third_party/libc++/src/include/__cxx03/__memory_resource/unsynchronized_pool_resource.h", "//third_party/libc++/src/include/__cxx03/__mutex/lock_guard.h", "//third_party/libc++/src/include/__cxx03/__mutex/mutex.h", "//third_party/libc++/src/include/__cxx03/__mutex/once_flag.h", "//third_party/libc++/src/include/__cxx03/__mutex/tag_types.h", "//third_party/libc++/src/include/__cxx03/__mutex/unique_lock.h", - "//third_party/libc++/src/include/__cxx03/__node_handle", "//third_party/libc++/src/include/__cxx03/__numeric/accumulate.h", "//third_party/libc++/src/include/__cxx03/__numeric/adjacent_difference.h", - "//third_party/libc++/src/include/__cxx03/__numeric/exclusive_scan.h", - "//third_party/libc++/src/include/__cxx03/__numeric/gcd_lcm.h", - "//third_party/libc++/src/include/__cxx03/__numeric/inclusive_scan.h", "//third_party/libc++/src/include/__cxx03/__numeric/inner_product.h", "//third_party/libc++/src/include/__cxx03/__numeric/iota.h", - "//third_party/libc++/src/include/__cxx03/__numeric/midpoint.h", "//third_party/libc++/src/include/__cxx03/__numeric/partial_sum.h", - "//third_party/libc++/src/include/__cxx03/__numeric/pstl.h", - "//third_party/libc++/src/include/__cxx03/__numeric/reduce.h", - "//third_party/libc++/src/include/__cxx03/__numeric/saturation_arithmetic.h", - "//third_party/libc++/src/include/__cxx03/__numeric/transform_exclusive_scan.h", - "//third_party/libc++/src/include/__cxx03/__numeric/transform_inclusive_scan.h", - "//third_party/libc++/src/include/__cxx03/__numeric/transform_reduce.h", "//third_party/libc++/src/include/__cxx03/__ostream/basic_ostream.h", - "//third_party/libc++/src/include/__cxx03/__ostream/print.h", - "//third_party/libc++/src/include/__cxx03/__pstl/backend.h", - "//third_party/libc++/src/include/__cxx03/__pstl/backend_fwd.h", - "//third_party/libc++/src/include/__cxx03/__pstl/backends/default.h", - "//third_party/libc++/src/include/__cxx03/__pstl/backends/libdispatch.h", - "//third_party/libc++/src/include/__cxx03/__pstl/backends/serial.h", - "//third_party/libc++/src/include/__cxx03/__pstl/backends/std_thread.h", - "//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/any_of.h", - "//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/cpu_traits.h", - "//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/fill.h", - "//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/find_if.h", - "//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/for_each.h", - "//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/merge.h", - "//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/stable_sort.h", - "//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/transform.h", - "//third_party/libc++/src/include/__cxx03/__pstl/cpu_algos/transform_reduce.h", - "//third_party/libc++/src/include/__cxx03/__pstl/dispatch.h", - "//third_party/libc++/src/include/__cxx03/__pstl/handle_exception.h", "//third_party/libc++/src/include/__cxx03/__random/bernoulli_distribution.h", "//third_party/libc++/src/include/__cxx03/__random/binomial_distribution.h", "//third_party/libc++/src/include/__cxx03/__random/cauchy_distribution.h", @@ -970,62 +642,11 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__random/student_t_distribution.h", "//third_party/libc++/src/include/__cxx03/__random/subtract_with_carry_engine.h", "//third_party/libc++/src/include/__cxx03/__random/uniform_int_distribution.h", - "//third_party/libc++/src/include/__cxx03/__random/uniform_random_bit_generator.h", "//third_party/libc++/src/include/__cxx03/__random/uniform_real_distribution.h", "//third_party/libc++/src/include/__cxx03/__random/weibull_distribution.h", - "//third_party/libc++/src/include/__cxx03/__ranges/access.h", - "//third_party/libc++/src/include/__cxx03/__ranges/all.h", - "//third_party/libc++/src/include/__cxx03/__ranges/as_rvalue_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/chunk_by_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/common_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/concepts.h", - "//third_party/libc++/src/include/__cxx03/__ranges/container_compatible_range.h", - "//third_party/libc++/src/include/__cxx03/__ranges/counted.h", - "//third_party/libc++/src/include/__cxx03/__ranges/dangling.h", - "//third_party/libc++/src/include/__cxx03/__ranges/data.h", - "//third_party/libc++/src/include/__cxx03/__ranges/drop_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/drop_while_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/elements_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/empty.h", - "//third_party/libc++/src/include/__cxx03/__ranges/empty_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/enable_borrowed_range.h", - "//third_party/libc++/src/include/__cxx03/__ranges/enable_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/filter_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/from_range.h", - "//third_party/libc++/src/include/__cxx03/__ranges/iota_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/istream_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/join_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/lazy_split_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/movable_box.h", - "//third_party/libc++/src/include/__cxx03/__ranges/non_propagating_cache.h", - "//third_party/libc++/src/include/__cxx03/__ranges/owning_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/range_adaptor.h", - "//third_party/libc++/src/include/__cxx03/__ranges/rbegin.h", - "//third_party/libc++/src/include/__cxx03/__ranges/ref_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/rend.h", - "//third_party/libc++/src/include/__cxx03/__ranges/repeat_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/reverse_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/single_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/size.h", - "//third_party/libc++/src/include/__cxx03/__ranges/split_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/subrange.h", - "//third_party/libc++/src/include/__cxx03/__ranges/take_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/take_while_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/to.h", - "//third_party/libc++/src/include/__cxx03/__ranges/transform_view.h", - "//third_party/libc++/src/include/__cxx03/__ranges/view_interface.h", - "//third_party/libc++/src/include/__cxx03/__ranges/views.h", - "//third_party/libc++/src/include/__cxx03/__ranges/zip_view.h", "//third_party/libc++/src/include/__cxx03/__split_buffer", "//third_party/libc++/src/include/__cxx03/__std_clang_module", "//third_party/libc++/src/include/__cxx03/__std_mbstate_t.h", - "//third_party/libc++/src/include/__cxx03/__stop_token/atomic_unique_lock.h", - "//third_party/libc++/src/include/__cxx03/__stop_token/intrusive_list_view.h", - "//third_party/libc++/src/include/__cxx03/__stop_token/intrusive_shared_ptr.h", - "//third_party/libc++/src/include/__cxx03/__stop_token/stop_callback.h", - "//third_party/libc++/src/include/__cxx03/__stop_token/stop_source.h", - "//third_party/libc++/src/include/__cxx03/__stop_token/stop_state.h", - "//third_party/libc++/src/include/__cxx03/__stop_token/stop_token.h", "//third_party/libc++/src/include/__cxx03/__string/char_traits.h", "//third_party/libc++/src/include/__cxx03/__string/constexpr_c_functions.h", "//third_party/libc++/src/include/__cxx03/__string/extern_template_lists.h", @@ -1040,9 +661,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__system_error/error_code.h", "//third_party/libc++/src/include/__cxx03/__system_error/error_condition.h", "//third_party/libc++/src/include/__cxx03/__system_error/system_error.h", - "//third_party/libc++/src/include/__cxx03/__thread/formatter.h", "//third_party/libc++/src/include/__cxx03/__thread/id.h", - "//third_party/libc++/src/include/__cxx03/__thread/jthread.h", "//third_party/libc++/src/include/__cxx03/__thread/poll_with_backoff.h", "//third_party/libc++/src/include/__cxx03/__thread/support/c11.h", "//third_party/libc++/src/include/__cxx03/__thread/support/external.h", @@ -1054,7 +673,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__thread/timed_backoff_policy.h", "//third_party/libc++/src/include/__cxx03/__tree", "//third_party/libc++/src/include/__cxx03/__tuple/find_index.h", - "//third_party/libc++/src/include/__cxx03/__tuple/ignore.h", "//third_party/libc++/src/include/__cxx03/__tuple/make_tuple_types.h", "//third_party/libc++/src/include/__cxx03/__tuple/sfinae_helpers.h", "//third_party/libc++/src/include/__cxx03/__tuple/tuple_element.h", @@ -1074,7 +692,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__type_traits/aligned_union.h", "//third_party/libc++/src/include/__cxx03/__type_traits/alignment_of.h", "//third_party/libc++/src/include/__cxx03/__type_traits/can_extract_key.h", - "//third_party/libc++/src/include/__cxx03/__type_traits/common_reference.h", "//third_party/libc++/src/include/__cxx03/__type_traits/common_type.h", "//third_party/libc++/src/include/__cxx03/__type_traits/conditional.h", "//third_party/libc++/src/include/__cxx03/__type_traits/conjunction.h", @@ -1087,12 +704,10 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__type_traits/disjunction.h", "//third_party/libc++/src/include/__cxx03/__type_traits/enable_if.h", "//third_party/libc++/src/include/__cxx03/__type_traits/extent.h", - "//third_party/libc++/src/include/__cxx03/__type_traits/has_unique_object_representation.h", "//third_party/libc++/src/include/__cxx03/__type_traits/has_virtual_destructor.h", "//third_party/libc++/src/include/__cxx03/__type_traits/integral_constant.h", "//third_party/libc++/src/include/__cxx03/__type_traits/invoke.h", "//third_party/libc++/src/include/__cxx03/__type_traits/is_abstract.h", - "//third_party/libc++/src/include/__cxx03/__type_traits/is_aggregate.h", "//third_party/libc++/src/include/__cxx03/__type_traits/is_allocator.h", "//third_party/libc++/src/include/__cxx03/__type_traits/is_always_bitcastable.h", "//third_party/libc++/src/include/__cxx03/__type_traits/is_arithmetic.h", @@ -1124,7 +739,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__type_traits/is_member_pointer.h", "//third_party/libc++/src/include/__cxx03/__type_traits/is_nothrow_assignable.h", "//third_party/libc++/src/include/__cxx03/__type_traits/is_nothrow_constructible.h", - "//third_party/libc++/src/include/__cxx03/__type_traits/is_nothrow_convertible.h", "//third_party/libc++/src/include/__cxx03/__type_traits/is_nothrow_destructible.h", "//third_party/libc++/src/include/__cxx03/__type_traits/is_null_pointer.h", "//third_party/libc++/src/include/__cxx03/__type_traits/is_object.h", @@ -1184,18 +798,13 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__type_traits/unwrap_ref.h", "//third_party/libc++/src/include/__cxx03/__type_traits/void_t.h", "//third_party/libc++/src/include/__cxx03/__undef_macros", - "//third_party/libc++/src/include/__cxx03/__utility/as_const.h", "//third_party/libc++/src/include/__cxx03/__utility/as_lvalue.h", "//third_party/libc++/src/include/__cxx03/__utility/auto_cast.h", - "//third_party/libc++/src/include/__cxx03/__utility/cmp.h", "//third_party/libc++/src/include/__cxx03/__utility/convert_to_integral.h", "//third_party/libc++/src/include/__cxx03/__utility/declval.h", "//third_party/libc++/src/include/__cxx03/__utility/empty.h", "//third_party/libc++/src/include/__cxx03/__utility/exception_guard.h", - "//third_party/libc++/src/include/__cxx03/__utility/exchange.h", "//third_party/libc++/src/include/__cxx03/__utility/forward.h", - "//third_party/libc++/src/include/__cxx03/__utility/forward_like.h", - "//third_party/libc++/src/include/__cxx03/__utility/in_place.h", "//third_party/libc++/src/include/__cxx03/__utility/integer_sequence.h", "//third_party/libc++/src/include/__cxx03/__utility/is_pointer_in_range.h", "//third_party/libc++/src/include/__cxx03/__utility/is_valid_range.h", @@ -1208,16 +817,12 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/__utility/rel_ops.h", "//third_party/libc++/src/include/__cxx03/__utility/small_buffer.h", "//third_party/libc++/src/include/__cxx03/__utility/swap.h", - "//third_party/libc++/src/include/__cxx03/__utility/to_underlying.h", "//third_party/libc++/src/include/__cxx03/__utility/unreachable.h", "//third_party/libc++/src/include/__cxx03/__variant/monostate.h", "//third_party/libc++/src/include/__cxx03/__verbose_abort", "//third_party/libc++/src/include/__cxx03/algorithm", - "//third_party/libc++/src/include/__cxx03/any", "//third_party/libc++/src/include/__cxx03/array", "//third_party/libc++/src/include/__cxx03/atomic", - "//third_party/libc++/src/include/__cxx03/barrier", - "//third_party/libc++/src/include/__cxx03/bit", "//third_party/libc++/src/include/__cxx03/bitset", "//third_party/libc++/src/include/__cxx03/cassert", "//third_party/libc++/src/include/__cxx03/ccomplex", @@ -1225,7 +830,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/cerrno", "//third_party/libc++/src/include/__cxx03/cfenv", "//third_party/libc++/src/include/__cxx03/cfloat", - "//third_party/libc++/src/include/__cxx03/charconv", "//third_party/libc++/src/include/__cxx03/chrono", "//third_party/libc++/src/include/__cxx03/cinttypes", "//third_party/libc++/src/include/__cxx03/ciso646", @@ -1233,12 +837,9 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/clocale", "//third_party/libc++/src/include/__cxx03/cmath", "//third_party/libc++/src/include/__cxx03/codecvt", - "//third_party/libc++/src/include/__cxx03/compare", "//third_party/libc++/src/include/__cxx03/complex", "//third_party/libc++/src/include/__cxx03/complex.h", - "//third_party/libc++/src/include/__cxx03/concepts", "//third_party/libc++/src/include/__cxx03/condition_variable", - "//third_party/libc++/src/include/__cxx03/coroutine", "//third_party/libc++/src/include/__cxx03/csetjmp", "//third_party/libc++/src/include/__cxx03/csignal", "//third_party/libc++/src/include/__cxx03/cstdarg", @@ -1257,36 +858,17 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/deque", "//third_party/libc++/src/include/__cxx03/errno.h", "//third_party/libc++/src/include/__cxx03/exception", - "//third_party/libc++/src/include/__cxx03/execution", - "//third_party/libc++/src/include/__cxx03/expected", "//third_party/libc++/src/include/__cxx03/experimental/__config", - "//third_party/libc++/src/include/__cxx03/experimental/__simd/aligned_tag.h", - "//third_party/libc++/src/include/__cxx03/experimental/__simd/declaration.h", - "//third_party/libc++/src/include/__cxx03/experimental/__simd/reference.h", - "//third_party/libc++/src/include/__cxx03/experimental/__simd/scalar.h", - "//third_party/libc++/src/include/__cxx03/experimental/__simd/simd.h", - "//third_party/libc++/src/include/__cxx03/experimental/__simd/simd_mask.h", - "//third_party/libc++/src/include/__cxx03/experimental/__simd/traits.h", - "//third_party/libc++/src/include/__cxx03/experimental/__simd/utility.h", - "//third_party/libc++/src/include/__cxx03/experimental/__simd/vec_ext.h", - "//third_party/libc++/src/include/__cxx03/experimental/iterator", - "//third_party/libc++/src/include/__cxx03/experimental/memory", - "//third_party/libc++/src/include/__cxx03/experimental/propagate_const", - "//third_party/libc++/src/include/__cxx03/experimental/simd", - "//third_party/libc++/src/include/__cxx03/experimental/type_traits", "//third_party/libc++/src/include/__cxx03/experimental/utility", "//third_party/libc++/src/include/__cxx03/ext/__hash", "//third_party/libc++/src/include/__cxx03/ext/hash_map", "//third_party/libc++/src/include/__cxx03/ext/hash_set", "//third_party/libc++/src/include/__cxx03/fenv.h", - "//third_party/libc++/src/include/__cxx03/filesystem", "//third_party/libc++/src/include/__cxx03/float.h", - "//third_party/libc++/src/include/__cxx03/format", "//third_party/libc++/src/include/__cxx03/forward_list", "//third_party/libc++/src/include/__cxx03/fstream", "//third_party/libc++/src/include/__cxx03/functional", "//third_party/libc++/src/include/__cxx03/future", - "//third_party/libc++/src/include/__cxx03/initializer_list", "//third_party/libc++/src/include/__cxx03/inttypes.h", "//third_party/libc++/src/include/__cxx03/iomanip", "//third_party/libc++/src/include/__cxx03/ios", @@ -1294,35 +876,23 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/iostream", "//third_party/libc++/src/include/__cxx03/istream", "//third_party/libc++/src/include/__cxx03/iterator", - "//third_party/libc++/src/include/__cxx03/latch", "//third_party/libc++/src/include/__cxx03/limits", "//third_party/libc++/src/include/__cxx03/list", "//third_party/libc++/src/include/__cxx03/locale", "//third_party/libc++/src/include/__cxx03/locale.h", "//third_party/libc++/src/include/__cxx03/map", "//third_party/libc++/src/include/__cxx03/math.h", - "//third_party/libc++/src/include/__cxx03/mdspan", "//third_party/libc++/src/include/__cxx03/memory", - "//third_party/libc++/src/include/__cxx03/memory_resource", "//third_party/libc++/src/include/__cxx03/module.modulemap", "//third_party/libc++/src/include/__cxx03/mutex", "//third_party/libc++/src/include/__cxx03/new", - "//third_party/libc++/src/include/__cxx03/numbers", "//third_party/libc++/src/include/__cxx03/numeric", - "//third_party/libc++/src/include/__cxx03/optional", "//third_party/libc++/src/include/__cxx03/ostream", - "//third_party/libc++/src/include/__cxx03/print", "//third_party/libc++/src/include/__cxx03/queue", "//third_party/libc++/src/include/__cxx03/random", - "//third_party/libc++/src/include/__cxx03/ranges", "//third_party/libc++/src/include/__cxx03/ratio", "//third_party/libc++/src/include/__cxx03/regex", - "//third_party/libc++/src/include/__cxx03/scoped_allocator", - "//third_party/libc++/src/include/__cxx03/semaphore", "//third_party/libc++/src/include/__cxx03/set", - "//third_party/libc++/src/include/__cxx03/shared_mutex", - "//third_party/libc++/src/include/__cxx03/source_location", - "//third_party/libc++/src/include/__cxx03/span", "//third_party/libc++/src/include/__cxx03/sstream", "//third_party/libc++/src/include/__cxx03/stack", "//third_party/libc++/src/include/__cxx03/stdatomic.h", @@ -1332,17 +902,14 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/stdint.h", "//third_party/libc++/src/include/__cxx03/stdio.h", "//third_party/libc++/src/include/__cxx03/stdlib.h", - "//third_party/libc++/src/include/__cxx03/stop_token", "//third_party/libc++/src/include/__cxx03/streambuf", "//third_party/libc++/src/include/__cxx03/string", "//third_party/libc++/src/include/__cxx03/string.h", "//third_party/libc++/src/include/__cxx03/string_view", "//third_party/libc++/src/include/__cxx03/strstream", - "//third_party/libc++/src/include/__cxx03/syncstream", "//third_party/libc++/src/include/__cxx03/system_error", "//third_party/libc++/src/include/__cxx03/tgmath.h", "//third_party/libc++/src/include/__cxx03/thread", - "//third_party/libc++/src/include/__cxx03/tuple", "//third_party/libc++/src/include/__cxx03/type_traits", "//third_party/libc++/src/include/__cxx03/typeindex", "//third_party/libc++/src/include/__cxx03/typeinfo", @@ -1351,7 +918,6 @@ libcxx_headers = [ "//third_party/libc++/src/include/__cxx03/unordered_set", "//third_party/libc++/src/include/__cxx03/utility", "//third_party/libc++/src/include/__cxx03/valarray", - "//third_party/libc++/src/include/__cxx03/variant", "//third_party/libc++/src/include/__cxx03/vector", "//third_party/libc++/src/include/__cxx03/version", "//third_party/libc++/src/include/__cxx03/wchar.h", @@ -1390,6 +956,10 @@ libcxx_headers = [ "//third_party/libc++/src/include/__flat_map/sorted_equivalent.h", "//third_party/libc++/src/include/__flat_map/sorted_unique.h", "//third_party/libc++/src/include/__flat_map/utils.h", + "//third_party/libc++/src/include/__flat_set/flat_multiset.h", + "//third_party/libc++/src/include/__flat_set/flat_set.h", + "//third_party/libc++/src/include/__flat_set/ra_iterator.h", + "//third_party/libc++/src/include/__flat_set/utils.h", "//third_party/libc++/src/include/__format/buffer.h", "//third_party/libc++/src/include/__format/concepts.h", "//third_party/libc++/src/include/__format/container_adaptor.h", @@ -1460,12 +1030,14 @@ libcxx_headers = [ "//third_party/libc++/src/include/__fwd/get.h", "//third_party/libc++/src/include/__fwd/ios.h", "//third_party/libc++/src/include/__fwd/istream.h", + "//third_party/libc++/src/include/__fwd/map.h", "//third_party/libc++/src/include/__fwd/mdspan.h", "//third_party/libc++/src/include/__fwd/memory.h", "//third_party/libc++/src/include/__fwd/memory_resource.h", "//third_party/libc++/src/include/__fwd/ostream.h", "//third_party/libc++/src/include/__fwd/pair.h", "//third_party/libc++/src/include/__fwd/queue.h", + "//third_party/libc++/src/include/__fwd/set.h", "//third_party/libc++/src/include/__fwd/span.h", "//third_party/libc++/src/include/__fwd/sstream.h", "//third_party/libc++/src/include/__fwd/stack.h", @@ -1559,6 +1131,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__math/traits.h", "//third_party/libc++/src/include/__math/trigonometric_functions.h", "//third_party/libc++/src/include/__mbstate_t.h", + "//third_party/libc++/src/include/__mdspan/aligned_accessor.h", "//third_party/libc++/src/include/__mdspan/default_accessor.h", "//third_party/libc++/src/include/__mdspan/extents.h", "//third_party/libc++/src/include/__mdspan/layout_left.h", @@ -1583,6 +1156,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__memory/destroy.h", "//third_party/libc++/src/include/__memory/destruct_n.h", "//third_party/libc++/src/include/__memory/inout_ptr.h", + "//third_party/libc++/src/include/__memory/is_sufficiently_aligned.h", "//third_party/libc++/src/include/__memory/noexcept_move_assign_container.h", "//third_party/libc++/src/include/__memory/out_ptr.h", "//third_party/libc++/src/include/__memory/pointer_traits.h", @@ -1632,6 +1206,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/__numeric/midpoint.h", "//third_party/libc++/src/include/__numeric/partial_sum.h", "//third_party/libc++/src/include/__numeric/pstl.h", + "//third_party/libc++/src/include/__numeric/ranges_iota.h", "//third_party/libc++/src/include/__numeric/reduce.h", "//third_party/libc++/src/include/__numeric/saturation_arithmetic.h", "//third_party/libc++/src/include/__numeric/transform_exclusive_scan.h", @@ -1888,6 +1463,8 @@ libcxx_headers = [ "//third_party/libc++/src/include/__type_traits/negation.h", "//third_party/libc++/src/include/__type_traits/promote.h", "//third_party/libc++/src/include/__type_traits/rank.h", + "//third_party/libc++/src/include/__type_traits/reference_constructs_from_temporary.h", + "//third_party/libc++/src/include/__type_traits/reference_converts_from_temporary.h", "//third_party/libc++/src/include/__type_traits/remove_all_extents.h", "//third_party/libc++/src/include/__type_traits/remove_const.h", "//third_party/libc++/src/include/__type_traits/remove_const_ref.h", @@ -2012,6 +1589,7 @@ libcxx_headers = [ "//third_party/libc++/src/include/fenv.h", "//third_party/libc++/src/include/filesystem", "//third_party/libc++/src/include/flat_map", + "//third_party/libc++/src/include/flat_set", "//third_party/libc++/src/include/float.h", "//third_party/libc++/src/include/format", "//third_party/libc++/src/include/forward_list", diff --git a/patches/boringssl/expose_ripemd160.patch b/patches/boringssl/expose_ripemd160.patch index ad7ed38e1e07..5b3b1da23064 100644 --- a/patches/boringssl/expose_ripemd160.patch +++ b/patches/boringssl/expose_ripemd160.patch @@ -10,7 +10,7 @@ this patch is required to provide ripemd160 support in the nodejs crypto module. diff --git a/crypto/digest/digest_extra.cc b/crypto/digest/digest_extra.cc -index f68ede9156ee57526f4578953c350798a1299f00..1de18075e1cfa7f9660fa3b065cd20bafcbe7ee8 100644 +index 4cbfa1f53bb669c24c7f055f4fee7f144f72115a..120cb84e07e0539c038bca059b794d8f9f932a51 100644 --- a/crypto/digest/digest_extra.cc +++ b/crypto/digest/digest_extra.cc @@ -45,6 +45,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = { @@ -82,7 +82,7 @@ index e04b80cd6a1a215fc87f8fd8d750c3d258c3974f..8fdf1c624794f568bfc77b7b6b0c510b 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 b36c5885a31ff3242ac3104e6d875a008c7c39e4..8fe32508a00263295313e77992e2c208459ca42c 100644 +index 6abab7693ef2cf418e64d4bf5d53e7e0821cb731..ecbf81be6888cf2e95008da054cf4d3d7df6ad49 100644 --- a/include/openssl/digest.h +++ b/include/openssl/digest.h @@ -48,6 +48,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void); diff --git a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch index 4fab9c81ec1d..fcb55f5e9d9d 100644 --- a/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch +++ b/patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch @@ -20,7 +20,7 @@ index 2cdcbc346175eeee69402ecee7f169e61c655199..f7226fe711e4214b216ea2c5173a0212 case ssl_open_record_error: diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc -index d228b1c3b517e21fb8022c1927b0bc522f46bf78..4a94410d0ea4daabde1397c78c5e5de113398ddf 100644 +index 1b8ab541e0088034133bb7f34df60c2ef9685fb2..e5cc49f812110e4881294d3f8c366d11ce5e2d37 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc @@ -1205,7 +1205,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) { diff --git a/patches/chromium/.patches b/patches/chromium/.patches index a2d8912cccee..4198e846b0e4 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -146,4 +146,5 @@ fix_enable_wrap_iter_in_string_view_and_array.patch fix_linter_error.patch revert_enable_crel_for_arm32_targets.patch mac_fix_check_on_ime_reconversion_due_to_invalid_replacement_range.patch -fix_osr_stutter_fix_backport_for_electron.patch +chore_grandfather_in_electron_views_and_delegates.patch +refactor_patch_electron_permissiontypes_into_blink.patch diff --git a/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch b/patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch index 907a1bdf335f..d0f00ff10f09 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 0d8bb93bf146c3058a30693673f0c23fdea90ae8..55f76337a445345c06531ce05e603db30daf759f 100644 +index f78e6732f4a154b6a479bcfcdb237f0679a7fde3..c95b699fe2d37421ae589a14d51c5ffd4465860f 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -268,6 +268,10 @@ int GpuMain(MainFunctionParams parameters) { +@@ -254,6 +254,10 @@ int GpuMain(MainFunctionParams parameters) { // to the GpuProcessHost once the GpuServiceImpl has started. viz::GpuServiceImpl::InstallPreInitializeLogHandler(); @@ -24,7 +24,7 @@ index 0d8bb93bf146c3058a30693673f0c23fdea90ae8..55f76337a445345c06531ce05e603db3 // 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 -@@ -378,7 +382,6 @@ int GpuMain(MainFunctionParams parameters) { +@@ -364,7 +368,6 @@ int GpuMain(MainFunctionParams parameters) { #endif const bool dead_on_arrival = !init_success; diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index fe920c58a476..a968a4eb0092 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index 44da0544b778d6ff4c14b6f4e8463cb8260d2f0d..8ae8939af4141a684b7a6d50a43e1abb int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 4185aa3e07df8f2a3061d18e87f39cd5d79baead..81261373a194210d97c723ed525cb75a2bbeafad 100644 +index afb727a7f99f240e4d59970a169c2ea2265df98a..2d9453a5f38793eb112d52e4345fc9ff9dff3539 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4802,6 +4802,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4810,6 +4810,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } @@ -79,10 +79,10 @@ index f7e0144c74f879e9b29871d7c372b99e127966bb..c3cd7b77ed282f212a56d151dc3fbec3 if (World().IsMainWorld()) { probe::DidCreateMainWorldContext(GetFrame()); 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 8bb6b0465069529f79aaec21792e8b159535b3e9..f9782531c639d07002dda07732750a0007109468 100644 +index 3e041fb162ebdf8b0a04aff930b8161a37d6c4ed..8019c126e5a3132e236f169576738deffc2e31c2 100644 --- a/third_party/blink/renderer/core/frame/local_frame_client.h +++ b/third_party/blink/renderer/core/frame/local_frame_client.h -@@ -299,6 +299,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { +@@ -300,6 +300,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient { virtual void DidCreateScriptContext(v8::Local, int32_t world_id) = 0; @@ -92,7 +92,7 @@ index 8bb6b0465069529f79aaec21792e8b159535b3e9..f9782531c639d07002dda07732750a00 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 66cc44003157657c68e90d295f877789395eca8d..19cd8460711d5d5b1b76c9e4cb82ed7fc71b410c 100644 +index bcdb1c4a762ee11bef513c4ca5b3b34f721bfd2b..598d3c504dc95ce618846fa4f06d9db65903db85 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 @@ -295,6 +295,13 @@ void LocalFrameClientImpl::DidCreateScriptContext( @@ -110,7 +110,7 @@ index 66cc44003157657c68e90d295f877789395eca8d..19cd8460711d5d5b1b76c9e4cb82ed7f 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 4c7375a27a22f04694e14fecc17d633734d4cccc..ea2a32b151aaf07b5704e463d01714eb41680afb 100644 +index e38686bcbbc374d356be2705f4927903e64a7e6f..09a42b6595cb6593e94cc7496ff197e807993a5a 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 @@ -82,6 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient { @@ -123,10 +123,10 @@ index 4c7375a27a22f04694e14fecc17d633734d4cccc..ea2a32b151aaf07b5704e463d01714eb 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 286d95397da7b90ba28b4c4faaae26d6ab71a496..23fd67571152897b3bc93fde8e98e1d554cce275 100644 +index 4c36621228bb712e4a8bbac7f5f405da5e9eeeec..aef4cdbc206889f053007696504cb9cd235c688d 100644 --- a/third_party/blink/renderer/core/loader/empty_clients.h +++ b/third_party/blink/renderer/core/loader/empty_clients.h -@@ -417,6 +417,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { +@@ -418,6 +418,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient { void DidCreateScriptContext(v8::Local, int32_t world_id) override {} diff --git a/patches/chromium/adjust_accessibility_ui_for_electron.patch b/patches/chromium/adjust_accessibility_ui_for_electron.patch index 0eab8c33d29a..b01eca93f58f 100644 --- a/patches/chromium/adjust_accessibility_ui_for_electron.patch +++ b/patches/chromium/adjust_accessibility_ui_for_electron.patch @@ -10,7 +10,7 @@ usage of BrowserList and Browser as we subclass related methods and use our WindowList. diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc -index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f175743848e0cc2e 100644 +index c642d01c1767847d97281da8829653ba4f223b2b..3047367449b8c21c3a065d62e70a44aa9ef8003e 100644 --- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc +++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc @@ -48,6 +48,7 @@ @@ -21,7 +21,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 #include "ui/accessibility/accessibility_features.h" #include "ui/accessibility/ax_updates_and_events.h" #include "ui/accessibility/platform/ax_platform_node.h" -@@ -171,7 +172,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) { +@@ -166,7 +167,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) { rvh->GetRoutingID(), accessibility_mode); } @@ -30,7 +30,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 base::Value::Dict BuildTargetDescriptor(Browser* browser) { base::Value::Dict target_data; target_data.Set(kSessionIdField, browser->session_id().id()); -@@ -192,7 +193,7 @@ void HandleAccessibilityRequestCallback( +@@ -187,7 +188,7 @@ void HandleAccessibilityRequestCallback( DCHECK(ShouldHandleAccessibilityRequestCallback(path)); base::Value::Dict data; @@ -38,9 +38,9 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 + PrefService* pref = static_cast(current_context)->prefs(); ui::AXMode mode = content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode(); - bool is_a11y_allowed = content::BrowserAccessibilityState::GetInstance() -@@ -221,7 +222,7 @@ void HandleAccessibilityRequestCallback( - data.Set(kPDFPrinting, pdf_printing ? kOn : kOff); + bool native = mode.has_mode(ui::AXMode::kNativeAPIs); +@@ -212,7 +213,7 @@ void HandleAccessibilityRequestCallback( + data.Set(kPDFPrinting, pdf_printing); std::string pref_api_type = - pref->GetString(prefs::kShownAccessibilityApiType); @@ -48,7 +48,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 bool pref_api_type_supported = false; std::vector supported_api_types = -@@ -288,11 +289,11 @@ void HandleAccessibilityRequestCallback( +@@ -279,11 +280,11 @@ void HandleAccessibilityRequestCallback( data.Set(kPagesField, std::move(page_list)); base::Value::List browser_list; @@ -62,7 +62,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 data.Set(kBrowsersField, std::move(browser_list)); std::string json_string; -@@ -762,7 +763,8 @@ void AccessibilityUIMessageHandler::SetGlobalString( +@@ -753,7 +754,8 @@ void AccessibilityUIMessageHandler::SetGlobalString( const std::string value = CheckJSValue(data.FindString(kValueField)); if (string_name == kApiTypeField) { @@ -72,7 +72,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 pref->SetString(prefs::kShownAccessibilityApiType, value); } } -@@ -816,7 +818,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( +@@ -807,7 +809,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -82,7 +82,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 ui::AXApiType::Type api_type = ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType)); std::string accessibility_contents = -@@ -843,6 +846,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -834,6 +837,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( AXPropertyFilter::ALLOW_EMPTY); AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY); @@ -90,7 +90,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 for (Browser* browser : *BrowserList::GetInstance()) { if (browser->session_id().id() == session_id) { base::Value::Dict result = BuildTargetDescriptor(browser); -@@ -855,6 +859,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( +@@ -846,6 +850,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree( return; } } @@ -98,7 +98,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 #endif // !BUILDFLAG(IS_ANDROID) // No browser with the specified |session_id| was found. base::Value::Dict result; -@@ -898,11 +903,13 @@ void AccessibilityUIMessageHandler::StopRecording( +@@ -889,11 +894,13 @@ void AccessibilityUIMessageHandler::StopRecording( } ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() { @@ -115,7 +115,7 @@ index 628fe5557f963c52cbe0c5b24c6e06aaa81f9677..868f5eb60c35dfaa0a4e33e7f1757438 // Check to see if it is in the supported types list. if (std::find(supported_types.begin(), supported_types.end(), api_type) == supported_types.end()) { -@@ -972,8 +979,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( +@@ -963,8 +970,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents( // static void AccessibilityUIMessageHandler::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { 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 510696788770..3d1baa2255ca 100644 --- a/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc -index 6c679ef877067297ec3bf1a23af6c03a2af8dcf5..1ac93433189580c13b69cd52ce62681a8620da3d 100644 +index a4ed89e2211ad793310c0595d329dbbd4b2c0b34..73a14f1569329baa0830d5cf8c993fe9264f7c74 100644 --- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc +++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc @@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast { @@ -23,10 +23,10 @@ index 6c679ef877067297ec3bf1a23af6c03a2af8dcf5..1ac93433189580c13b69cd52ce62681a return receiver_.BindNewEndpointAndPassDedicatedRemote(); } diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 6c1e46e58d975137eee6c0fd7b01d2ae970a2e10..5ca29616369e76e298eb03188e18ca545c76a162 100644 +index 00b1dc2ab7661d9ab76d0c6787bfe406327039ad..22c2a68428ed881b63e4458d17d5ff542cefe559 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -765,6 +765,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -763,6 +763,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -116,10 +116,10 @@ index b1689844282d6917b9750fbc6a875848ddf84b70..f1cc159b7c3448a33a6d9e213f8fbd3b // 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 c1af09d0a80ffba9b1265e59cf3d066ad2a5bfa0..fbfc0af8a6f29da9ee2d5fd6ae5a02958a7e3a81 100644 +index 1af1fa035b3da8967526d704e362ddbc5c3194ac..f470ada1bf84938427fb89f4508e5f56aaeebc1f 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -2465,6 +2465,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( +@@ -2466,6 +2466,10 @@ void WebViewImpl::SetPageLifecycleStateInternal( TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal", "old_state", old_state, "new_state", new_state); @@ -130,7 +130,7 @@ index c1af09d0a80ffba9b1265e59cf3d066ad2a5bfa0..fbfc0af8a6f29da9ee2d5fd6ae5a0295 bool storing_in_bfcache = new_state->is_in_back_forward_cache && !old_state->is_in_back_forward_cache; bool restoring_from_bfcache = !new_state->is_in_back_forward_cache && -@@ -3988,10 +3992,23 @@ PageScheduler* WebViewImpl::Scheduler() const { +@@ -3989,10 +3993,23 @@ PageScheduler* WebViewImpl::Scheduler() const { return GetPage()->GetPageScheduler(); } diff --git a/patches/chromium/blink_local_frame.patch b/patches/chromium/blink_local_frame.patch index da9ec05ec8e1..5396ead00422 100644 --- a/patches/chromium/blink_local_frame.patch +++ b/patches/chromium/blink_local_frame.patch @@ -15,7 +15,7 @@ Refs changes in: This patch reverts the changes to fix associated crashes in Electron. diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc -index 9dc450bc20744463c8898bc822a558be38486493..576421cb9600625ad8b9eda25cb99954092a7a37 100644 +index 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d0482bf20664 100644 --- a/third_party/blink/renderer/core/frame/frame.cc +++ b/third_party/blink/renderer/core/frame/frame.cc @@ -134,14 +134,6 @@ bool Frame::Detach(FrameDetachType type) { @@ -49,10 +49,10 @@ index 9dc450bc20744463c8898bc822a558be38486493..576421cb9600625ad8b9eda25cb99954 // 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 1a032c3a8eec55e98da745e7f82b311b1e0bd8ba..19efdf1f30eb5409f9d8a64f008891a2f4bda47c 100644 +index d59385c12597881a4dc97ff996844206e899ab02..a4ac1a3d0d6390b5826195f72abc4544cdc2bf14 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -748,10 +748,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -750,10 +750,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { } DCHECK(!view_ || !view_->IsAttached()); @@ -63,7 +63,7 @@ index 1a032c3a8eec55e98da745e7f82b311b1e0bd8ba..19efdf1f30eb5409f9d8a64f008891a2 if (!Client()) return false; -@@ -805,6 +801,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { +@@ -807,6 +803,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { DCHECK(!view_->IsAttached()); Client()->WillBeDetached(); diff --git a/patches/chromium/build_add_electron_tracing_category.patch b/patches/chromium/build_add_electron_tracing_category.patch index 9b087aa5845b..b2495de6a898 100644 --- a/patches/chromium/build_add_electron_tracing_category.patch +++ b/patches/chromium/build_add_electron_tracing_category.patch @@ -8,7 +8,7 @@ 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 45c518185da68419e0f482acba359f02c2152f88..a0e35f118f0b1f767b41676d651a575e8b5fddb4 100644 +index 5e0f05804e8142c735fa2f5afb27485caae895f9..48ac9a600b6a007e2e974b657c3d8048be97b3ce 100644 --- a/base/trace_event/builtin_categories.h +++ b/base/trace_event/builtin_categories.h @@ -91,6 +91,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS( diff --git a/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch b/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch index c6c5e13bcf57..8805a5a1cf15 100644 --- a/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch +++ b/patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch @@ -10,10 +10,10 @@ Needed for: 2) //electron/shell/common:web_contents_utility diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn -index 55921115094f7437ce10db1cac1debe9adc10ea9..7040d83af340f052f5cab4437433e3dd0a688390 100644 +index 35fc76646e912075c744b48b5ddec73f885ea5e8..6ce2825bf558d5f50b9df45227284103375aa2e4 100644 --- a/content/public/common/BUILD.gn +++ b/content/public/common/BUILD.gn -@@ -379,6 +379,8 @@ mojom("interfaces") { +@@ -381,6 +381,8 @@ mojom("interfaces") { "//content/common/*", "//extensions/common:mojom", "//extensions/common:mojom_blink", diff --git a/patches/chromium/build_allow_electron_to_use_exec_script.patch b/patches/chromium/build_allow_electron_to_use_exec_script.patch index 31c3790c8525..ccdaf449f0a1 100644 --- a/patches/chromium/build_allow_electron_to_use_exec_script.patch +++ b/patches/chromium/build_allow_electron_to_use_exec_script.patch @@ -6,7 +6,7 @@ Subject: build: allow electron to use exec_script This is similar to the //build usecase so we're OK adding ourselves here diff --git a/.gn b/.gn -index 54d2631ec203207f44038a36439613709fec1669..c8b8f604f9e9d960e8144a93d958ab125aae96c5 100644 +index b8756e53903be9d9760080391b0fc50909945749..ce957d8efd45f546db5d695e3ad1c660217be5e1 100644 --- a/.gn +++ b/.gn @@ -173,4 +173,26 @@ exec_script_allowlist = 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 d424e470323e..3d63b35dd166 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,7 +11,7 @@ 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 95c73dcb082999d0a85d82f1fe330d27c88055ca..64cd976eba849435779b280b2941f9150b5d1d36 100644 +index 69502170fe7a4d37773ad3e9cd7eeaf63fe1984d..fe0de5d0ec23121bd43acd641afcab2e50573a68 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn @@ -200,11 +200,16 @@ if (!is_android && !is_mac) { @@ -33,10 +33,10 @@ index 95c73dcb082999d0a85d82f1fe330d27c88055ca..64cd976eba849435779b280b2941f915 "//base", "//build:branding_buildflags", diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index fd02559a88b339ebd70e08d11d294975f1ef3148..c304e3d04364b071465a513a7953b3d1f0d3a38e 100644 +index 988dc42922d50dec0bacb0627dda1d81feec6ee1..4ae5982ea87987e7cb8ba671175953c1c48faf00 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -4591,7 +4591,7 @@ static_library("browser") { +@@ -4595,7 +4595,7 @@ static_library("browser") { [ "//chrome/browser/ui/webui/signin:profile_impl" ] } @@ -46,10 +46,10 @@ index fd02559a88b339ebd70e08d11d294975f1ef3148..c304e3d04364b071465a513a7953b3d1 # than here in :chrome_dll. deps += [ "//chrome:packed_resources_integrity_header" ] diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 48488b2b31ff39e3fe822aa388e1c89578eb2575..9ba26245243d37683f3161c89411cacdcfaeceb7 100644 +index cc61e7228cc20219cd7c41b39e139a9f9bc42c90..384b78c0910a4534cbef4f1af821a2a629d6d3a6 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn -@@ -7086,9 +7086,12 @@ test("unit_tests") { +@@ -7153,9 +7153,12 @@ test("unit_tests") { "//chrome/notification_helper", ] @@ -63,7 +63,7 @@ index 48488b2b31ff39e3fe822aa388e1c89578eb2575..9ba26245243d37683f3161c89411cacd "//chrome//services/util_win:unit_tests", "//chrome/app:chrome_dll_resources", "//chrome/app:win_unit_tests", -@@ -8054,6 +8057,10 @@ test("unit_tests") { +@@ -8120,6 +8123,10 @@ test("unit_tests") { "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", ] @@ -74,7 +74,7 @@ index 48488b2b31ff39e3fe822aa388e1c89578eb2575..9ba26245243d37683f3161c89411cacd sources += [ # The importer code is not used on Android. "../common/importer/firefox_importer_utils_unittest.cc", -@@ -8109,7 +8116,6 @@ test("unit_tests") { +@@ -8175,7 +8182,6 @@ test("unit_tests") { # Non-android deps for "unit_tests" target. deps += [ "../browser/screen_ai:screen_ai_install_state", diff --git a/patches/chromium/build_libc_as_static_library.patch b/patches/chromium/build_libc_as_static_library.patch index f22d990128a0..8512092792a4 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 fd41146966f8cd559e99eb58c0831acdce9fbc6a..acc60f67732179ac6ed7161478686b6e3778731c 100644 +index 4bb53257492b3866eeb8a9fde433f363fd263be0..b758ddd025f74fdcdc66067c783e86f299c34973 100644 --- a/buildtools/third_party/libc++/BUILD.gn +++ b/buildtools/third_party/libc++/BUILD.gn -@@ -265,7 +265,11 @@ libcxx_modules("std_wctype_h") { +@@ -291,7 +291,11 @@ libcxx_modules("std_wctype_h") { if (libcxx_is_shared) { _libcxx_target_type = "shared_library" } else { @@ -23,7 +23,7 @@ index fd41146966f8cd559e99eb58c0831acdce9fbc6a..acc60f67732179ac6ed7161478686b6e } target(_libcxx_target_type, "libc++") { -@@ -274,6 +278,7 @@ target(_libcxx_target_type, "libc++") { +@@ -300,6 +304,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 9efd3bd665c1..19065c313c93 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 9e95917b0808ddcb6e0b1359fb5a86a516e4a071..ea6ba910234659d1213b1f3f624da0f49b851725 100644 +index d05f8147a0d38930483c201d61546f1da8db4769..c88d80416ac7b6c76ff3e11016d2e20601e89d38 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -9638,6 +9638,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -9764,6 +9764,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 9e95917b0808ddcb6e0b1359fb5a86a516e4a071..ea6ba910234659d1213b1f3f624da0f4 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 9c0ef713978f40d8ddda6772004fc81f37eafb6f..d7bf74c206cedc628d0b92fff25c29393f6c9d95 100644 +index 503a7af9740eb492db21e5bcf9b96e49ebaefe1f..87eb1f54dc33211cd69a95a1d5b4b000e9882bf1 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5087,6 +5087,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5101,6 +5101,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params, opener); @@ -37,7 +37,7 @@ index 9c0ef713978f40d8ddda6772004fc81f37eafb6f..d7bf74c206cedc628d0b92fff25c2939 // If the new frame has a name, make sure any SiteInstances that can find // this named frame have proxies for it. Must be called after // SetSessionStorageNamespace, since this calls CreateRenderView, which uses -@@ -5128,12 +5134,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5142,12 +5148,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( AddWebContentsDestructionObserver(new_contents_impl); } @@ -66,7 +66,7 @@ index 55bb4ae3bab4cdf20b3e1dde9450a5c0e4e62b37..fe444c7fa140166a1b65c7a8a2676e2d // 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 c5b548159e64ef3b8d27e1d7e8147289064f6e8a..1c4dd9d0c16751f34d59088e68e23317b8d25437 100644 +index 95b6e381f139d519fd65a258b03aecb2cf327532..5dc0f67f97c7a0b3f7752462006c56a4d570c8b1 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -820,6 +820,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -79,10 +79,10 @@ index c5b548159e64ef3b8d27e1d7e8147289064f6e8a..1c4dd9d0c16751f34d59088e68e23317 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 921a6a8f7ecbdd2e3fa8a9888e4a34f1b0cf7e09..7cfc3331a004fd52d9863a097271f4d892480933 100644 +index 9a1edb51e6e98332a9b96b52fee6b97c75ba8e80..bc948f100fc20958f021da3b3b3005badfcb4f1a 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -198,6 +198,7 @@ class NetworkService; +@@ -199,6 +199,7 @@ class NetworkService; class TrustedURLLoaderHeaderClient; } // namespace mojom struct ResourceRequest; @@ -90,7 +90,7 @@ index 921a6a8f7ecbdd2e3fa8a9888e4a34f1b0cf7e09..7cfc3331a004fd52d9863a097271f4d8 } // namespace network namespace sandbox { -@@ -1372,6 +1373,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1376,6 +1377,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -148,10 +148,10 @@ index da319cb20733150366d85bee95609f0f2d9def7f..8a18958035cc1dd26be558349f64f772 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 0755a49ee7558ee0c5e76f602c514bb8a7c3a019..4185aa3e07df8f2a3061d18e87f39cd5d79baead 100644 +index f27a9538481a78c0defc4ed80b0efb3132298f56..afb727a7f99f240e4d59970a169c2ea2265df98a 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -6927,6 +6927,10 @@ WebView* RenderFrameImpl::CreateNewWindow( +@@ -6936,6 +6936,10 @@ WebView* RenderFrameImpl::CreateNewWindow( request.HasUserGesture(), GetWebFrame()->IsAdFrame(), GetWebFrame()->IsAdScriptInStack()); @@ -210,10 +210,10 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a } // 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 f4a1ed78679c5efaea6494a4aa8b22fff31cba1b..afa637807b0a5bdef126031f219115ecee8d478d 100644 +index de39a688207f81143c59ad54385642389b0fcc4e..93c5b79727674ff1c5344d39fd7bcd07c3101424 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc -@@ -2272,6 +2272,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, +@@ -2280,6 +2280,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate, WebWindowFeatures window_features = GetWindowFeaturesFromString(features, entered_window); diff --git a/patches/chromium/chore_add_electron_deps_to_gitignores.patch b/patches/chromium/chore_add_electron_deps_to_gitignores.patch index b45633da1f13..da245d70f50f 100644 --- a/patches/chromium/chore_add_electron_deps_to_gitignores.patch +++ b/patches/chromium/chore_add_electron_deps_to_gitignores.patch @@ -6,7 +6,7 @@ Subject: chore: add electron deps to gitignores Makes things like "git status" quicker when developing electron locally diff --git a/.gitignore b/.gitignore -index 375db3d02ce2837ba69e3e93c38cde7153ba079f..fc3f4f71c43facf695d326f0bc64e0ad920aa9ac 100644 +index 0a0f0118d5c1a5a2f3ad28b068bebb849eba7246..5ca6d03b709ef119ccd6482b2f305f8a3aeb7438 100644 --- a/.gitignore +++ b/.gitignore @@ -217,6 +217,7 @@ vs-chromium-project.txt diff --git a/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch b/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch new file mode 100644 index 000000000000..c19db7f2b7c6 --- /dev/null +++ b/patches/chromium/chore_grandfather_in_electron_views_and_delegates.patch @@ -0,0 +1,93 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Charles Kerr +Date: Mon, 14 Apr 2025 11:34:25 -0500 +Subject: chore: "grandfather in" Electron Views and Delegates + +6441736: Block further usage of WidgetDelegateView. | https://chromium-review.googlesource.com/c/chromium/src/+/6441736 + +6442265: Add a PassKey for std::make_unique(). | https://chromium-review.googlesource.com/c/chromium/src/+/6442265 + +6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510 + +diff --git a/ui/views/view.h b/ui/views/view.h +index ae7eab37f12ba80ec423d229cf048021e9ba6765..507a75dc7947295db221b01356fa57baf3cf03e4 100644 +--- a/ui/views/view.h ++++ b/ui/views/view.h +@@ -82,6 +82,19 @@ class ArcNotificationContentView; + class WideFrameView; + } // namespace ash + ++namespace electron { ++class DevToolsWindowDelegate; ++class InspectableWebContentsView; ++class MenuBar; ++class RootView; ++class RootViewMac; ++} ++ ++namespace electron::api { ++class ImageView; ++class View; ++} ++ + namespace exo { + class ShellSurfaceBase; + } +@@ -324,6 +337,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, + public: + class OwnedByClientPassKey { + private: ++ // TODO(ckerr) can this list be shortened? ++ friend class electron::DevToolsWindowDelegate; ++ friend class electron::InspectableWebContentsView; ++ friend class electron::MenuBar; ++ friend class electron::RootView; ++ friend class electron::RootViewMac; ++ friend class electron::api::ImageView; ++ friend class electron::api::View; + // DO NOT ADD TO THIS LIST! + // These existing cases are "grandfathered in", but there shouldn't be more. + // See comments atop class. +diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h +index 7c2463cb91d00de2b0fa4f10221ea960be860d9a..0d5c63e7efbe42d5352abdeb594175904af30c41 100644 +--- a/ui/views/widget/widget_delegate.h ++++ b/ui/views/widget/widget_delegate.h +@@ -169,6 +169,13 @@ namespace data_controls { + class DesktopDataControlsDialog; + } + ++namespace electron { ++class AutofillPopupView; ++class DevToolsWindowDelegate; ++class NativeWindowMac; ++class NativeWindowViews; ++} ++ + namespace enterprise_connectors { + class ContentAnalysisDialog; + class ContentAnalysisDialogBehaviorBrowserTest; +@@ -371,6 +378,7 @@ class VIEWS_EXPORT WidgetDelegate { + + class OwnedByWidgetPassKey { + private: ++ friend class electron::DevToolsWindowDelegate; + // DO NOT ADD TO THIS LIST! + // These existing cases are "grandfathered in", but there shouldn't be more. + // See comments atop `SetOwnedByWidget()`. +@@ -468,6 +476,8 @@ class VIEWS_EXPORT WidgetDelegate { + }; + class RegisterDeleteCallbackPassKey { + private: ++ friend class electron::NativeWindowMac; ++ friend class electron::NativeWindowViews; + // DO NOT ADD TO THIS LIST! + // These existing cases are "grandfathered in", but there shouldn't be more. + // See comments atop `RegisterDeleteDelegateCallback()`. +@@ -918,6 +928,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View { + View* GetContentsView() override; + + private: ++ friend class electron::AutofillPopupView; + // DO NOT ADD TO THIS LIST! + // These existing cases are "grandfathered in", but there shouldn't be more. + // See comments atop class. diff --git a/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch b/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch index 7c3a128ce7dc..3ddc9ad40779 100644 --- a/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch +++ b/patches/chromium/chore_modify_chromium_handling_of_mouse_events.patch @@ -34,10 +34,10 @@ index 39b5a8fdd165efd74b00256552b51b5413107958..bfc4ef4f50efff4a77f2aef64335bb7e class ScrollEvent; 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 19826b92b39c812a3170bfa470a08192b2a712bc..d97262cc28622de335bfe5a82c26779e9dccd586 100644 +index a86e512dd7ecb7e30714ea2709c1704b406e561f..f55fd8343052c1d9c0a7f21af7c7d92aa2745d5a 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 -@@ -1387,6 +1387,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged( +@@ -1416,6 +1416,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged( window()->SetProperty(aura::client::kHeadlessBoundsKey, bounds); } @@ -49,22 +49,22 @@ index 19826b92b39c812a3170bfa470a08192b2a712bc..d97262cc28622de335bfe5a82c26779e DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() { return new DesktopNativeCursorManagerWin(); diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index 2ee5e4b4673f4f18880dddecc48118c89823fd3f..37109b8d3d439073b5c9e2ea3597c36f32de5704 100644 +index 3893534a89947a59c5a5c4e6dc3953047817a59e..5ba94748640c2c137833add6b95cfd8962e7fdb6 100644 --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -@@ -268,6 +268,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin : public DesktopWindowTreeHost, +@@ -271,6 +271,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin void HandleWindowSizeUnchanged() override; void HandleWindowScaleFactorChanged(float window_scale_factor) override; void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override; + bool HandleMouseEventForCaption(UINT message) const override; - // Overridden from WidgetObserver. - void OnWidgetThemeChanged(Widget* widget) override; + Widget* GetWidget(); + const Widget* GetWidget() const; diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 1cf98eadc8cbc1ada481c709a873dc1dd443de66..cec234006cbcacff953ce9ff4175006b057aa341 100644 +index 5a1533b01946b76de2c2aaad137e14c4d7a00a3c..0113b1bce0eb7a7e3dfb3154a4844a9943b8633e 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3177,15 +3177,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3196,15 +3196,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } // We must let Windows handle the caption buttons if it's drawing them, or // they won't work. @@ -86,7 +86,7 @@ index 1cf98eadc8cbc1ada481c709a873dc1dd443de66..cec234006cbcacff953ce9ff4175006b return 0; } } -@@ -3208,6 +3212,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3227,6 +3231,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, // handle alt-space, or in the frame itself. is_right_mouse_pressed_on_caption_ = false; ReleaseCapture(); @@ -94,7 +94,7 @@ index 1cf98eadc8cbc1ada481c709a873dc1dd443de66..cec234006cbcacff953ce9ff4175006b // |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu() // expect screen coordinates. POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param); -@@ -3215,7 +3220,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3234,7 +3239,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, w_param = static_cast(SendMessage( hwnd(), WM_NCHITTEST, 0, MAKELPARAM(screen_point.x, screen_point.y))); if (w_param == HTCAPTION || w_param == HTSYSMENU) { @@ -114,10 +114,10 @@ index 1cf98eadc8cbc1ada481c709a873dc1dd443de66..cec234006cbcacff953ce9ff4175006b } } else if (message == WM_NCLBUTTONDOWN && diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h -index 83c26bf2b4bc11c0e3d839093eea56eed1bf581b..075e456e851bbde2b0174ca0cc34428cc32b6966 100644 +index 94a23d66c6a88e398178f84bfc6f0531c1efa41d..b46775a5b3aab8ec859e9fe42c925369bf9b93ed 100644 --- a/ui/views/win/hwnd_message_handler_delegate.h +++ b/ui/views/win/hwnd_message_handler_delegate.h -@@ -255,6 +255,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { +@@ -258,6 +258,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { // Called when the headless window bounds has changed. virtual void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) = 0; diff --git a/patches/chromium/chore_partial_revert_of.patch b/patches/chromium/chore_partial_revert_of.patch index af244fb88baf..5584e274302f 100644 --- a/patches/chromium/chore_partial_revert_of.patch +++ b/patches/chromium/chore_partial_revert_of.patch @@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it by changing something in Electron. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 51355738262d80afaf1f319b5d90c8a74d435ffd..2a17aa6a3f687d60a7ca0e839e59f637819a9376 100644 +index ae5c9abd3c9374ad3f7a76d74420d0e723a4156a..3b0faab24a3b1d4bd194d18fdef02706362de39d 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5006,7 +5006,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -5020,7 +5020,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( : IsGuest(); // While some guest types do not have a guest SiteInstance, the ones that // don't all override WebContents creation above. diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 6dbe4f0b55e6..8355f156e0ac 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -80,10 +80,10 @@ index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d content::WebContents* source, const content::OpenURLParams& params, diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc -index 9ccf763fcbc717480c4dfce735f273dfdbf5cd4a..381cda59465f34a46f55d03ef6ccd53fadec6e6e 100644 +index 9f8d54657cb605e33c59ab6faed575636fba733a..01a115e570e0f0ae28cda448f9284fae65d9dedf 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc -@@ -2267,12 +2267,11 @@ bool Browser::IsWebContentsCreationOverridden( +@@ -2298,12 +2298,11 @@ bool Browser::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -99,10 +99,10 @@ index 9ccf763fcbc717480c4dfce735f273dfdbf5cd4a..381cda59465f34a46f55d03ef6ccd53f WebContents* Browser::CreateCustomWebContents( diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h -index 288d4f6d7dfdcf7e518f78990f061f4215f1b975..3d8899e313906a0d3a273d43cab872243fa6faea 100644 +index 36e68b4d128016b1a77edf9467d42c6d1ab729fa..837a545c9ab0cb9fe8dd28fecd71f29b7b60fafc 100644 --- a/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h -@@ -983,8 +983,7 @@ class Browser : public TabStripModelObserver, +@@ -1011,8 +1011,7 @@ class Browser : public TabStripModelObserver, content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -218,10 +218,10 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17 content::WebContents* AddNewContents( content::WebContents* source, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 30593ec9ecd2b135a6054ed50e95c849c09b47bd..b6870d74a761a847e9952d409b37ddb778790b08 100644 +index c7b606450604fe58ca2a19610a8c7784464536ab..84c70711d45b20c22c498c4475c5cf94567d16d2 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4969,8 +4969,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4983,8 +4983,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( // TODO(crbug.com/40202416): Support a way for MPArch guests to support this. if (delegate_ && delegate_->IsWebContentsCreationOverridden( source_site_instance, params.window_container_type, @@ -352,10 +352,10 @@ index 2dcf51f335f5dac39f431c3e0f56f8789f33d40b..2b433624d0604e0b9da5117b9e83cc15 content::RenderFrameHost* opener, content::SiteInstance* source_site_instance, diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc -index 635050eedc20fb89608677bcebeb5f8187bd4b59..1220f377169f8209db39654b7ddbf1da52c017b7 100644 +index 7345b06ac0ac88441af6a98c00dbfbb2b3089a6d..bedbcc2aa4fd4d950615a011d40c019d64c6e473 100644 --- a/fuchsia_web/webengine/browser/frame_impl.cc +++ b/fuchsia_web/webengine/browser/frame_impl.cc -@@ -575,8 +575,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( +@@ -576,8 +576,7 @@ bool FrameImpl::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, @@ -394,10 +394,10 @@ index 7ca1e83ba1fd2dc5ea7c7ce644c3b7c54b9999f9..c1639653714d6973bcb5a0b37cb7028d ->options() ->block_new_web_contents(); diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc -index bf432db4ca8463f2451dc09d5ca484da1235634f..e144be74ce2d34f50d26d08d5bf206f7aa64c5d3 100644 +index 250e7f524a9ab1cc6fda2bfefb3c78a8e971b625..55a0db02885a85e538d267402cfd0ac8ce52b921 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc -@@ -487,8 +487,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( +@@ -489,8 +489,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( content::SiteInstance* source_site_instance, content::mojom::WindowContainerType window_container_type, const GURL& opener_url, diff --git a/patches/chromium/crash_allow_setting_more_options.patch b/patches/chromium/crash_allow_setting_more_options.patch index b49b4a4da8a5..78b4b39481f6 100644 --- a/patches/chromium/crash_allow_setting_more_options.patch +++ b/patches/chromium/crash_allow_setting_more_options.patch @@ -116,10 +116,10 @@ index 42fe73aefe44f218d6a5e8cb1550ff48859c4b70..a1235f0c7ad44ae9c9fdc805af5b9dc5 arguments.push_back("--monitor-self"); } diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc -index 0e00d26f79231a01e88981b30ff950e427cd31f4..70f014c75031f9529501e102f97e0e1adadb8ffb 100644 +index 5b811cbbc51544cbff7c2e99c3a7ced824990002..f2376d74fbd2c8196184035fc0fb24a0a8ebfe0e 100644 --- a/components/crash/core/app/crashpad_win.cc +++ b/components/crash/core/app/crashpad_win.cc -@@ -92,6 +92,7 @@ bool PlatformCrashpadInitialization( +@@ -93,6 +93,7 @@ bool PlatformCrashpadInitialization( std::map process_annotations; GetPlatformCrashpadAnnotations(&process_annotations); @@ -127,7 +127,7 @@ index 0e00d26f79231a01e88981b30ff950e427cd31f4..70f014c75031f9529501e102f97e0e1a std::string url = crash_reporter_client->GetUploadUrl(); -@@ -129,6 +130,13 @@ bool PlatformCrashpadInitialization( +@@ -133,6 +134,13 @@ bool PlatformCrashpadInitialization( std::vector arguments(start_arguments); diff --git a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch index 3b9e069bb126..6bd2adcffa56 100644 --- a/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch +++ b/patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch @@ -7,10 +7,10 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 2474e8c608956bcf50e0c7204d728854fe498d31..32f3a69ea003d7c6a1f6a15622ff2acb9b5a063b 100644 +index 7550d3eb796059aeb108f25071c8028bddebb100..db59a147bd6b4fb596170d9b86c5e71a20b62abc 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -272,8 +272,13 @@ void AsanProcessInfoCB(const char*, bool*) { +@@ -273,8 +273,13 @@ void AsanProcessInfoCB(const char*, bool*) { } #endif // defined(ADDRESS_SANITIZER) @@ -25,7 +25,7 @@ index 2474e8c608956bcf50e0c7204d728854fe498d31..32f3a69ea003d7c6a1f6a15622ff2acb #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) base::FileDescriptorStore& file_descriptor_store = base::FileDescriptorStore::GetInstance(); -@@ -302,11 +307,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, +@@ -303,11 +308,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line, #endif // V8_USE_EXTERNAL_STARTUP_DATA @@ -40,7 +40,7 @@ index 2474e8c608956bcf50e0c7204d728854fe498d31..32f3a69ea003d7c6a1f6a15622ff2acb #endif // V8_USE_EXTERNAL_STARTUP_DATA } -@@ -979,7 +985,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { +@@ -980,7 +986,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) { return TerminateForFatalInitializationError(); #endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE) diff --git a/patches/chromium/disable_compositor_recycling.patch b/patches/chromium/disable_compositor_recycling.patch index 6178e0cd02e5..a07185e82f05 100644 --- a/patches/chromium/disable_compositor_recycling.patch +++ b/patches/chromium/disable_compositor_recycling.patch @@ -6,10 +6,10 @@ 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 1a726fb4a9e8173dc7da6901eb1632c7f326358e..ae8a4117db2f6bac1d62981e7c0e35cf1eee68da 100644 +index 88a6090a49da6071fded348a901c7c62b647b503..cf6f80bd3c9af0be5065e75e09a1b4150aeab0c8 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -561,7 +561,11 @@ +@@ -560,7 +560,11 @@ return; host()->WasHidden(); diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index 13007af26e7f..73058d53f01c 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,10 +6,10 @@ 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 573269ba54150d5350e5c3589217c5e7f41d560d..20fcda4eb20459b69247003c51c2a3ed37c7b1e8 100644 +index 7b11077760d2a79312bd1871582733a7b0af71a0..8637d83c1d3a912bbc48effcc095b426640351ad 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -832,6 +832,10 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -830,6 +830,10 @@ void RenderWidgetHostImpl::WasHidden() { return; } @@ -21,10 +21,10 @@ index 573269ba54150d5350e5c3589217c5e7f41d560d..20fcda4eb20459b69247003c51c2a3ed // Prompts should remain open and functional across tab switches. if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) { diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h -index c201cff9e5c3b286389a5eb74e1a9ebd86edfef9..949f6a7867758e35c24897add9a4d47a641357b2 100644 +index c11b7183397d28c6db61969390d1d078261e4c47..5d92247f088942250fbb6bd1ff83ab1c2c7140f7 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h -@@ -1012,6 +1012,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -1013,6 +1013,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl // Requests a commit and forced redraw in the renderer compositor. void ForceRedrawForTesting(); diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 6bf17b0c51ae..2186f974b371 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 d05708d42a0dc1aea4faad3be19f558c93e93265..13dda0bf6560ca03c4c88e787cc4165dfe745b26 100644 +index 530cafbe6debde2b64829753f1c7be07fe04629e..5d9de76c3897adacb7439b94eb24700c2aae9f04 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1464,6 +1464,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1466,6 +1466,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index d05708d42a0dc1aea4faad3be19f558c93e93265..13dda0bf6560ca03c4c88e787cc4165d // 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 && -@@ -1513,6 +1514,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1515,6 +1516,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } diff --git a/patches/chromium/enable_reset_aspect_ratio.patch b/patches/chromium/enable_reset_aspect_ratio.patch index 409ced0aa6c1..4dc7282f6ce5 100644 --- a/patches/chromium/enable_reset_aspect_ratio.patch +++ b/patches/chromium/enable_reset_aspect_ratio.patch @@ -6,10 +6,10 @@ 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 65e4957aa08923200923f91cadcf47eb403bb8a8..19826b92b39c812a3170bfa470a08192b2a712bc 100644 +index c437090f8b3d78cbdfaf2441257359b9d393547c..a86e512dd7ecb7e30714ea2709c1704b406e561f 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 -@@ -637,7 +637,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { +@@ -664,7 +664,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) { void DesktopWindowTreeHostWin::SetAspectRatio( const gfx::SizeF& aspect_ratio, const gfx::Size& excluded_margin) { @@ -19,10 +19,10 @@ index 65e4957aa08923200923f91cadcf47eb403bb8a8..19826b92b39c812a3170bfa470a08192 excluded_margin); } diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index a0e6a63f7b2da396ba5d300a9eb6ab94825f677a..539f5920661010139dc69afb3ff7dd4c9bae762a 100644 +index 06af52a01a95d36042bde916c370a0e7f555a427..426b9fe4444d1624756b561612b851d44d37de19 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1008,8 +1008,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, +@@ -1010,8 +1010,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen, void HWNDMessageHandler::SetAspectRatio(float aspect_ratio, const gfx::Size& excluded_margin) { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index 64a0872ed743..3abc1f307be3 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4 } // namespace net diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index ee56aab6831be256390b88e65a2a949c591bbd31..60c6977d2ffd0da0286e25e5645c11c19d6ab376 100644 +index b55c17b34e5cc5e367e28c834125c4c74f6cef77..9ef082618e0863eb5ccf69e3740f5dcb98c3ccd0 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -1814,6 +1814,13 @@ void NetworkContext::SetNetworkConditions( +@@ -1817,6 +1817,13 @@ void NetworkContext::SetNetworkConditions( std::move(network_conditions)); } @@ -51,10 +51,10 @@ index ee56aab6831be256390b88e65a2a949c591bbd31..60c6977d2ffd0da0286e25e5645c11c1 // 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 930e0bd987c48d111b2c8d71147c09e4418bda6c..9373a53c5cac879c689fcea77f1dbbb32cf35b9e 100644 +index 2596fecc569d59394703579cda02a27c629d843c..53145360b750ae0167da215fad89e0eae5418deb 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -323,6 +323,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -325,6 +325,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CloseIdleConnections(CloseIdleConnectionsCallback callback) override; void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override; @@ -63,10 +63,10 @@ index 930e0bd987c48d111b2c8d71147c09e4418bda6c..9373a53c5cac879c689fcea77f1dbbb3 void SetEnableReferrers(bool enable_referrers) override; #if BUILDFLAG(IS_CT_SUPPORTED) diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index 6d79f4a4cb1a40be907ef52e35f0e5a0acab31fb..95ff46a7ca2654166d18027b986f6ec6c2a3d361 100644 +index 0278c216fd810a1a96c53b57f80e6e91b473f5b0..5899dff0db16bbdf56e9689b206974e0020f1f8b 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -1275,6 +1275,9 @@ interface NetworkContext { +@@ -1276,6 +1276,9 @@ interface NetworkContext { SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id, NetworkConditions? conditions); @@ -77,10 +77,10 @@ index 6d79f4a4cb1a40be907ef52e35f0e5a0acab31fb..95ff46a7ca2654166d18027b986f6ec6 SetAcceptLanguage(string new_accept_language); diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index da8551db16849cf82a6e3a7eaeb451cae0707f2d..6e20b8dd4f134ea7a8808223cd59064d89f5ce09 100644 +index 64ed19803dc00575422a1b024cfb8907be17302e..8639b76fad84ced1434bee4d41cbbb579cbdd483 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -158,6 +158,7 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -159,6 +159,7 @@ class TestNetworkContext : public mojom::NetworkContext { void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {} void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id, mojom::NetworkConditionsPtr conditions) override {} diff --git a/patches/chromium/extend_apply_webpreferences.patch b/patches/chromium/extend_apply_webpreferences.patch index 278fb134b48f..42e76b532e05 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 fbfc0af8a6f29da9ee2d5fd6ae5a02958a7e3a81..cf80d64963a2a25afbaa6060b4dfda425638858b 100644 +index f470ada1bf84938427fb89f4508e5f56aaeebc1f..524928729e34cc6b2ae427181e2ac4f8c1128688 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -170,6 +170,7 @@ +@@ -171,6 +171,7 @@ #include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" #include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h" @@ -23,7 +23,7 @@ index fbfc0af8a6f29da9ee2d5fd6ae5a02958a7e3a81..cf80d64963a2a25afbaa6060b4dfda42 #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" -@@ -1860,6 +1861,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, +@@ -1861,6 +1862,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs, #if BUILDFLAG(IS_MAC) web_view_impl->SetMaximumLegibleScale( prefs.default_maximum_page_scale_factor); 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 5ca5f6536b33..1bdebf24786c 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 @@ -62,10 +62,10 @@ index 97cceb20da0fccf0603cf2d4b1c8985314b1e850..0632d7fdc975dfdc3cc24bd8e641a268 SEQUENCE_CHECKER(sequence_checker_); }; diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc -index dcf2d14d92f8b5a5dd7bf22f8ce00f030824c989..04d0f5d9416eaba569f49a25e7e8c1a89e50ecfe 100644 +index 0c6d689295a03fc088b57487037d85f4d634a5f4..8e3bab233e8611c68e79d53f125560f4fb086a1e 100644 --- a/ui/native_theme/native_theme_win.cc +++ b/ui/native_theme/native_theme_win.cc -@@ -696,6 +696,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { +@@ -697,6 +697,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const { 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 6152b18eec45..0155eecf8873 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,7 +13,7 @@ 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/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc -index c19436994faa21246c8c2e53e96c7ce3fffede4f..31c2efe2acd8c11bb5a861fa42841fe0e76c1141 100644 +index 3e010fbec46d799839a2c50ed14c1d5744e99a30..ed98c853ba013acb8908a1651742d510bc8e4475 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc @@ -11,8 +11,10 @@ @@ -48,7 +48,7 @@ index c19436994faa21246c8c2e53e96c7ce3fffede4f..31c2efe2acd8c11bb5a861fa42841fe0 class MultiBufferDataSource::ReadOperation { public: ReadOperation() = delete; -@@ -160,7 +174,14 @@ bool MultiBufferDataSource::media_has_played() const { +@@ -149,7 +163,14 @@ bool MultiBufferDataSource::media_has_played() const { bool MultiBufferDataSource::AssumeFullyBuffered() const { DCHECK(url_data_); @@ -65,7 +65,7 @@ index c19436994faa21246c8c2e53e96c7ce3fffede4f..31c2efe2acd8c11bb5a861fa42841fe0 void MultiBufferDataSource::SetReader( diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h -index 5277d480ce3ac065501a986b323e8f3a983acd75..6666dd87cd8971c7ed05a4bc141e19b9be549e54 100644 +index e886847425b1ea0b620a60e7b477249efac3c689..92dea7a9f491bb548f68d918ebde60cbf2a7d67f 100644 --- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.h +++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.h @@ -17,6 +17,7 @@ diff --git a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch index 2135811c98dc..0506b9f8512f 100644 --- a/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch +++ b/patches/chromium/feat_allow_code_cache_in_custom_schemes.patch @@ -140,7 +140,7 @@ index c5fb0546fb8724a6ba34b55d8d52b2f70ad5bc0c..883c4022aa58e5eb5345ec4e8815a137 // JavaScript from chrome and chrome-untrusted pages. The resource URLs are diff --git a/content/browser/code_cache/generated_code_cache_browsertest.cc b/content/browser/code_cache/generated_code_cache_browsertest.cc -index be7a332d8c071f09a2a09c382e7c6c906008c9ec..8227df3c7faa07552c7ce5cc88941285dfa9ca9c 100644 +index c810c580efea05ba9b3b41a90b289224220bb203..55864eed550b09ba41732c706a81a122594949d6 100644 --- a/content/browser/code_cache/generated_code_cache_browsertest.cc +++ b/content/browser/code_cache/generated_code_cache_browsertest.cc @@ -11,17 +11,22 @@ @@ -163,10 +163,10 @@ index be7a332d8c071f09a2a09c382e7c6c906008c9ec..8227df3c7faa07552c7ce5cc88941285 #include "content/shell/browser/shell.h" #include "content/test/content_browser_test_utils_internal.h" +#include "content/test/test_content_client.h" + #include "net/base/features.h" #include "net/dns/mock_host_resolver.h" #include "third_party/blink/public/common/features.h" - #include "third_party/blink/public/common/page/v8_compile_hints_histograms.h" -@@ -30,6 +35,8 @@ namespace content { +@@ -31,6 +36,8 @@ namespace content { namespace { @@ -175,7 +175,7 @@ index be7a332d8c071f09a2a09c382e7c6c906008c9ec..8227df3c7faa07552c7ce5cc88941285 bool SupportsSharedWorker() { #if BUILDFLAG(IS_ANDROID) // SharedWorkers are not enabled on Android. https://crbug.com/154571 -@@ -874,4 +881,82 @@ IN_PROC_BROWSER_TEST_F(LocalCompileHintsBrowserTest, LocalCompileHints) { +@@ -875,4 +882,82 @@ IN_PROC_BROWSER_TEST_F(LocalCompileHintsBrowserTest, LocalCompileHints) { } } diff --git a/patches/chromium/feat_configure_launch_options_for_service_process.patch b/patches/chromium/feat_configure_launch_options_for_service_process.patch index bafd2c57636b..558d8392f093 100644 --- a/patches/chromium/feat_configure_launch_options_for_service_process.patch +++ b/patches/chromium/feat_configure_launch_options_for_service_process.patch @@ -19,7 +19,7 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t parent process to read from the pipe. diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h -index 32b0b480d2195e5b166a473c2b58c960a0b5d052..cbf593e5405b384dbbdf763ebc4319cf25fc5c4a 100644 +index ac6f72c99800d5437ddc4aa203870242fb9220b9..93055bda5478f4b7b401ae06dcddce36a26f5ad7 100644 --- a/content/browser/child_process_launcher.h +++ b/content/browser/child_process_launcher.h @@ -33,6 +33,7 @@ @@ -30,7 +30,7 @@ index 32b0b480d2195e5b166a473c2b58c960a0b5d052..cbf593e5405b384dbbdf763ebc4319cf #endif #if BUILDFLAG(IS_POSIX) -@@ -196,7 +197,10 @@ struct ChildProcessLauncherFileData { +@@ -188,7 +189,10 @@ struct ChildProcessLauncherFileData { delete; ~ChildProcessLauncherFileData(); @@ -42,7 +42,7 @@ index 32b0b480d2195e5b166a473c2b58c960a0b5d052..cbf593e5405b384dbbdf763ebc4319cf // Files opened by the browser and passed as corresponding file descriptors // in the child process. If a FilePath is provided, the file will be opened // and the descriptor cached for future process launches. If a ScopedFD is -@@ -211,6 +215,15 @@ struct ChildProcessLauncherFileData { +@@ -203,6 +207,15 @@ struct ChildProcessLauncherFileData { std::map> files_to_preload; #endif @@ -187,7 +187,7 @@ index 96c9563aac5847e742de5d9c9236f78bcb6cfd9c..73c9d585579ad5bdc407687b8becd0b7 host->GetChildProcess()->BindServiceInterface(std::move(receiver)); } diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc -index 8bb497717298886bc6db04ebcba9be1f3b29ab73..60c4a301c32a46cdc332cccd1cd4ae78802ee8b9 100644 +index 9e01e61bf1fce448a93eaa3d5f363fc835b78538..d210af6fb317c922a8415a67a7ccd1d8a4a88ea1 100644 --- a/content/browser/service_host/utility_process_host.cc +++ b/content/browser/service_host/utility_process_host.cc @@ -190,11 +190,13 @@ const ChildProcessData& UtilityProcessHost::GetData() { @@ -237,7 +237,7 @@ index 8bb497717298886bc6db04ebcba9be1f3b29ab73..60c4a301c32a46cdc332cccd1cd4ae78 mojom::ChildProcess* UtilityProcessHost::GetChildProcess() { return static_cast(process_->GetHost()) ->child_process(); -@@ -455,9 +481,26 @@ bool UtilityProcessHost::StartProcess() { +@@ -456,9 +482,26 @@ bool UtilityProcessHost::StartProcess() { } #endif // BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE) && !BUILDFLAG(IS_WIN) diff --git a/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch b/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch index 4f97d4fa29c1..fe32e417f58c 100644 --- a/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch +++ b/patches/chromium/feat_corner_smoothing_css_rule_and_blink_painting.patch @@ -75,7 +75,7 @@ index 65766b955e81bfc332bc2c4e0b9da48389c1bd68..a475e1bfee46f0a77d1cfbdea47e9de6 // used for canvas noising. uint64 canvas_noise_token = 0; diff --git a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom -index a4c78d85e525224823ce4b2434519cc0a39922ef..8071b283b48ab89226313bb199c0cece67ca5039 100644 +index 53f76ceb28c2d0cca7111bce77e40d1ea0830b7a..4d6b605d3b0af6a88558fe8ee202be088bc65e17 100644 --- a/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom +++ b/third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom @@ -48,6 +48,7 @@ enum CSSSampleId { @@ -112,10 +112,10 @@ index aa3a6b93cceae8c8bfbefdd7a043ae576f921979..17544d7ed4757fb51e2f82fd1b906381 property_.sorting_key = (-property_.priority, internal_visited_order, diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 -index b44da8add10fdeadd24653441115df035a93dd50..ce7c7bd32f3a8ea262f01c408474ff4ffe7fe0aa 100644 +index 99e25d56dc62a9fcfdb361a4ab2a8bb9343e3f38..f96437d4c6ee710ddc1d520c3546ee82ac52ca9c 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5 -@@ -8795,6 +8795,24 @@ +@@ -8809,6 +8809,24 @@ property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"], }, @@ -141,7 +141,7 @@ index b44da8add10fdeadd24653441115df035a93dd50..ce7c7bd32f3a8ea262f01c408474ff4f { name: "-internal-visited-color", diff --git a/third_party/blink/renderer/core/css/css_property_equality.cc b/third_party/blink/renderer/core/css/css_property_equality.cc -index 10ab8a458fb3348476a6e904f684af77c55b103a..37339df2a5601b59abc50fe75fb844e1b7bb5368 100644 +index 2c86916399d8b9a14678f7996d2dfcca68b6f5e0..c6e48e15870ed54435f6e5f7dabf648ce5aeb7c7 100644 --- a/third_party/blink/renderer/core/css/css_property_equality.cc +++ b/third_party/blink/renderer/core/css/css_property_equality.cc @@ -346,6 +346,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property, @@ -154,10 +154,10 @@ index 10ab8a458fb3348476a6e904f684af77c55b103a..37339df2a5601b59abc50fe75fb844e1 return a.EmptyCells() == b.EmptyCells(); case CSSPropertyID::kFill: diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc -index 663ce4469a595e2c5a7b8ed992bdc0e22ab101a9..acdbd7ab75b12630356777a475be794091be25ad 100644 +index 39d275e2eeedbfbd9004d5e213bf335ba6edbd51..598373b895aa14ef7a3583e38562b13ee8044222 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc -@@ -12035,5 +12035,25 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( +@@ -12050,5 +12050,25 @@ const CSSValue* InternalEmptyLineHeight::ParseSingleValue( CSSValueID::kNone>(stream); } @@ -184,10 +184,10 @@ index 663ce4469a595e2c5a7b8ed992bdc0e22ab101a9..acdbd7ab75b12630356777a475be7940 } // namespace css_longhand } // namespace blink diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc -index f7f49ef23b77c7a3f27ae8ba129e5eea1617d545..0ddf6f59c45d2f6212317dc18f3c5a80eeda5395 100644 +index 2c0df07241cca3aa28ce409d1af0e40594aa19bf..efe19004646138e9fcd91d138220e8802f75b335 100644 --- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc +++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc -@@ -3859,4 +3859,12 @@ PositionArea StyleBuilderConverter::ConvertPositionArea( +@@ -3854,4 +3854,12 @@ PositionArea StyleBuilderConverter::ConvertPositionArea( return PositionArea(span[0], span[1], span[2], span[3]); } @@ -201,7 +201,7 @@ index f7f49ef23b77c7a3f27ae8ba129e5eea1617d545..0ddf6f59c45d2f6212317dc18f3c5a80 + } // namespace blink diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h -index b9f8145af13fb9d68e85f166905476c177c3a053..0a9ad304f5039747a0580ab63664d4429a67970d 100644 +index a33d85561b005010653c5e3a562227b1f379ec90..0c2d3b0e9b691477d46c892afc16d8b0421e7263 100644 --- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.h +++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.h @@ -419,6 +419,8 @@ class StyleBuilderConverter { @@ -239,10 +239,10 @@ index 5e8d2bfbccd0625c2598544a9cba3d71373eded2..e68a97ee75754fc7196f11cf5c731550 bool RenderVSyncNotificationEnabled() const { return render_v_sync_notification_enabled_; 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 cf80d64963a2a25afbaa6060b4dfda425638858b..5f3a6dba6fe4f93698a8e18afa07efdac73eabee 100644 +index 524928729e34cc6b2ae427181e2ac4f8c1128688..9ce184f279b11a90c7d6f9b9ab7b20da09122a40 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -3575,6 +3575,9 @@ void WebViewImpl::UpdateRendererPreferences( +@@ -3576,6 +3576,9 @@ void WebViewImpl::UpdateRendererPreferences( CanvasNoiseToken::Set(renderer_preferences_.canvas_noise_token); MaybePreloadSystemFonts(GetPage()); @@ -267,33 +267,6 @@ index f4cdee12ea4352067f5de3e074e43d51ef56d2e5..6377e4b1ea8aa46b0bf69f8420b6c439 + }, ], } -diff --git a/third_party/blink/renderer/core/paint/box_painter_base.cc b/third_party/blink/renderer/core/paint/box_painter_base.cc -index 57f71cbd80d88416693e5b83f695fd02eb7a405b..d638da7a734fa40de118d056c59488b63caff7e2 100644 ---- a/third_party/blink/renderer/core/paint/box_painter_base.cc -+++ b/third_party/blink/renderer/core/paint/box_painter_base.cc -@@ -417,16 +417,20 @@ void BoxPainterBase::PaintInsetBoxShadow(const PaintInfo& info, - ContouredRect inner_rounded_rect( - FloatRoundedRect(inner_rect, bounds.GetRadii())); - ApplySpreadToShadowShape(inner_rounded_rect, -shadow.Spread()); -+ ContouredRect contoured_bounds( -+ bounds, ContouredBorderGeometry::ContouredBorder( -+ style, PhysicalRect::EnclosingRect(bounds.Rect())) -+ .GetCornerCurvature()); - if (inner_rounded_rect.IsEmpty()) { - // |AutoDarkMode::Disabled()| is used because |shadow_color| has already - // been adjusted for dark mode. -- context.FillRoundedRect(bounds, shadow_color, AutoDarkMode::Disabled()); -+ context.FillContouredRect(contoured_bounds, shadow_color, AutoDarkMode::Disabled()); - continue; - } - GraphicsContextStateSaver state_saver(context); - if (bounds.IsRounded()) { - // TODO(crbug.com/397459628) render corner-shape with box-shadow -- context.ClipContouredRect(ContouredRect(bounds)); -+ context.ClipContouredRect(contoured_bounds); - } else { - context.Clip(bounds.Rect()); - } diff --git a/third_party/blink/renderer/core/paint/contoured_border_geometry.cc b/third_party/blink/renderer/core/paint/contoured_border_geometry.cc index 2c2f4f405074e5baa4a26f255283404f86b40e21..ebeb7d6988ee9e6a4e78cb82fc01fdad6721eaef 100644 --- a/third_party/blink/renderer/core/paint/contoured_border_geometry.cc @@ -334,10 +307,10 @@ index 2c2f4f405074e5baa4a26f255283404f86b40e21..ebeb7d6988ee9e6a4e78cb82fc01fdad ContouredRect PixelSnappedContouredBorderInternal( diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index 291676c6583722a3dfbac4d4aaad1ea2ae3cc079..5cd89e8c6c79ab339ffbc330d9bcdb08cca6e869 100644 +index c2fc2c7b4493a5ee3b47d78331cab215f02fe932..c628b27b7caf09f17ada1ad476cfc90845b7f420 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1646,6 +1646,8 @@ component("platform") { +@@ -1652,6 +1652,8 @@ component("platform") { "widget/widget_base.h", "widget/widget_base_client.h", "windows_keyboard_codes.h", @@ -347,7 +320,7 @@ index 291676c6583722a3dfbac4d4aaad1ea2ae3cc079..5cd89e8c6c79ab339ffbc330d9bcdb08 sources -= blink_platform_avx_files diff --git a/third_party/blink/renderer/platform/geometry/contoured_rect.h b/third_party/blink/renderer/platform/geometry/contoured_rect.h -index b147b8d321d865295007516b15d0aaccfc6f7fac..8f54a3a657c660a52fcd4c94865ca2197b0af514 100644 +index 88e78f1d8050c73ae6a8929f23e636ef7a383404..17b63c5ecdcd8feb17b76a13392595c737c316b7 100644 --- a/third_party/blink/renderer/platform/geometry/contoured_rect.h +++ b/third_party/blink/renderer/platform/geometry/contoured_rect.h @@ -47,19 +47,29 @@ class PLATFORM_EXPORT ContouredRect { @@ -400,7 +373,7 @@ index b147b8d321d865295007516b15d0aaccfc6f7fac..8f54a3a657c660a52fcd4c94865ca219 // A Corner is a axis-aligned quad, with the points ordered (start, outer, diff --git a/third_party/blink/renderer/platform/geometry/path_builder.cc b/third_party/blink/renderer/platform/geometry/path_builder.cc -index 346cfc0b13b31808fbe1381b3785150810f347bb..29a004e6b668d172534cd503f16de57d42368b2e 100644 +index b17bc9760b97b1e72783ae174ffa0f69ca830462..9fcff7b868ca8c29b46d6ed2ddceee3bd8ab9137 100644 --- a/third_party/blink/renderer/platform/geometry/path_builder.cc +++ b/third_party/blink/renderer/platform/geometry/path_builder.cc @@ -4,6 +4,7 @@ @@ -411,7 +384,7 @@ index 346cfc0b13b31808fbe1381b3785150810f347bb..29a004e6b668d172534cd503f16de57d #include "third_party/blink/renderer/platform/geometry/contoured_rect.h" #include "third_party/blink/renderer/platform/geometry/infinite_int_rect.h" #include "third_party/blink/renderer/platform/geometry/path.h" -@@ -231,6 +232,19 @@ PathBuilder& PathBuilder::AddContouredRect( +@@ -241,6 +242,19 @@ PathBuilder& PathBuilder::AddContouredRect( AddRoundedRect(target_rect); return *this; } @@ -430,4 +403,4 @@ index 346cfc0b13b31808fbe1381b3785150810f347bb..29a004e6b668d172534cd503f16de57d + const FloatRoundedRect& origin_rect = contoured_rect.GetOriginRect(); - if (origin_rect == target_rect) { + // This would include the outer border of the rect, as well as shadow and 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 199d092ebd06..30f946b1f3cd 100644 --- a/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch +++ b/patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch @@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217 private: const HWND hwnd_; diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 41c3a5128b9936f48587d6fc6ddd2050bffc9c36..4dbcba1150645596532c53b99e309c0e52d4759f 100644 +index e3b4148376f5a93f053b88e179f51cb642d896ed..e9bd34f4ed48ad882232c427598489a05f5f8bb1 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn @@ -178,6 +178,8 @@ viz_component("service") { @@ -204,10 +204,10 @@ index e4b46a79560e7698a6400b2ab8a57f38205a8718..3cb2518c6644cf0618f625d981befd46 const raw_ptr gpu_service_impl_; diff --git a/components/viz/service/display_embedder/software_output_device_mac.cc b/components/viz/service/display_embedder/software_output_device_mac.cc -index 446229f7dea794a0148543d112c63b8c38183262..15d097a5761a07cfbc763d6fc739ca35cf3c8660 100644 +index 80b4d99c08b622b080cf6d725ebc3cdfbcad7d32..d9c56e04dfd771368a82b852daae297a47fde80e 100644 --- a/components/viz/service/display_embedder/software_output_device_mac.cc +++ b/components/viz/service/display_embedder/software_output_device_mac.cc -@@ -111,6 +111,8 @@ void SoftwareOutputDeviceMac::UpdateAndCopyBufferDamage( +@@ -112,6 +112,8 @@ void SoftwareOutputDeviceMac::UpdateAndCopyBufferDamage( SkCanvas* SoftwareOutputDeviceMac::BeginPaint( const gfx::Rect& new_damage_rect) { @@ -216,7 +216,7 @@ index 446229f7dea794a0148543d112c63b8c38183262..15d097a5761a07cfbc763d6fc739ca35 // Record the previous paint buffer. Buffer* previous_paint_buffer = buffer_queue_.empty() ? nullptr : buffer_queue_.back().get(); -@@ -199,6 +201,7 @@ void SoftwareOutputDeviceMac::EndPaint() { +@@ -202,6 +204,7 @@ void SoftwareOutputDeviceMac::EndPaint() { ca_layer_params.is_empty = false; ca_layer_params.scale_factor = scale_factor_; ca_layer_params.pixel_size = pixel_size_; @@ -509,10 +509,10 @@ index 0000000000000000000000000000000000000000..e1a22ee881c0fd679ac2d2d4d11a3c93 + +#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_ diff --git a/components/viz/service/display_embedder/software_output_device_win.cc b/components/viz/service/display_embedder/software_output_device_win.cc -index 4d6cc977ed5000d93918336a0dd57f60c0e95bbb..54d936e86b60f0538c70c4ee69e109ccda35248f 100644 +index f0aca972c4a81c3dfb536e14244daafae21ee716..a15afbc1a3519e657121b4952444d2f47d872e42 100644 --- a/components/viz/service/display_embedder/software_output_device_win.cc +++ b/components/viz/service/display_embedder/software_output_device_win.cc -@@ -149,7 +149,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( +@@ -156,7 +156,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( if (!canvas_) return; @@ -522,10 +522,10 @@ index 4d6cc977ed5000d93918336a0dd57f60c0e95bbb..54d936e86b60f0538c70c4ee69e109cc 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 6de3d8b4cdaf2721a160c6271561b8fd8872e82e..890b95b4aee9210f13ee192a6ea86e072619fcf4 100644 +index 7898d49d84cebde8d6f03e63a6555c29cc9becff..c86e066ae303220d699f4bc3832ae4b31b40b0bc 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 -@@ -113,7 +113,8 @@ RootCompositorFrameSinkImpl::Create( +@@ -115,7 +115,8 @@ RootCompositorFrameSinkImpl::Create( params->gpu_compositing, params->widget); auto output_surface = output_surface_provider->CreateOutputSurface( params->widget, params->gpu_compositing, display_client.get(), @@ -564,10 +564,10 @@ index 399fba1a3d4e601dc2cdd5f1f4def8b7fd7a3011..8bcbe0d26c80323155d536c0d3a177a1 gpu::SyncPointManager* GetSyncPointManager() override; gpu::Scheduler* GetGpuScheduler() override; diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc -index 7839f5afb9ac1aef3f809042d14e6bf2f48f84af..7df780d195e3cfcbfc0857133f2c0d21abe04121 100644 +index 8e2ddfa9337b5ba952a186a85bce78d39a62e8bd..efb54a95b2ad76546eafa1907064a298961b1a4d 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc -@@ -431,8 +431,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -389,8 +389,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( mojo::AssociatedRemote display_private; root_params->display_private = display_private.BindNewEndpointAndPassReceiver(); @@ -620,7 +620,7 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index bd5213795191e5947b6c70778ae01a669ab50dd7..3f52b93eab20108e40131472d8abdf9ff60bd191 100644 +index 385074e896f4a2e66dec8f5629a2f60b06affb0a..8d37f968825055d1d86da2cf0aac5d011fef7e8c 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -88,6 +88,7 @@ class DisplayPrivate; @@ -631,7 +631,7 @@ index bd5213795191e5947b6c70778ae01a669ab50dd7..3f52b93eab20108e40131472d8abdf9f class HostFrameSinkManager; class LocalSurfaceId; class RasterContextProvider; -@@ -147,6 +148,15 @@ class COMPOSITOR_EXPORT ExternalBeginFrameControllerClientFactory { +@@ -146,6 +147,15 @@ class COMPOSITOR_EXPORT ExternalBeginFrameControllerClientFactory { viz::mojom::ExternalBeginFrameControllerClient> CreateExternalBeginFrameControllerClient() = 0; }; @@ -647,7 +647,7 @@ index bd5213795191e5947b6c70778ae01a669ab50dd7..3f52b93eab20108e40131472d8abdf9f // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final -@@ -191,6 +201,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -190,6 +200,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -657,7 +657,7 @@ index bd5213795191e5947b6c70778ae01a669ab50dd7..3f52b93eab20108e40131472d8abdf9f // 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 -@@ -609,6 +622,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -631,6 +644,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, simple_begin_frame_observers_; std::unique_ptr host_begin_frame_observer_; diff --git a/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch b/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch index 643757d18684..de4299dc23ac 100644 --- a/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch +++ b/patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch @@ -80,10 +80,10 @@ index 801db538979ba62facdcf3a472dade56723ca639..7abac9a5b13b393713534ae51664c2e5 private: const std::string service_interface_name_; diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc -index 60c4a301c32a46cdc332cccd1cd4ae78802ee8b9..85fc14b2ef520abb191f926dc44a272f4c9e874b 100644 +index d210af6fb317c922a8415a67a7ccd1d8a4a88ea1..0de01879f618555030e87ea79a94d41232811c2c 100644 --- a/content/browser/service_host/utility_process_host.cc +++ b/content/browser/service_host/utility_process_host.cc -@@ -540,7 +540,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) { +@@ -541,7 +541,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) { // Take ownership of |client_| so the destructor doesn't notify it of // termination. auto client = std::move(client_); diff --git a/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch b/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch index 1916b0e7ab0c..9d0910e8cf1f 100644 --- a/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch +++ b/patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch @@ -99,3 +99,34 @@ index a179c9bc02158130f4b15bf8022721f4b53a8303..8fd3f42725e6618737110459b1b1021e if (error == errSecItemNotFound) { std::string password = AddRandomPasswordToKeychain( *keychain_, GetServiceName(), GetAccountName()); +diff --git a/crypto/apple_keychain.h b/crypto/apple_keychain.h +index 59371dc86e02a361971a4abeb2de0c607d5babd6..e148359453a22e8301c0665dd994fc5bbb29f1dc 100644 +--- a/crypto/apple_keychain.h ++++ b/crypto/apple_keychain.h +@@ -59,6 +59,10 @@ class CRYPTO_EXPORT AppleKeychain { + UInt32 password_length, + const void* password_data, + AppleSecKeychainItemRef* item) const; ++ ++#if BUILDFLAG(IS_MAC) ++ virtual OSStatus ItemDelete(AppleSecKeychainItemRef item) const; ++#endif // !BUILDFLAG(IS_MAC) + }; + + #if BUILDFLAG(IS_MAC) +diff --git a/crypto/apple_keychain_mac.cc b/crypto/apple_keychain_mac.cc +index 1e390075331da8405d1295ca633da25092e8f86d..a2c91d433e84c781df9b3f794c4957b4f6a596bf 100644 +--- a/crypto/apple_keychain_mac.cc ++++ b/crypto/apple_keychain_mac.cc +@@ -86,6 +86,11 @@ OSStatus AppleKeychain::AddGenericPassword( + account_name, password_length, password_data, item); + } + ++OSStatus AppleKeychain::ItemDelete(AppleSecKeychainItemRef item) const { ++ base::AutoLock lock(GetMacSecurityServicesLock()); ++ return SecKeychainItemDelete(item); ++} ++ + ScopedKeychainUserInteractionAllowed::ScopedKeychainUserInteractionAllowed( + Boolean allowed, + OSStatus* status) { 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 de5d2e3eb8ee..4fd634e43369 100644 --- a/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch +++ b/patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch @@ -17,7 +17,7 @@ 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 7d97d0fd5481bead1f655f2f933a3ae89a729834..9b4c41209190086353b9a87833c07aabb47470bd 100644 +index cf2fd38d7a4a851ae41a53afefd51cb22e4b8cbf..381ab7adf203fa61655164b1aaec48b207465466 100644 --- a/services/network/public/cpp/resource_request.cc +++ b/services/network/public/cpp/resource_request.cc @@ -178,6 +178,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=( @@ -37,7 +37,7 @@ index 7d97d0fd5481bead1f655f2f933a3ae89a729834..9b4c41209190086353b9a87833c07aab allow_cookies_from_browser == other.allow_cookies_from_browser && include_request_cookies_with_response == diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h -index 538e2a52da142a442342383d223ea0d90b75be8f..19f0defab1d1ba3369423842e4eabbceee781091 100644 +index ae9365525defc827d2aa7c97f4ab9b02966381d4..cf25d3dedaddec29729fe4f3b9e92187f157bcd5 100644 --- a/services/network/public/cpp/resource_request.h +++ b/services/network/public/cpp/resource_request.h @@ -77,6 +77,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest { @@ -61,7 +61,7 @@ index 2021e4c8f05008dd57e67c14fc7e66bf49bd6e3e..2a5ed7fc54f9efd773ec6dded1b66bb9 mojo::PendingRemote>(); out->trust_token_observer = data.TakeTrustTokenObserver< diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h -index 30a38e3f82360417b682c516263f62181825c621..db8a479f483a041a6944465deb6f799a2a9bd93a 100644 +index fc1700900ebd5a05f9d9a611366caf341bf4228c..eb7d1eeea3817e03afb4799cb92e65708be1db65 100644 --- a/services/network/public/cpp/url_request_mojom_traits.h +++ b/services/network/public/cpp/url_request_mojom_traits.h @@ -71,6 +71,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) @@ -76,10 +76,10 @@ index 30a38e3f82360417b682c516263f62181825c621..db8a479f483a041a6944465deb6f799a cookie_observer( const network::ResourceRequest::TrustedParams& trusted_params) { diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom -index 78fa9126457ee380b12e39e3bf35ea4c2ccaa36c..4f39fa5d3bd665e3343882d11f1ab5747c80610e 100644 +index bd5f2a3c64d1f57f987909bede992dc10a0a121f..a8898c4e5c11821568c6236198f59c422c90187f 100644 --- a/services/network/public/mojom/url_request.mojom +++ b/services/network/public/mojom/url_request.mojom -@@ -74,6 +74,9 @@ struct TrustedUrlRequestParams { +@@ -86,6 +86,9 @@ struct TrustedUrlRequestParams { // client which should not be able to see them. bool include_request_cookies_with_response = false; @@ -112,10 +112,10 @@ index 72188dae668f2bd91b8b7f181448f459600a82c2..b3dae05e160160cc8f2decee5af78c21 string mime_type; diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc -index 54501620f428c1e539a8172054180c9c58145766..bbde6ebfb8f051622b1f499d472b00fac2093be7 100644 +index d429e87284281e31543815cb86654670acd76e9b..f1d0e99fe09da631648729f09cc7a43c530f1a18 100644 --- a/services/network/url_loader.cc +++ b/services/network/url_loader.cc -@@ -673,6 +673,9 @@ URLLoader::URLLoader( +@@ -387,6 +387,9 @@ URLLoader::URLLoader( mojo::SimpleWatcher::ArmingPolicy::MANUAL, base::SequencedTaskRunner::GetCurrentDefault()), per_factory_orb_state_(context.GetMutableOrbState()), @@ -125,7 +125,7 @@ index 54501620f428c1e539a8172054180c9c58145766..bbde6ebfb8f051622b1f499d472b00fa devtools_request_id_(request.devtools_request_id), options_(PopulateOptions(options, factory_params_->is_orb_enabled, -@@ -982,7 +985,7 @@ void URLLoader::ConfigureRequest( +@@ -544,7 +547,7 @@ void URLLoader::SetUpUrlRequestCallbacks( &URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this))); } @@ -134,7 +134,7 @@ index 54501620f428c1e539a8172054180c9c58145766..bbde6ebfb8f051622b1f499d472b00fa url_request_->SetResponseHeadersCallback(base::BindRepeating( &URLLoader::SetRawResponseHeaders, base::Unretained(this))); } -@@ -2142,6 +2145,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { +@@ -1224,6 +1227,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) { } response_ = BuildResponseHead(); @@ -153,12 +153,12 @@ index 54501620f428c1e539a8172054180c9c58145766..bbde6ebfb8f051622b1f499d472b00fa + } DispatchOnRawResponse(); - // Parse and remove the Trust Tokens response headers, if any are expected, + ad_auction_event_record_request_helper_.HandleResponse(*url_request_); diff --git a/services/network/url_loader.h b/services/network/url_loader.h -index e6962f686212ca39d66b5d21bd3ff1f852e83644..fd3eb86e2f0f9b3705029befc54c85690e8ca519 100644 +index 6832aca0d487d5cbf2fc445f1f07a17565cf9d45..78618a2c3d79455ff685d58d11b61d3d8468b7e1 100644 --- a/services/network/url_loader.h +++ b/services/network/url_loader.h -@@ -773,6 +773,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader +@@ -625,6 +625,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader std::unique_ptr resource_scheduler_request_handle_; diff --git a/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch b/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch index 7ce101dd084b..8fed89871d95 100644 --- a/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch +++ b/patches/chromium/feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch @@ -32,7 +32,7 @@ index 6f4d9651862e90abaa22b93e1dcf97ac07592c5c..d91d81297e7cdb79ee7b7a3979dcedf9 break; } diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc -index 0c6b537ddc2afbc4cd22f1c08f1bbae3c3bbffe3..333f557c89bc03ae5b25060359b9af096b188726 100644 +index 1afe0fe1c169bd9224314f50918ccfe3b1800c8f..a0fdb5003382d94aeb676a4224aa40f16acf1573 100644 --- a/content/browser/permissions/permission_controller_impl.cc +++ b/content/browser/permissions/permission_controller_impl.cc @@ -87,6 +87,7 @@ PermissionToSchedulingFeature(PermissionType permission_name) { @@ -43,8 +43,22 @@ index 0c6b537ddc2afbc4cd22f1c08f1bbae3c3bbffe3..333f557c89bc03ae5b25060359b9af09 return std::nullopt; } } +diff --git a/content/browser/permissions/permission_descriptor_util.cc b/content/browser/permissions/permission_descriptor_util.cc +index 6c36ada80f6f225b84a8f3832405128f8ba83224..714d582d1060873765b24770b18eddcbbdcf5506 100644 +--- a/content/browser/permissions/permission_descriptor_util.cc ++++ b/content/browser/permissions/permission_descriptor_util.cc +@@ -171,6 +171,9 @@ content::PermissionDescriptorUtil::CreatePermissionDescriptorForPermissionType( + case blink::PermissionType::LOCAL_NETWORK_ACCESS: + return CreatePermissionDescriptor( + blink::mojom::PermissionName::LOCAL_NETWORK_ACCESS); ++ case blink::PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ: ++ return CreatePermissionDescriptor( ++ blink::mojom::PermissionName::DEPRECATED_SYNC_CLIPBOARD_READ); + case blink::PermissionType::NUM: + NOTREACHED(); + } diff --git a/third_party/blink/common/permissions/permission_utils.cc b/third_party/blink/common/permissions/permission_utils.cc -index aad897dbc32caa3469a2f04b4f004355888c84d8..875260fc2a884ab5b1e62cd45fc91c2e4dc162ee 100644 +index 8abbc34ec283562685a46e10142901110b5c0b55..1c436c62cac1bc4b21255bdcbb2c18b882c4058b 100644 --- a/third_party/blink/common/permissions/permission_utils.cc +++ b/third_party/blink/common/permissions/permission_utils.cc @@ -101,6 +101,8 @@ std::string GetPermissionString(PermissionType permission) { @@ -65,7 +79,7 @@ index aad897dbc32caa3469a2f04b4f004355888c84d8..875260fc2a884ab5b1e62cd45fc91c2e case PermissionType::NUM: diff --git a/third_party/blink/public/common/permissions/permission_utils.h b/third_party/blink/public/common/permissions/permission_utils.h -index 947bd8125bf300a3a82c811810e31996e6147c7c..caeeaf6cecf7da47c39b140dfcc295fba12f6f84 100644 +index 5c82a641538802bc459782ea422a1186045b054a..c286d87043ec4cb2e51ec9d82d08e4c84f5a270c 100644 --- a/third_party/blink/public/common/permissions/permission_utils.h +++ b/third_party/blink/public/common/permissions/permission_utils.h @@ -65,6 +65,7 @@ enum class PermissionType { @@ -76,6 +90,20 @@ index 947bd8125bf300a3a82c811810e31996e6147c7c..caeeaf6cecf7da47c39b140dfcc295fb // Always keep this at the end. NUM, +diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom +index 02e1941c37173a1e84e5190eb396f1007a8bbc2c..e47f2089a6a187b26c981afa1ef4135ec5e6a9e7 100644 +--- a/third_party/blink/public/mojom/permissions/permission.mojom ++++ b/third_party/blink/public/mojom/permissions/permission.mojom +@@ -43,7 +43,8 @@ enum PermissionName { + AR, + HAND_TRACKING, + WEB_PRINTING, +- SMART_CARD ++ SMART_CARD, ++ DEPRECATED_SYNC_CLIPBOARD_READ + }; + + struct MidiPermissionDescriptor { diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h index 28f616f21f998c7cd1c794e58efaccf9e6c11e6e..c64896642209124e500db2ed6fe2357e426cd10b 100644 --- a/third_party/blink/public/platform/web_content_settings_client.h @@ -112,3 +140,16 @@ index c269698764bb8ae7f85c5d476436f5ae5209576d..65d7fd94128a755609192784722074c6 } bool ClipboardCommands::ExecuteCopy(LocalFrame& frame, +diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc +index 843a4f27807071eabfdbffce589a31ddac75aacb..8d189eae97caa48a5796c540a74aaafa2fa676ff 100644 +--- a/third_party/blink/renderer/modules/permissions/permission_utils.cc ++++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc +@@ -145,6 +145,8 @@ String PermissionNameToString(PermissionName name) { + return "web-printing"; + case PermissionName::SMART_CARD: + return "smart-card"; ++ case PermissionName::DEPRECATED_SYNC_CLIPBOARD_READ: ++ return "deprecated-sync-clipboard-read"; + } + } + diff --git a/patches/chromium/fix_activate_background_material_on_windows.patch b/patches/chromium/fix_activate_background_material_on_windows.patch index 1b922f3abb06..a2f0a216dded 100644 --- a/patches/chromium/fix_activate_background_material_on_windows.patch +++ b/patches/chromium/fix_activate_background_material_on_windows.patch @@ -14,10 +14,10 @@ This patch likely can't be upstreamed as-is, as Chromium doesn't have this use case in mind currently. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 29829e282edfa8821bd366a9e9a3755d7f3f8643..661864ab6aad78a721ac921ae778c40085cdc23e 100644 +index 00e1438801381a2219402508dccd4b4fa15009e4..c4da871201f328a87aa3e7459ae063aac3195a8b 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -952,13 +952,13 @@ void HWNDMessageHandler::FrameTypeChanged() { +@@ -954,13 +954,13 @@ void HWNDMessageHandler::FrameTypeChanged() { void HWNDMessageHandler::PaintAsActiveChanged() { if (!delegate_->HasNonClientView() || !delegate_->CanActivate() || @@ -33,7 +33,7 @@ index 29829e282edfa8821bd366a9e9a3755d7f3f8643..661864ab6aad78a721ac921ae778c400 } void HWNDMessageHandler::SetWindowIcons(const gfx::ImageSkia& window_icon, -@@ -1755,7 +1755,7 @@ void HWNDMessageHandler::OnActivateApp(BOOL active, DWORD thread_id) { +@@ -1757,7 +1757,7 @@ void HWNDMessageHandler::OnActivateApp(BOOL active, DWORD thread_id) { if (delegate_->HasNonClientView() && !active && thread_id != GetCurrentThreadId()) { // Update the native frame if it is rendering the non-client area. @@ -42,7 +42,7 @@ index 29829e282edfa8821bd366a9e9a3755d7f3f8643..661864ab6aad78a721ac921ae778c400 DefWindowProcWithRedrawLock(WM_NCACTIVATE, FALSE, 0); } } -@@ -2356,17 +2356,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, +@@ -2365,17 +2365,18 @@ LRESULT HWNDMessageHandler::OnNCActivate(UINT message, delegate_->SchedulePaint(); } diff --git a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch index aed4072d110f..a975bcd5efe1 100644 --- a/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch +++ b/patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch @@ -16,7 +16,7 @@ Linux or Windows to un-fullscreen in some circumstances without this change. diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc -index 91db1bbd912807833243c101e126e42ad5579d2b..7c624e0babddbca7c0deef1d805ccbfc21e6e9a9 100644 +index a6b64cc3dca3f62893e323de781b790f72924b66..7527e9d69ae0d43a00fbd5f5d5ced11af04da378 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -20,12 +20,16 @@ @@ -36,7 +36,7 @@ index 91db1bbd912807833243c101e126e42ad5579d2b..7c624e0babddbca7c0deef1d805ccbfc #include "chrome/common/chrome_switches.h" #include "components/history/core/browser/history_service.h" #include "components/history/core/browser/history_types.h" -@@ -271,11 +275,13 @@ void FullscreenController::EnterFullscreenModeForTab( +@@ -272,11 +276,13 @@ void FullscreenController::EnterFullscreenModeForTab( return; } @@ -50,7 +50,7 @@ index 91db1bbd912807833243c101e126e42ad5579d2b..7c624e0babddbca7c0deef1d805ccbfc // Keep the current state. |SetTabWithExclusiveAccess| may change the return // value of |IsWindowFullscreenForTabOrPending|. -@@ -388,12 +394,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { +@@ -389,12 +395,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) { void FullscreenController::FullscreenTabOpeningPopup( content::WebContents* opener, content::WebContents* popup) { @@ -65,7 +65,7 @@ index 91db1bbd912807833243c101e126e42ad5579d2b..7c624e0babddbca7c0deef1d805ccbfc } void FullscreenController::OnTabDeactivated( -@@ -483,10 +491,12 @@ void FullscreenController::FullscreenTransitionCompleted() { +@@ -484,10 +492,12 @@ void FullscreenController::FullscreenTransitionCompleted() { #endif // DCHECK_IS_ON() tab_fullscreen_target_display_id_ = display::kInvalidDisplayId; started_fullscreen_transition_ = false; @@ -78,7 +78,7 @@ index 91db1bbd912807833243c101e126e42ad5579d2b..7c624e0babddbca7c0deef1d805ccbfc } void FullscreenController::RunOrDeferUntilTransitionIsComplete( -@@ -616,18 +626,17 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -617,18 +627,17 @@ void FullscreenController::EnterFullscreenModeInternal( // Do not enter fullscreen mode if disallowed by pref. This prevents the user // from manually entering fullscreen mode and also disables kiosk mode on // desktop platforms. @@ -102,7 +102,7 @@ index 91db1bbd912807833243c101e126e42ad5579d2b..7c624e0babddbca7c0deef1d805ccbfc if (option == TAB) { origin = GetRequestingOrigin(); tab_fullscreen_ = true; -@@ -662,6 +671,7 @@ void FullscreenController::EnterFullscreenModeInternal( +@@ -665,6 +674,7 @@ void FullscreenController::EnterFullscreenModeInternal( origin = url::Origin::Create(extension_url_.value()); } } @@ -110,7 +110,7 @@ index 91db1bbd912807833243c101e126e42ad5579d2b..7c624e0babddbca7c0deef1d805ccbfc fullscreen_start_time_ = base::TimeTicks::Now(); if (option == BROWSER) { -@@ -683,6 +693,7 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -686,6 +696,7 @@ void FullscreenController::ExitFullscreenModeInternal() { return; } @@ -118,7 +118,7 @@ index 91db1bbd912807833243c101e126e42ad5579d2b..7c624e0babddbca7c0deef1d805ccbfc // `fullscreen_start_time_` is null if a fullscreen tab moves to a new window. if (fullscreen_start_time_ && exclusive_access_tab()) { ukm::SourceId source_id = -@@ -694,15 +705,16 @@ void FullscreenController::ExitFullscreenModeInternal() { +@@ -697,15 +708,16 @@ void FullscreenController::ExitFullscreenModeInternal() { .Record(ukm::UkmRecorder::Get()); fullscreen_start_time_.reset(); } @@ -138,7 +138,7 @@ index 91db1bbd912807833243c101e126e42ad5579d2b..7c624e0babddbca7c0deef1d805ccbfc exclusive_access_manager()->context()->ExitFullscreen(); extension_url_.reset(); exclusive_access_manager()->UpdateBubble(base::NullCallback()); -@@ -766,8 +778,12 @@ url::Origin FullscreenController::GetEmbeddingOrigin() const { +@@ -769,8 +781,12 @@ url::Origin FullscreenController::GetEmbeddingOrigin() const { void FullscreenController::RecordMetricsOnFullscreenApiRequested( content::RenderFrameHost* requesting_frame) { history::HistoryService* service = diff --git a/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch b/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch index f63d0527262c..d2e444506af4 100644 --- a/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch +++ b/patches/chromium/fix_adjust_headless_mode_handling_in_native_widget.patch @@ -15,10 +15,10 @@ We also need to ensure that an initial paint is scheduled when the compositor is unsuspended in headles mode. 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 7bda1853d47034c80a4e416b9839e8d18c5a8e2c..e5df49253103c44f01195fa93988753fb163d13e 100644 +index 235899693e2f2d340cc63df1ded3dfe3c9775cee..014c00d487bd11e1466e2398243442c8ef68f276 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm -@@ -659,9 +659,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -662,9 +662,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator, // case it will never become visible but we want its compositor to produce // frames for screenshooting and screencasting. UpdateCompositorProperties(); @@ -31,10 +31,10 @@ index 7bda1853d47034c80a4e416b9839e8d18c5a8e2c..e5df49253103c44f01195fa93988753f // Register the CGWindowID (used to identify this window for video capture) diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h -index 00113c5a91e4285a102afd37c6c08736d056faf6..f6a719ba09ed9aedc1bdc8322e9bee8d2014fc39 100644 +index 44c9248daecd67ccbc32f9afdbb8e7449d435b6c..e7d43ffc134e76f54aa5a71c668ce725a3f9bf6a 100644 --- a/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h -@@ -1211,6 +1211,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -1223,6 +1223,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // True if widget was created in headless mode. bool is_headless() const { return is_headless_; } diff --git a/patches/chromium/fix_aspect_ratio_with_max_size.patch b/patches/chromium/fix_aspect_ratio_with_max_size.patch index 0ad82581aa51..de2389ba7339 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 539f5920661010139dc69afb3ff7dd4c9bae762a..1cf98eadc8cbc1ada481c709a873dc1dd443de66 100644 +index 426b9fe4444d1624756b561612b851d44d37de19..5a1533b01946b76de2c2aaad137e14c4d7a00a3c 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -3781,15 +3781,30 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param, +@@ -3800,15 +3800,30 @@ 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_loading_non-standard_schemes_in_iframes.patch b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch index 13162b7e0437..90dcf6044f08 100644 --- a/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch +++ b/patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch @@ -28,10 +28,10 @@ The patch should be removed in favor of either: Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc -index 005c18b0685e504a7c323cb2a622e893955fe738..c9e55ca1da0e3f37777cc989511942e622ad05a8 100644 +index 6c16750bdb1b2ae425613f69ba1bff9ca7cbe289..43f2ff4d94038c7d25abb8c84911a14891ced137 100644 --- a/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc -@@ -11083,6 +11083,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() { +@@ -11136,6 +11136,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() { "blob"); } @@ -45,7 +45,7 @@ index 005c18b0685e504a7c323cb2a622e893955fe738..c9e55ca1da0e3f37777cc989511942e6 // origin of |common_params.url| and/or |common_params.initiator_origin|. url::Origin resolved_origin = url::Origin::Resolve( diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc -index ca61af9af555e267228430496118797eff130160..bb7c020ba1672e21a3ffee13ff1d3934bde0f099 100644 +index 60c15b898e642646f30f76c1a6b7a609b9322acb..cee2c36d633a9ad92fd7c2991efe90f7f2f7c8e3 100644 --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc @@ -2334,6 +2334,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() { diff --git a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch index 475f205dbbc6..a422ad8a1926 100644 --- a/patches/chromium/fix_disabling_background_throttling_in_compositor.patch +++ b/patches/chromium/fix_disabling_background_throttling_in_compositor.patch @@ -12,10 +12,10 @@ invisible state of the `viz::DisplayScheduler` owned by the `ui::Compositor`. diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc -index 008df596834faccfa19525dcae0239ffed7b2c3f..aecfa059c6ac53a3377e1f60b3c66bbb594514a3 100644 +index 70cf60c1e6afd16995cf3446d5ed9a87ce29e998..f886b4e9446c23f6b83d6d89165d09c6ab7f5d97 100644 --- a/ui/compositor/compositor.cc +++ b/ui/compositor/compositor.cc -@@ -361,7 +361,8 @@ void Compositor::SetLayerTreeFrameSink( +@@ -362,7 +362,8 @@ void Compositor::SetLayerTreeFrameSink( if (display_private_) { disabled_swap_until_resize_ = false; display_private_->Resize(size()); @@ -25,7 +25,7 @@ index 008df596834faccfa19525dcae0239ffed7b2c3f..aecfa059c6ac53a3377e1f60b3c66bbb display_private_->SetDisplayColorSpaces(display_color_spaces_); display_private_->SetDisplayColorMatrix( gfx::SkM44ToTransform(display_color_matrix_)); -@@ -581,7 +582,9 @@ void Compositor::SetVisible(bool visible) { +@@ -613,7 +614,9 @@ void Compositor::SetVisible(bool visible) { // updated then. We need to call this even if the visibility hasn't changed, // for the same reason. if (display_private_) @@ -36,7 +36,7 @@ index 008df596834faccfa19525dcae0239ffed7b2c3f..aecfa059c6ac53a3377e1f60b3c66bbb if (changed) { observer_list_.Notify(&CompositorObserver::OnCompositorVisibilityChanged, -@@ -1034,6 +1037,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() { +@@ -1077,6 +1080,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() { host_begin_frame_observer_->GetBoundRemote()); } @@ -53,10 +53,10 @@ index 008df596834faccfa19525dcae0239ffed7b2c3f..aecfa059c6ac53a3377e1f60b3c66bbb void Compositor::SetSeamlessRefreshRates( const std::vector& seamless_refresh_rates) { diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 3f52b93eab20108e40131472d8abdf9ff60bd191..ee19a847cf6d446a927734b9fdd3f1547a9f2d14 100644 +index 8d37f968825055d1d86da2cf0aac5d011fef7e8c..26ddb952b8473ff549d7af969156c78117277bd1 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h -@@ -512,6 +512,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -515,6 +515,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, const cc::LayerTreeSettings& GetLayerTreeSettings() const; @@ -67,7 +67,7 @@ index 3f52b93eab20108e40131472d8abdf9ff60bd191..ee19a847cf6d446a927734b9fdd3f154 size_t saved_events_metrics_count_for_testing() const { return host_->saved_events_metrics_count_for_testing(); } -@@ -703,6 +707,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -725,6 +729,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // See go/report-ux-metrics-at-painting for details. bool animation_started_ = false; diff --git a/patches/chromium/fix_export_zlib_symbols.patch b/patches/chromium/fix_export_zlib_symbols.patch index 3fa9be376ee2..dfbecaf128d9 100644 --- a/patches/chromium/fix_export_zlib_symbols.patch +++ b/patches/chromium/fix_export_zlib_symbols.patch @@ -6,7 +6,7 @@ Subject: fix: export zlib symbols This patch sets ZLIB_DLL so that we properly export zlib symbols. diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn -index 378bd0df75ca2283d2c87b31b3f8a50deda553ed..06dda222dd86f11fb9aa1a19bf1334d28a514bac 100644 +index 2a898d2a60cfa2f5167b10fabe95b327bb68bf23..361c80ba0b26e786a27ab264767ba75e1c888716 100644 --- a/third_party/zlib/BUILD.gn +++ b/third_party/zlib/BUILD.gn @@ -327,6 +327,10 @@ component("zlib") { diff --git a/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch b/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch index f0002496c6df..b152ed10c252 100644 --- a/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch +++ b/patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch @@ -53,7 +53,7 @@ index 8d7c5631fd8f1499c67384286f0e3c4037673b32..2b7bdfbac06a42e6bc51eb65e023c367 } // namespace gin diff --git a/third_party/blink/renderer/platform/bindings/script_state.cc b/third_party/blink/renderer/platform/bindings/script_state.cc -index e4a27a24c83dd1a478b2ada8b6c8220076790791..c76dc818f38a62fff63852dbecbc85e304ac731d 100644 +index 58aa3d5b24355a4346c9d6992e6090d28cad513f..96c28c190f98c76c0defeaabda092ebdf6fb44c6 100644 --- a/third_party/blink/renderer/platform/bindings/script_state.cc +++ b/third_party/blink/renderer/platform/bindings/script_state.cc @@ -13,6 +13,10 @@ namespace blink { @@ -76,7 +76,7 @@ index e4a27a24c83dd1a478b2ada8b6c8220076790791..c76dc818f38a62fff63852dbecbc85e3 RendererResourceCoordinator::Get()->OnScriptStateCreated(this, execution_context); } -@@ -79,6 +85,8 @@ void ScriptState::DissociateContext() { +@@ -80,6 +86,8 @@ void ScriptState::DissociateContext() { // Cut the reference from V8 context to ScriptState. GetContext()->SetAlignedPointerInEmbedderData(kV8ContextPerContextDataIndex, nullptr); diff --git a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch index 36992bfed42b..7b6af0ec881e 100644 --- a/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch +++ b/patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch @@ -75,7 +75,7 @@ index 9f82c7f92f735ed9f9569a8d299d23c7cb83e596..9b7598a26781da8b1e1c736460657402 PictureInPictureOcclusionTracker* 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 e8524bb6706ae06a0feabccbe44250580098e937..87b28c59d5a3abc49c7f5ed084ad78dcae02b39a 100644 +index 43dc9886e0e08d6651810b3f9b3ed5453d8c41ab..a67221e125c5335f45d289162889bd5085d892eb 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc @@ -430,11 +430,13 @@ std::unique_ptr VideoOverlayWindowViews::Create( diff --git a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch index bedbac426a77..47bf154ae0ec 100644 --- a/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch +++ b/patches/chromium/fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch @@ -13,7 +13,7 @@ messages in the legacy window handle layer. These conditions are regularly hit with WCO-enabled windows on Windows. diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc -index ffbef89276aeaa167424b67a07080b38457ec5d3..f39a79687595d7547e3a25fc4dc1cdbc5c2495b4 100644 +index c6e88cee8640c56aad01721ab667b4255bd64a60..2742df0532c890fe97adf4a0c430c7718e5e73b5 100644 --- a/content/browser/renderer_host/legacy_render_widget_host_win.cc +++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc @@ -328,12 +328,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message, diff --git a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch index 262ec694fc97..a29f701170f4 100644 --- a/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch +++ b/patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch @@ -87,10 +87,10 @@ index 75df43e3cd2721a92c90c18154d53d5c203e2465..ce42c75c8face36d21f53f44c0201ac4 // The view with active text input state, i.e., a focused element. // It will be nullptr if no such view exists. Note that the active view diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 1e6ee8c65d56f2821485f855bbf4e8bb8212058c..51355738262d80afaf1f319b5d90c8a74d435ffd 100644 +index f60cc24fbffc8421d18f259a47657f0c1cb6317f..ae5c9abd3c9374ad3f7a76d74420d0e723a4156a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -9834,7 +9834,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( +@@ -9952,7 +9952,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( "WebContentsImpl::OnFocusedElementChangedInFrame", "render_frame_host", frame); RenderWidgetHostViewBase* root_view = diff --git a/patches/chromium/fix_osr_stutter_fix_backport_for_electron.patch b/patches/chromium/fix_osr_stutter_fix_backport_for_electron.patch deleted file mode 100644 index 941dc93331bb..000000000000 --- a/patches/chromium/fix_osr_stutter_fix_backport_for_electron.patch +++ /dev/null @@ -1,290 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: reito -Date: Wed, 16 Apr 2025 14:09:50 +0800 -Subject: fix: osr stutter fix backport for electron. - -The animated_content_sampler is used to detect the animation frame rate -and adjust the capture frame rate accordingly. However, the detection -algorithm is buggy and can cause output to stutter. This patch is a -upstream patch to allow opt-out the animated_content_sampler. -https://crrev.org/c/6438681 - -diff --git a/components/viz/host/client_frame_sink_video_capturer.cc b/components/viz/host/client_frame_sink_video_capturer.cc -index 67aeb7222ae490cc62717bd7eb8aace022553e9c..11fe61903855b3ef52733aecc3288946bf572de3 100644 ---- a/components/viz/host/client_frame_sink_video_capturer.cc -+++ b/components/viz/host/client_frame_sink_video_capturer.cc -@@ -39,6 +39,17 @@ void ClientFrameSinkVideoCapturer::SetFormat(media::VideoPixelFormat format) { - capturer_remote_->SetFormat(format); - } - -+void ClientFrameSinkVideoCapturer::SetAnimationFpsLockIn( -+ bool enabled, -+ float majority_damaged_pixel_min_ratio) { -+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -+ -+ animated_content_sampler_enabled_ = enabled; -+ majority_damaged_pixel_min_ratio_ = majority_damaged_pixel_min_ratio; -+ capturer_remote_->SetAnimationFpsLockIn(enabled, -+ majority_damaged_pixel_min_ratio); -+} -+ - void ClientFrameSinkVideoCapturer::SetMinCapturePeriod( - base::TimeDelta min_capture_period) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -@@ -206,6 +217,10 @@ void ClientFrameSinkVideoCapturer::EstablishConnection() { - capturer_remote_->SetMinCapturePeriod(*min_capture_period_); - if (min_size_change_period_) - capturer_remote_->SetMinSizeChangePeriod(*min_size_change_period_); -+ if (animated_content_sampler_enabled_ && majority_damaged_pixel_min_ratio_) { -+ capturer_remote_->SetAnimationFpsLockIn(*animated_content_sampler_enabled_, -+ *majority_damaged_pixel_min_ratio_); -+ } - if (resolution_constraints_) { - capturer_remote_->SetResolutionConstraints( - resolution_constraints_->min_size, resolution_constraints_->max_size, -diff --git a/components/viz/host/client_frame_sink_video_capturer.h b/components/viz/host/client_frame_sink_video_capturer.h -index 8f0693b37dd0aa931a7fd77ddbdb515f0be5d64a..c0613570552072b3da219a920f902ad39a9f1cbc 100644 ---- a/components/viz/host/client_frame_sink_video_capturer.h -+++ b/components/viz/host/client_frame_sink_video_capturer.h -@@ -88,6 +88,8 @@ class VIZ_HOST_EXPORT ClientFrameSinkVideoCapturer - const gfx::Size& max_size, - bool use_fixed_aspect_ratio); - void SetAutoThrottlingEnabled(bool enabled); -+ void SetAnimationFpsLockIn(bool enabled, -+ float majority_damaged_pixel_min_ratio); - void ChangeTarget(const std::optional& target); - void ChangeTarget(const std::optional& target, - uint32_t sub_capture_target_version); -@@ -158,6 +160,8 @@ class VIZ_HOST_EXPORT ClientFrameSinkVideoCapturer - std::optional resolution_constraints_; - std::optional auto_throttling_enabled_; - std::optional target_; -+ std::optional animated_content_sampler_enabled_; -+ std::optional majority_damaged_pixel_min_ratio_; - uint32_t sub_capture_target_version_ = 0; - // Overlays are owned by the callers of CreateOverlay(). - std::vector> overlays_; -diff --git a/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc b/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc -index db02d9ad523dd1471b5c88cf6b1eade0b592e24f..e8a329f013f39c49056c7eebc7412e84a1b2e98c 100644 ---- a/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc -+++ b/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.cc -@@ -364,6 +364,18 @@ void FrameSinkVideoCapturerImpl::SetMinSizeChangePeriod( - oracle_->SetMinSizeChangePeriod(min_period); - } - -+void FrameSinkVideoCapturerImpl::SetAnimationFpsLockIn( -+ bool enabled, -+ float majority_damaged_pixel_min_ratio) { -+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); -+ -+ TRACE_EVENT_INSTANT("gpu.capture", "SetAnimationFpsLockIn", "enabled", -+ enabled, "majority_damaged_pixel_min_ratio", -+ majority_damaged_pixel_min_ratio); -+ -+ oracle_->SetAnimationFpsLockIn(enabled, majority_damaged_pixel_min_ratio); -+} -+ - void FrameSinkVideoCapturerImpl::SetResolutionConstraints( - const gfx::Size& min_size, - const gfx::Size& max_size, -diff --git a/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h b/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h -index 8d9036f835c5ced90872b66c8545c65097fd23cc..b387d22c31ab171cde19ceb4a4b5f2a4ce334d9e 100644 ---- a/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h -+++ b/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h -@@ -119,6 +119,8 @@ class VIZ_SERVICE_EXPORT FrameSinkVideoCapturerImpl final - const gfx::Size& max_size, - bool use_fixed_aspect_ratio) final; - void SetAutoThrottlingEnabled(bool enabled) final; -+ void SetAnimationFpsLockIn(bool enabled, -+ float majority_damaged_pixel_min_ratio) final; - void ChangeTarget(const std::optional& target, - uint32_t sub_capture_target_version) final; - void Start(mojo::PendingRemote consumer, -diff --git a/content/browser/devtools/devtools_video_consumer_unittest.cc b/content/browser/devtools/devtools_video_consumer_unittest.cc -index 3420c52fc9bb85057242d25429b00a7a8ec620cd..83ce6ecf31f1bb38de98ff81960aa1948bb5a4e3 100644 ---- a/content/browser/devtools/devtools_video_consumer_unittest.cc -+++ b/content/browser/devtools/devtools_video_consumer_unittest.cc -@@ -70,6 +70,8 @@ class MockFrameSinkVideoCapturer : public viz::mojom::FrameSinkVideoCapturer { - min_period_ = min_period; - MockSetMinSizeChangePeriod(min_period_); - } -+ MOCK_METHOD2(SetAnimationFpsLockIn, -+ void(bool enabled, float majority_damaged_pixel_min_ratio)); - MOCK_METHOD1(MockSetMinSizeChangePeriod, void(base::TimeDelta min_period)); - void SetResolutionConstraints(const gfx::Size& min_frame_size, - const gfx::Size& max_frame_size, -diff --git a/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc b/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc -index b236a38f7f108f823598ae2bf8dc07e53a190141..46a8e24a3ec9ad2ec42fc50c2ac7ab326508a873 100644 ---- a/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc -+++ b/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc -@@ -105,6 +105,8 @@ class MockFrameSinkVideoCapturer : public viz::mojom::FrameSinkVideoCapturer { - MOCK_METHOD1(SetFormat, void(media::VideoPixelFormat format)); - MOCK_METHOD1(SetMinCapturePeriod, void(base::TimeDelta min_period)); - MOCK_METHOD1(SetMinSizeChangePeriod, void(base::TimeDelta)); -+ MOCK_METHOD2(SetAnimationFpsLockIn, -+ void(bool enabled, float majority_damaged_pixel_min_ratio)); - MOCK_METHOD3(SetResolutionConstraints, - void(const gfx::Size& min_size, - const gfx::Size& max_size, -diff --git a/media/capture/content/animated_content_sampler.cc b/media/capture/content/animated_content_sampler.cc -index 6fe67268c1dcb23188200e49c100e985406a9feb..0fadaa2b768a42d3bad511224ad9d6e3ce337e70 100644 ---- a/media/capture/content/animated_content_sampler.cc -+++ b/media/capture/content/animated_content_sampler.cc -@@ -46,7 +46,10 @@ constexpr auto kDriftCorrection = base::Seconds(2); - - AnimatedContentSampler::AnimatedContentSampler( - base::TimeDelta min_capture_period) -- : min_capture_period_(min_capture_period), sampling_state_(NOT_SAMPLING) { -+ : min_capture_period_(min_capture_period), -+ sampling_state_(NOT_SAMPLING), -+ enabled_(true), -+ majority_damaged_pixel_min_ratio_(2.0f / 3) { - DCHECK_GT(min_capture_period_, base::TimeDelta()); - } - -@@ -64,6 +67,10 @@ void AnimatedContentSampler::SetTargetSamplingPeriod(base::TimeDelta period) { - void AnimatedContentSampler::ConsiderPresentationEvent( - const gfx::Rect& damage_rect, - base::TimeTicks event_time) { -+ if (!enabled_) { -+ return; // The sampler is disabled. -+ } -+ - // Analyze the current event and recent history to determine whether animating - // content is detected. - AddObservation(damage_rect, event_time); -@@ -132,6 +139,10 @@ void AnimatedContentSampler::ConsiderPresentationEvent( - } - - bool AnimatedContentSampler::HasProposal() const { -+ if (!enabled_) { -+ return false; -+ } -+ - return sampling_state_ != NOT_SAMPLING; - } - -@@ -230,8 +241,10 @@ bool AnimatedContentSampler::AnalyzeObservations( - if ((last_event_time - first_event_time) < kMinObservationWindow) { - return false; // Content has not animated for long enough for accuracy. - } -- if (num_pixels_damaged_in_chosen <= (num_pixels_damaged_in_all * 2 / 3)) -+ if (num_pixels_damaged_in_chosen <= -+ (num_pixels_damaged_in_all * majority_damaged_pixel_min_ratio_)) { - return false; // Animation is not damaging a supermajority of pixels. -+ } - - *rect = elected_rect; - DCHECK_GT(count_frame_durations, 0u); -diff --git a/media/capture/content/animated_content_sampler.h b/media/capture/content/animated_content_sampler.h -index 89d11829ac038ffeaafa3d4f0b811c6b2bd5665c..b5a325383813210956be7bcd59d8d41fa8c28d9b 100644 ---- a/media/capture/content/animated_content_sampler.h -+++ b/media/capture/content/animated_content_sampler.h -@@ -26,6 +26,15 @@ class CAPTURE_EXPORT AnimatedContentSampler { - explicit AnimatedContentSampler(base::TimeDelta min_capture_period); - ~AnimatedContentSampler(); - -+ // Set whether the animated content sampler would have proposal. -+ void SetEnabled(bool enabled) { enabled_ = enabled; } -+ -+ // Sets the minimum ratio of pixels in the majority-damaged region to all -+ // damaged region's area. -+ void SetMajorityDamagedRectMinRatio(float ratio) { -+ majority_damaged_pixel_min_ratio_ = ratio; -+ } -+ - // Sets a new minimum capture period. - void SetMinCapturePeriod(base::TimeDelta period); - -@@ -34,6 +43,7 @@ class CAPTURE_EXPORT AnimatedContentSampler { - base::TimeDelta target_sampling_period() const { - return target_sampling_period_; - } -+ - void SetTargetSamplingPeriod(base::TimeDelta period); - - // Examines the given presentation event metadata, along with recent history, -@@ -152,6 +162,13 @@ class CAPTURE_EXPORT AnimatedContentSampler { - - // The rewritten frame timestamp for the latest event. - base::TimeTicks frame_timestamp_; -+ -+ // Whether the animated content sampler is enabled -+ bool enabled_; -+ -+ // The minimum ratio of the majority damaged rect area among all damaged -+ // area's pixels -+ float majority_damaged_pixel_min_ratio_; - }; - - } // namespace media -diff --git a/media/capture/content/video_capture_oracle.h b/media/capture/content/video_capture_oracle.h -index 3bb10527f7850e795cb6608dd7e881dc90920eee..b7ac2d4404ae1fdc8a9983da16dcb2ad921b76bc 100644 ---- a/media/capture/content/video_capture_oracle.h -+++ b/media/capture/content/video_capture_oracle.h -@@ -54,6 +54,7 @@ class CAPTURE_EXPORT VideoCaptureOracle { - base::TimeDelta min_capture_period() const { - return smoothing_sampler_.min_capture_period(); - } -+ - void SetMinCapturePeriod(base::TimeDelta period); - - // Sets the range of acceptable capture sizes and whether a fixed aspect ratio -@@ -70,6 +71,19 @@ class CAPTURE_EXPORT VideoCaptureOracle { - // See: SetMinSizeChangePeriod(). - void SetAutoThrottlingEnabled(bool enabled); - -+ // Specifies whether the oracle should detect animation and try to target -+ // the animation frame rate. If |enabled|, the oracle will try to detect a -+ // majority damaged rect and its animation frame rate, and will respect the -+ // minimum damaged pixel ratio of the majority rect's area among all damaged -+ // rect areas set by |majority_damaged_pixel_min_ratio|. If the threshold not -+ // met, it will not use the animated content frame rate. -+ void SetAnimationFpsLockIn(bool enabled, -+ float majority_damaged_pixel_min_ratio) { -+ content_sampler_.SetEnabled(enabled); -+ content_sampler_.SetMajorityDamagedRectMinRatio( -+ majority_damaged_pixel_min_ratio); -+ } -+ - // Get/Update the source content size. Changes may not have an immediate - // effect on the proposed capture size, as the oracle will prevent too- - // frequent changes from occurring. -diff --git a/remoting/host/chromeos/frame_sink_desktop_capturer_unittest.cc b/remoting/host/chromeos/frame_sink_desktop_capturer_unittest.cc -index eeb4454bfd9500e4bae7544409ff4413fd0874aa..abe0cfb065a7e313b0ca3babd744fce75074ef45 100644 ---- a/remoting/host/chromeos/frame_sink_desktop_capturer_unittest.cc -+++ b/remoting/host/chromeos/frame_sink_desktop_capturer_unittest.cc -@@ -195,6 +195,10 @@ class MockFrameSinkVideoCapturer : public viz::mojom::FrameSinkVideoCapturer { - - MOCK_METHOD(void, SetAutoThrottlingEnabled, (bool enabled)); - -+ MOCK_METHOD(void, -+ SetAnimationFpsLockIn, -+ (bool enabled, float majority_damaged_pixel_min_ratio)); -+ - MOCK_METHOD(void, - SetResolutionConstraints, - (const Size& min_size, -diff --git a/services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom b/services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom -index f0ca9014a0e6b42f99becb7f1fdb9e214c81a16b..fbb002941ca1d36dc2bb12e9391b1faa799d771e 100644 ---- a/services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom -+++ b/services/viz/privileged/mojom/compositing/frame_sink_video_capture.mojom -@@ -156,6 +156,18 @@ interface FrameSinkVideoCapturer { - // Default, if never called: true. - SetAutoThrottlingEnabled(bool enabled); - -+ // Determines whether the capturer should detect animations and aim to match -+ // their frame rate. If |enabled| is true, the capturer will attempt to -+ // identify the majority damaged rect and its animation frame rate, -+ // while adhering to the |majority_damaged_pixel_min_ratio| threshold. -+ // This ratio is calculated as the area of the majority damaged rect -+ // divided by the total area of all damaged rects. An animation will only -+ // be considered valid if the ratio meets or exceeds the specified threshold. -+ // -+ // By default, this feature is enabled, with the ratio threshold set to 2/3. -+ SetAnimationFpsLockIn(bool enabled, -+ float majority_damaged_pixel_min_ratio); -+ - // Targets a different compositor frame sink. This may be called anytime, - // before or after Start(). - // diff --git a/patches/chromium/fix_remove_caption-removing_style_call.patch b/patches/chromium/fix_remove_caption-removing_style_call.patch index 3bc12bffae48..7c44d41deddb 100644 --- a/patches/chromium/fix_remove_caption-removing_style_call.patch +++ b/patches/chromium/fix_remove_caption-removing_style_call.patch @@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue for opaque frameless windows even with that block commented out. diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index cec234006cbcacff953ce9ff4175006b057aa341..29829e282edfa8821bd366a9e9a3755d7f3f8643 100644 +index 0113b1bce0eb7a7e3dfb3154a4844a9943b8633e..00e1438801381a2219402508dccd4b4fa15009e4 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc -@@ -1816,7 +1816,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { +@@ -1825,7 +1825,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) { SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS), 0); diff --git a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch index 23b8d8723968..eb41286a9cb7 100644 --- a/patches/chromium/fix_restore_original_resize_performance_on_macos.patch +++ b/patches/chromium/fix_restore_original_resize_performance_on_macos.patch @@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop vs mobile runtimes. i.e. restore the old logic only on desktop platforms diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 9bcab4e1e8a0fa429488555f4f7bd1c54888d10e..bb2e3afdd2b3c6579e32d7eeba59bfc06e952ea2 100644 +index 3419628c08b62a16c62778cc124c365aa19adec2..b1143074421e4ac37f1dc7041104bea3de1eaa4b 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2122,9 +2122,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { +@@ -2120,9 +2120,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() { void RenderWidgetHostImpl::NotifyScreenInfoChanged() { // The resize message (which may not happen immediately) will carry with it // the screen info as well as the new size (if the screen has changed scale diff --git a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch index 7820ed391296..78c56bc80a64 100644 --- a/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch +++ b/patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch @@ -20,7 +20,7 @@ index fc9cb7e68bdad4c40fab63f70243e09ad005ab80..199fbceda530da31aab9126d78b4bd21 injector_->ExpectsResults(), injector_->ShouldWaitForPromise()); } diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h -index 3758966f3cdfb8c37f3b23b1a903996b9d1ac5fb..a1c908e3281a03600268332d6cde2051aa225ff6 100644 +index 7934e6a8a2498acbe822df05e6087b885384c6d7..3026ebee29af3ead9f505292317160409a190b29 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h @@ -460,6 +460,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame { @@ -59,10 +59,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43 #endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 19efdf1f30eb5409f9d8a64f008891a2f4bda47c..0e1212d227ee5ffc536bd0349708a31db6ddfe28 100644 +index a4ac1a3d0d6390b5826195f72abc4544cdc2bf14..e6931d442540b9a2890e6d782ffe152772dbc8dd 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -3099,6 +3099,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3101,6 +3101,7 @@ void LocalFrame::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -70,7 +70,7 @@ index 19efdf1f30eb5409f9d8a64f008891a2f4bda47c..0e1212d227ee5ffc536bd0349708a31d BackForwardCacheAware back_forward_cache_aware, mojom::blink::WantResultOption want_result_option, mojom::blink::PromiseResultOption promise_behavior) { -@@ -3131,7 +3132,7 @@ void LocalFrame::RequestExecuteScript( +@@ -3133,7 +3134,7 @@ void LocalFrame::RequestExecuteScript( PausableScriptExecutor::CreateAndRun( script_state, std::move(script_sources), execute_script_policy, user_gesture, evaluation_timing, blocking_option, want_result_option, @@ -80,10 +80,10 @@ index 19efdf1f30eb5409f9d8a64f008891a2f4bda47c..0e1212d227ee5ffc536bd0349708a31d void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() { diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h -index 5cdeaa531babca965bed7e1e18ee993f1ba0d847..651e64c0ea39ec28db117aa3a61ea87d3f24117d 100644 +index 73d924f3675bc84bf0efad5a06abbf0af62ae336..070af1deb56dcd9399915ac436ecce96da19a36c 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h -@@ -815,6 +815,7 @@ class CORE_EXPORT LocalFrame final +@@ -823,6 +823,7 @@ class CORE_EXPORT LocalFrame final mojom::blink::EvaluationTiming, mojom::blink::LoadEventBlockingOption, WebScriptExecutionCallback, @@ -92,10 +92,10 @@ index 5cdeaa531babca965bed7e1e18ee993f1ba0d847..651e64c0ea39ec28db117aa3a61ea87d mojom::blink::WantResultOption, mojom::blink::PromiseResultOption); diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc -index ff24f4607190bc127a3da3aba0544cb6f67dde3f..9aa4f9d0356c078f5f42b06dc166686dc0c64b81 100644 +index 58b8f5b22c01d41cca3ec0088341d036917d5838..930d9fa36a616fe27d7b5b5a39436cbe375140bc 100644 --- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc +++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc -@@ -964,6 +964,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( +@@ -969,6 +969,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld( std::move(callback).Run(value ? std::move(*value) : base::Value()); }, std::move(callback)), @@ -215,10 +215,10 @@ index 5e12b61ba14cd1afb07b71ff15e73e905da0addc..685a2ebb6694c173471d045014932125 mojom::blink::WantResultOption::kWantResult, wait_for_promise); } diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index 6377ce1f6e3c6e6507d73a4bf151b54b30bf042a..0ceb0046224a901297cdf011d5d444e5dd1362c8 100644 +index f5adaadb9058e5fcad69d131f54ea06cb298b514..3315b02953685503d49a7e871fedf04262e80b71 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -@@ -1107,14 +1107,15 @@ void WebLocalFrameImpl::RequestExecuteScript( +@@ -1109,14 +1109,15 @@ void WebLocalFrameImpl::RequestExecuteScript( mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::LoadEventBlockingOption blocking_option, WebScriptExecutionCallback callback, @@ -237,7 +237,7 @@ index 6377ce1f6e3c6e6507d73a4bf151b54b30bf042a..0ceb0046224a901297cdf011d5d444e5 bool WebLocalFrameImpl::IsInspectorConnected() { diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h -index f52966d82c8e904e213e7b2c77ea6d28e980a8e8..940cf84db8ed28212243fac7c61d90f12d85735a 100644 +index 1b5e7a1a2bb5eb0b986dd6c61b4915d29a9a5667..19c8fdb320cbc84ba00b5e0b4b33a385b61b0db1 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h @@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final diff --git a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch index 9700e831af6c..e72c5c7f4855 100644 --- a/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch +++ b/patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch @@ -6,7 +6,7 @@ Subject: fix: select the first menu item when opened via keyboard This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed. diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc -index c5f3700f8f04b11b1a3dcc214dab40622652cd3a..43cbc0f8febd2330f47b5617b3dc9da9beac4962 100644 +index a777b6b4c61c24cd2885134cccd5ada7d035cd5e..1a41b716ce5366497e60a691c23c7e62627b5748 100644 --- a/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc @@ -701,6 +701,14 @@ void MenuController::Run(Widget* parent, diff --git a/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch b/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch index 28efacb95da2..cabe355bafb3 100644 --- a/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch +++ b/patches/chromium/fix_use_delegated_generic_capturer_when_available.patch @@ -15,10 +15,10 @@ capturer was window or screen-specific, as the IDs remain valid for generic capturer as well. diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc -index 010deff30b050c1de9324f969588385958bcb14e..b4b1e9ee805a8565a04737e0898ad8e46709c4d8 100644 +index 93823d191f63f81f79d370f85991f51747c39b46..715a761e3bea87381ccf43b86dddba9bc03bbe9e 100644 --- a/content/browser/media/capture/desktop_capture_device.cc +++ b/content/browser/media/capture/desktop_capture_device.cc -@@ -902,8 +902,14 @@ std::unique_ptr DesktopCaptureDevice::Create( +@@ -908,8 +908,14 @@ std::unique_ptr DesktopCaptureDevice::Create( switch (source.type) { case DesktopMediaID::TYPE_SCREEN: { @@ -35,7 +35,7 @@ index 010deff30b050c1de9324f969588385958bcb14e..b4b1e9ee805a8565a04737e0898ad8e4 if (screen_capturer && screen_capturer->SelectSource(source.id)) { capturer = std::make_unique( std::move(screen_capturer), options); -@@ -916,8 +922,14 @@ std::unique_ptr DesktopCaptureDevice::Create( +@@ -922,8 +928,14 @@ std::unique_ptr DesktopCaptureDevice::Create( } case DesktopMediaID::TYPE_WINDOW: { diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 71c8533d0137..59b698605880 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 9bf65e1e0c893e64cf6dc378fd9b8ae9363d954c..c7ea4d6a44a1c4cce129e9e269f2bcc04838272d 100644 +index d26c850e28b7df6992bf07fda2abe260ed4da769..008c131e5b4f84daeaee5ffe6ab7ae8836725ea5 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -4752,6 +4752,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -4782,6 +4782,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } @@ -20,10 +20,10 @@ index 9bf65e1e0c893e64cf6dc378fd9b8ae9363d954c..c7ea4d6a44a1c4cce129e9e269f2bcc0 } diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 7cfc3331a004fd52d9863a097271f4d892480933..55b0cae39e7aac22315d75b821a8b1123e762e15 100644 +index bc948f100fc20958f021da3b3b3005badfcb4f1a..283368c3e1e9852d5a7c567f741a68b3d3f901a7 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -339,6 +339,11 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -340,6 +340,11 @@ class CONTENT_EXPORT ContentBrowserClient { virtual ~ContentBrowserClient() = default; diff --git a/patches/chromium/gritsettings_resource_ids.patch b/patches/chromium/gritsettings_resource_ids.patch index 46270f266912..ca70709eb778 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 a0d9ecaa8da4b79fcb920c1d0ff10361aeb75b50..348660c41fdb20df7928bec25c1724666fb4067c 100644 +index ae88c5bbacce02484a7511ff6f1fd40a365aa4a0..61116106f8cffe626d46c990caea2ce41e5d3206 100644 --- a/tools/gritsettings/resource_ids.spec +++ b/tools/gritsettings/resource_ids.spec -@@ -1500,6 +1500,11 @@ +@@ -1508,6 +1508,11 @@ "<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": { "META": {"sizes": {"messages": [2000],}}, "messages": [10080], 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 86eddbcccf56..31be29e82575 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,7 +11,7 @@ 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 9cf06fbc79ffdc6cd44cd163e1924bc63c9099f6..944d5622c74e7df32b6ab26807442d80b27cc2bb 100755 +index b1a37f7449e3eda1d0fe16503c45e86a2c207b7c..a01822fb1057eacd785dba63917ef927f3680aa4 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py @@ -304,6 +304,8 @@ def GetDefaultHostOs(): diff --git a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch index 36b9ec492ee0..7c67497bc364 100644 --- a/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch +++ b/patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch @@ -9,7 +9,7 @@ at rutime. It would be best if eventually all usages of this property were replaced with clean ozone native implementations. diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc -index 35023e37a34bbcdcfa09cbdad55648f8e0419b37..9a10db499bd0a48feb1c96f87e71af4ffb114d75 100644 +index dcca94fc47fb95a431cfc7c7c9765288f35d3440..c8ae2c0b4b26e1547c0bdfd81ac3ae0d51bab76b 100644 --- a/ui/ozone/platform/x11/ozone_platform_x11.cc +++ b/ui/ozone/platform/x11/ozone_platform_x11.cc @@ -194,6 +194,7 @@ class OzonePlatformX11 : public OzonePlatform, @@ -18,10 +18,10 @@ index 35023e37a34bbcdcfa09cbdad55648f8e0419b37..9a10db499bd0a48feb1c96f87e71af4f properties->skia_can_fall_back_to_x11 = true; + properties->electron_can_call_x11 = true; properties->platform_shows_drag_image = false; - properties->supports_global_application_menus = true; properties->app_modal_dialogs_use_event_blocker = true; + properties->fetch_buffer_formats_for_gmb_on_gpu = true; diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h -index e35bd769c53a544b8a1387f6c25e1ae376643b3d..be7d09d9003011ef4f609f66b8c51a12aa410d80 100644 +index 1384e1620dc07874e2103d12cd6f31da5ca7a821..7c8639f6f57fd3b8977bbb3d811edf466b4ccc64 100644 --- a/ui/ozone/public/ozone_platform.h +++ b/ui/ozone/public/ozone_platform.h @@ -129,6 +129,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform { diff --git a/patches/chromium/load_v8_snapshot_in_browser_process.patch b/patches/chromium/load_v8_snapshot_in_browser_process.patch index ece0963c33e4..a6820dea05d6 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 4e7e5c5f506144f8d523dc60f5a1ff94de9aad2e..2474e8c608956bcf50e0c7204d728854fe498d31 100644 +index e81e89be0e190b3400023b3105b7774c19428f72..7550d3eb796059aeb108f25071c8028bddebb100 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -293,11 +293,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) { +@@ -294,11 +294,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/make_gtk_getlibgtk_public.patch b/patches/chromium/make_gtk_getlibgtk_public.patch index ef7434072eed..9a0c214c6a36 100644 --- a/patches/chromium/make_gtk_getlibgtk_public.patch +++ b/patches/chromium/make_gtk_getlibgtk_public.patch @@ -7,7 +7,7 @@ Allows embedders to get a handle to the gdk_pixbuf library already loaded in the process. diff --git a/ui/gtk/gtk_compat.cc b/ui/gtk/gtk_compat.cc -index d6ac3233de3165d2be3e5d4fb3e221dca8b8d415..4f15069af07b7adc3e3c45e67e23ec8525668c21 100644 +index f28cf275db0205186fe6143b7e1550b6c30a4435..346992e202c507eeac454d657507e1bd336175fc 100644 --- a/ui/gtk/gtk_compat.cc +++ b/ui/gtk/gtk_compat.cc @@ -69,11 +69,6 @@ void* GetLibGio() { diff --git a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch index 2cebf3e864d8..ebadc4ade1c4 100644 --- a/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch +++ b/patches/chromium/mas_avoid_private_macos_api_usage.patch.patch @@ -35,10 +35,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to system priority. diff --git a/base/BUILD.gn b/base/BUILD.gn -index 70444961a612c3340e8a689f2cf002918be75366..aa055d6e5f9b8a72587cd8c9fbc7203a15352553 100644 +index d62d3c4a82579a5b308f28b941db0cc8e48d0e37..865519a1179d573b0a99ec32d9dcd81f04c0f9d6 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn -@@ -1040,6 +1040,7 @@ component("base") { +@@ -1045,6 +1045,7 @@ component("base") { "//build:ios_buildflags", "//build/config/compiler:compiler_buildflags", "//third_party/modp_b64", @@ -81,10 +81,10 @@ index 4bf9a3c27e05c6635b2beb8e880b5b43dbed61b5..f328fbb49c45991f44a9c75325491d08 } // namespace base diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc -index 1baeaec5125bbdc19dccbd18c8702f291ccc71ba..613c644eda45c7e4bf1a7a06dad6d8b4b85daa11 100644 +index 29e6d750c5c688f1673a8495156a4b7bcd0ddb44..45a3f6e74221be7498f0ebb8133abbbd4dea10ed 100644 --- a/base/process/launch_mac.cc +++ b/base/process/launch_mac.cc -@@ -21,13 +21,19 @@ +@@ -21,6 +21,10 @@ #include "base/threading/scoped_blocking_call.h" #include "base/threading/thread_restrictions.h" #include "base/trace_event/base_tracing.h" @@ -93,6 +93,9 @@ index 1baeaec5125bbdc19dccbd18c8702f291ccc71ba..613c644eda45c7e4bf1a7a06dad6d8b4 +#include +#endif + #if BUILDFLAG(IS_MAC) + #include "base/apple/mach_port_rendezvous_mac.h" +@@ -29,9 +33,11 @@ extern "C" { // Changes the current thread's directory to a path or directory file // descriptor. @@ -104,7 +107,7 @@ index 1baeaec5125bbdc19dccbd18c8702f291ccc71ba..613c644eda45c7e4bf1a7a06dad6d8b4 int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim); -@@ -104,13 +110,27 @@ class PosixSpawnFileActions { +@@ -108,13 +114,27 @@ class PosixSpawnFileActions { #if !BUILDFLAG(IS_MAC) int ChangeCurrentThreadDirectory(const char* path) { @@ -132,7 +135,7 @@ index 1baeaec5125bbdc19dccbd18c8702f291ccc71ba..613c644eda45c7e4bf1a7a06dad6d8b4 } #endif -@@ -234,7 +254,7 @@ Process LaunchProcess(const std::vector& argv, +@@ -238,7 +258,7 @@ Process LaunchProcess(const std::vector& argv, file_actions.Inherit(STDERR_FILENO); } @@ -382,7 +385,7 @@ index 127a2829fafa04bfbab0b883304dfb815d7e1c22..61d7946e52862f3586b1e098d7d44a12 // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that // can only be accomplished by overriding methods. diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm -index 2b50e3c3750c9ac6dd84a514663062a5d754b43e..49ced9aa87d3bcb00cd3d76ac32d4eec89873549 100644 +index fd680a4d99d14ce4203e696dd262e1b642394e55..1765e6f44b2d80338f6c20ec65921685c5dc98d5 100644 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm @@ -26,6 +26,7 @@ @@ -393,7 +396,7 @@ index 2b50e3c3750c9ac6dd84a514663062a5d754b43e..49ced9aa87d3bcb00cd3d76ac32d4eec #include "ui/accessibility/platform/ax_platform_node.h" #import "ui/base/cocoa/user_interface_item_command_handler.h" #import "ui/base/cocoa/window_size_constants.h" -@@ -112,14 +113,18 @@ void OrderChildWindow(NSWindow* child_window, +@@ -113,14 +114,18 @@ void OrderChildWindow(NSWindow* child_window, } // namespace @@ -412,7 +415,7 @@ index 2b50e3c3750c9ac6dd84a514663062a5d754b43e..49ced9aa87d3bcb00cd3d76ac32d4eec - (BOOL)hasKeyAppearance; - (long long)_resizeDirectionForMouseLocation:(CGPoint)location; - (BOOL)_isConsideredOpenForPersistentState; -@@ -159,6 +164,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event { +@@ -170,6 +175,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event { } @end @@ -421,7 +424,7 @@ index 2b50e3c3750c9ac6dd84a514663062a5d754b43e..49ced9aa87d3bcb00cd3d76ac32d4eec @implementation NativeWidgetMacNSWindowTitledFrame - (void)mouseDown:(NSEvent*)event { if (self.window.isMovable) -@@ -186,6 +193,8 @@ - (BOOL)usesCustomDrawing { +@@ -197,6 +204,8 @@ - (BOOL)usesCustomDrawing { } @end @@ -430,7 +433,7 @@ index 2b50e3c3750c9ac6dd84a514663062a5d754b43e..49ced9aa87d3bcb00cd3d76ac32d4eec @implementation NativeWidgetMacNSWindow { @private CommandDispatcher* __strong _commandDispatcher; -@@ -383,6 +392,8 @@ - (NSAccessibilityRole)accessibilityRole { +@@ -394,6 +403,8 @@ - (NSAccessibilityRole)accessibilityRole { // NSWindow overrides. @@ -439,7 +442,7 @@ index 2b50e3c3750c9ac6dd84a514663062a5d754b43e..49ced9aa87d3bcb00cd3d76ac32d4eec + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { if (windowStyle & NSWindowStyleMaskTitled) { if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class]) -@@ -394,6 +405,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { +@@ -405,6 +416,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle { return [super frameViewClassForStyleMask:windowStyle]; } @@ -449,7 +452,7 @@ index 2b50e3c3750c9ac6dd84a514663062a5d754b43e..49ced9aa87d3bcb00cd3d76ac32d4eec bool shouldShowWindowTitle = YES; if (_bridge) 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 5c0a53152095c2f799251f78b3c3464504104bfc..2c81ecef35d40036111cbd3dbdb44f7086d8946e 100644 +index 0b964e176e59e77a0743e2d347aa185bc7c80bc5..49a60b9aa0597c3397906303b73a4c1650cc60ce 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 @@ -42,6 +42,7 @@ @@ -460,7 +463,7 @@ index 5c0a53152095c2f799251f78b3c3464504104bfc..2c81ecef35d40036111cbd3dbdb44f70 #include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "net/cert/x509_util_apple.h" #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" -@@ -679,10 +680,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { +@@ -681,10 +682,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) { // this should be treated as an error and caught early. CHECK(bridged_view_); @@ -474,18 +477,18 @@ index 5c0a53152095c2f799251f78b3c3464504104bfc..2c81ecef35d40036111cbd3dbdb44f70 // Beware: This view was briefly removed (in favor of a bare CALayer) in // https://crrev.com/c/1236675. The ordering of unassociated layers relative diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn -index 3c4ab01a87d5011925e08ca296722d99ac7f33d4..41c3a5128b9936f48587d6fc6ddd2050bffc9c36 100644 +index 4704b26c54e7bd449a6e57de43b7c4b0875732c9..e3b4148376f5a93f053b88e179f51cb642d896ed 100644 --- a/components/viz/service/BUILD.gn +++ b/components/viz/service/BUILD.gn -@@ -384,6 +384,7 @@ viz_component("service") { +@@ -385,6 +385,7 @@ viz_component("service") { "frame_sinks/external_begin_frame_source_mac.h", ] } + deps += ["//electron/build/config:generate_mas_config"] } - if (is_android || use_ozone) { -@@ -684,6 +685,7 @@ viz_source_set("unit_tests") { + if (is_ios) { +@@ -697,6 +698,7 @@ viz_source_set("unit_tests") { "display_embedder/software_output_device_mac_unittest.mm", ] frameworks = [ "IOSurface.framework" ] @@ -579,10 +582,10 @@ index 4017ee032569466f5311e5c9612c82c086eab935..f2499bc084312a09b2324567d270fc1b return kAttributes; } diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index e0c49c4984509685acbcb3718bbf04b2909e3f16..5b8ea681dfee77a08bb451ec19f6e5d7ddf5b6d8 100644 +index f999eb6aeb11b59c6231b8f80d9e0d586b341171..679ee6731e685a9844bb6461d664f8e5b823e258 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -339,6 +339,7 @@ source_set("browser") { +@@ -341,6 +341,7 @@ source_set("browser") { "//ui/webui/resources", "//v8", "//v8:v8_version", @@ -625,10 +628,10 @@ index 1b923f0e0dc6d7dc9e67d278b8da00b35745241e..6f7ee79df9b9e3026663e2a4637007de // 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 1f9fbdbc7d617adb019fb8a207baad817b5a8a0e..1a726fb4a9e8173dc7da6901eb1632c7f326358e 100644 +index 27f481c6a31cdd59684eb38ea8b2ffdcb5849ddf..88a6090a49da6071fded348a901c7c62b647b503 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -49,6 +49,7 @@ +@@ -50,6 +50,7 @@ #include "content/public/browser/render_widget_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/page_visibility_state.h" @@ -636,7 +639,7 @@ index 1f9fbdbc7d617adb019fb8a207baad817b5a8a0e..1a726fb4a9e8173dc7da6901eb1632c7 #include "media/base/media_switches.h" #include "skia/ext/platform_canvas.h" #include "skia/ext/skia_utils_mac.h" -@@ -275,8 +276,10 @@ +@@ -274,8 +275,10 @@ void RenderWidgetHostViewMac::MigrateNSViewBridge( remote_cocoa::mojom::Application* remote_cocoa_application, uint64_t parent_ns_view_id) { @@ -647,18 +650,20 @@ index 1f9fbdbc7d617adb019fb8a207baad817b5a8a0e..1a726fb4a9e8173dc7da6901eb1632c7 // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling // pointers. `ns_view_` gets reinitialized later in this method. -@@ -1633,8 +1636,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1632,10 +1635,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, gfx::NativeViewAccessible RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() { +#if !IS_MAS_BUILD() - if (remote_window_accessible_) - return remote_window_accessible_; + if (remote_window_accessible_) { + return gfx::NativeViewAccessible( + (id)remote_window_accessible_); + } +#endif - return [GetInProcessNSView() window]; + return gfx::NativeViewAccessible([GetInProcessNSView() window]); } -@@ -1683,9 +1688,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -1687,9 +1692,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, } void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) { @@ -670,12 +675,12 @@ index 1f9fbdbc7d617adb019fb8a207baad817b5a8a0e..1a726fb4a9e8173dc7da6901eb1632c7 } bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame( -@@ -2212,20 +2219,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, +@@ -2216,20 +2223,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback, void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken( GetRenderWidgetAccessibilityTokenCallback callback) { base::ProcessId pid = getpid(); +#if !IS_MAS_BUILD() - id element_id = GetNativeViewAccessible(); + id element_id = GetNativeViewAccessible().Get(); std::vector token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id); std::move(callback).Run(pid, token); @@ -710,10 +715,10 @@ index fb23dfd8f90ad3eeb55e4db373ca67f75d8e5ce1..df902b0b01ed4d092070a92fdf77cf69 defines = [] diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn -index dcb22228bcc86d081c9d0a0a7bdeab896ed07ca7..3e863d861c22e044099e227346845bb6422e21fd 100644 +index 7424d33cc34ca44b1949260215b2f0a44a2d393e..80e284ca761069e5d544b5a056b13df32d509d00 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn -@@ -331,6 +331,7 @@ target(link_target_type, "renderer") { +@@ -327,6 +327,7 @@ target(link_target_type, "renderer") { "//ui/surface", "//url", "//v8", @@ -792,10 +797,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe } // namespace content diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn -index 2e308872830d0e4105d381dc5bd702942b11de9a..201258c8995de5e8d9f2beadba0f7b34c86bcb6f 100644 +index 89e50cc56259e90a4ec955bb846c793f2d42cfd6..f64c1614bd8d9782d1c9f9bca20e2f8926893a0f 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn -@@ -660,6 +660,7 @@ static_library("test_support") { +@@ -662,6 +662,7 @@ static_library("test_support") { "//url", "//url/mojom:url_mojom_gurl", "//v8", @@ -803,7 +808,7 @@ index 2e308872830d0e4105d381dc5bd702942b11de9a..201258c8995de5e8d9f2beadba0f7b34 ] data_deps = [ -@@ -1113,6 +1114,7 @@ static_library("browsertest_support") { +@@ -1115,6 +1116,7 @@ static_library("browsertest_support") { } configs += [ "//v8:external_startup_data" ] @@ -811,7 +816,7 @@ index 2e308872830d0e4105d381dc5bd702942b11de9a..201258c8995de5e8d9f2beadba0f7b34 } mojom("content_test_mojo_bindings") { -@@ -1950,6 +1952,7 @@ test("content_browsertests") { +@@ -1956,6 +1958,7 @@ test("content_browsertests") { "//ui/shell_dialogs", "//ui/snapshot", "//ui/webui:test_support", @@ -819,7 +824,7 @@ index 2e308872830d0e4105d381dc5bd702942b11de9a..201258c8995de5e8d9f2beadba0f7b34 ] if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) { -@@ -3268,6 +3271,7 @@ test("content_unittests") { +@@ -3280,6 +3283,7 @@ test("content_unittests") { "//ui/shell_dialogs:shell_dialogs", "//ui/webui:test_support", "//url", @@ -840,11 +845,11 @@ index 8779cf7cbbe2a583fda51867eaebc627f00bd4cd..98da1587fdc8cc8358a69db2b51d3982 # TODO(crbug.com/40139469): Blink test plugin must be migrated from PPAPI. diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn -index 16407ea4758addb6f6b56dc044d58cde0922897a..98cf8359b412a61b48aa87b607740bbeda4ca159 100644 +index e69ef178a08ef322764809e6afeffa20ffc0cd13..d2e182ed0dad5aeecb48e5a39771880bd8fb408b 100644 --- a/device/bluetooth/BUILD.gn +++ b/device/bluetooth/BUILD.gn -@@ -257,6 +257,7 @@ component("bluetooth") { - "IOKit.framework", +@@ -256,6 +256,7 @@ component("bluetooth") { + "CoreBluetooth.framework", "Foundation.framework", ] + deps += ["//electron/build/config:generate_mas_config"] @@ -898,10 +903,10 @@ index 6431af67ab634cf23729b9102c189b2181cfd2cf..22040e1bfb96d810a2d8e62e44e4afbc base::WeakPtr diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn -index 973cd337f2781271b4ca3e29db07939ec6917327..90658a336138e4e50f93c38f1c1f465c1c2bd4dc 100644 +index 81d64e16df0139107bc65c7924bdc467fa392657..3098b80c3dba6e4f8150eae3c5796b1e11c5c899 100644 --- a/gpu/ipc/service/BUILD.gn +++ b/gpu/ipc/service/BUILD.gn -@@ -135,6 +135,7 @@ component("service") { +@@ -129,6 +129,7 @@ component("service") { "QuartzCore.framework", ] defines += [ "GL_SILENCE_DEPRECATION" ] @@ -932,10 +937,10 @@ index ae040bbac8755b677dc6e19383a2390df407e5a6..e95ca30f49506c66a37d6d5269929f43 namespace ui { diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 7122165cf5ddb39056369e32fc29107f29e9f425..f11417e459e067f4976f59f1c58d4a5197520902 100644 +index 8bcbb663710445e977a3080209cd518d3fc2c6e0..0680d3af1f219235e20c0e83b80c0ea9cbf7b3a1 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -196,6 +196,7 @@ source_set("audio") { +@@ -198,6 +198,7 @@ source_set("audio") { "CoreMedia.framework", ] weak_frameworks = [ "ScreenCaptureKit.framework" ] # macOS 13.0 @@ -944,7 +949,7 @@ index 7122165cf5ddb39056369e32fc29107f29e9f425..f11417e459e067f4976f59f1c58d4a51 if (is_ios) { diff --git a/media/audio/apple/audio_low_latency_input.cc b/media/audio/apple/audio_low_latency_input.cc -index da17e30384033a795e35d9cd27f16aa1a2b1ad24..f98dc86b19569290d81e7d2a172c1f217a72d00e 100644 +index 098f383475c5958adf02fa3e30c2ba0dcf0a4252..59c958af92ef85bcc329bf0aa69095ca8d2f1d6a 100644 --- a/media/audio/apple/audio_low_latency_input.cc +++ b/media/audio/apple/audio_low_latency_input.cc @@ -29,6 +29,7 @@ @@ -1579,7 +1584,7 @@ index dcf493d62990018040a3f84b6f875af737bd2214..3d1c4dcc9ee0bbfdac15f40d9c74e9f3 void DisplayCALayerTree::GotIOSurfaceFrame( diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn -index 6207f4941839fdc5a44dc5fe61f50281503623d4..d2d635c1bd2e0497b7fbab331b48e753fae1013e 100644 +index 30440d1b5ba071c8cf2076e7e7acb24681f78a2f..ca18e61ff2eb743fabeb10af06c208f84b526dd8 100644 --- a/ui/accessibility/platform/BUILD.gn +++ b/ui/accessibility/platform/BUILD.gn @@ -295,6 +295,7 @@ component("platform") { @@ -1591,10 +1596,10 @@ index 6207f4941839fdc5a44dc5fe61f50281503623d4..d2d635c1bd2e0497b7fbab331b48e753 if (is_ios) { diff --git a/ui/accessibility/platform/browser_accessibility_manager_mac.mm b/ui/accessibility/platform/browser_accessibility_manager_mac.mm -index 71c78a4d3350b6a01cd1f8321f0c1faebc829b0f..79c54d9d5c1b335b3877199a64c6d3f940c5a85b 100644 +index 6d4f3f6f0b4419d6572704dd127965b8df5b5949..0b7d8e68ec1f24e307c6fad6a55aecc3ec7b4690 100644 --- a/ui/accessibility/platform/browser_accessibility_manager_mac.mm +++ b/ui/accessibility/platform/browser_accessibility_manager_mac.mm -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ #include "base/task/single_thread_task_runner.h" #include "base/task/task_traits.h" #include "base/time/time.h" @@ -1602,7 +1607,7 @@ index 71c78a4d3350b6a01cd1f8321f0c1faebc829b0f..79c54d9d5c1b335b3877199a64c6d3f9 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h" #include "ui/accessibility/accessibility_features.h" #include "ui/accessibility/ax_role_properties.h" -@@ -20,7 +21,9 @@ +@@ -21,7 +22,9 @@ #include "ui/accessibility/platform/ax_private_webkit_constants_mac.h" #import "ui/accessibility/platform/browser_accessibility_cocoa.h" #import "ui/accessibility/platform/browser_accessibility_mac.h" @@ -1612,7 +1617,7 @@ index 71c78a4d3350b6a01cd1f8321f0c1faebc829b0f..79c54d9d5c1b335b3877199a64c6d3f9 namespace { -@@ -228,6 +231,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -230,6 +233,7 @@ void PostAnnouncementNotification(NSString* announcement, return; } @@ -1620,7 +1625,7 @@ index 71c78a4d3350b6a01cd1f8321f0c1faebc829b0f..79c54d9d5c1b335b3877199a64c6d3f9 BrowserAccessibilityManager* root_manager = GetManagerForRootFrame(); if (root_manager) { BrowserAccessibilityManagerMac* root_manager_mac = -@@ -250,6 +254,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -252,6 +256,7 @@ void PostAnnouncementNotification(NSString* announcement, return; } } @@ -1628,7 +1633,7 @@ index 71c78a4d3350b6a01cd1f8321f0c1faebc829b0f..79c54d9d5c1b335b3877199a64c6d3f9 // Use native VoiceOver support for live regions. BrowserAccessibilityCocoa* retained_node = native_node; -@@ -662,6 +667,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -668,6 +673,7 @@ void PostAnnouncementNotification(NSString* announcement, return window == [NSApp accessibilityFocusedWindow]; } @@ -1636,7 +1641,7 @@ index 71c78a4d3350b6a01cd1f8321f0c1faebc829b0f..79c54d9d5c1b335b3877199a64c6d3f9 // TODO(accessibility): We need a solution to the problem described below. // If the window is NSAccessibilityRemoteUIElement, there are some challenges: // 1. NSApp is the browser which spawned the PWA, and what it considers the -@@ -690,6 +696,7 @@ void PostAnnouncementNotification(NSString* announcement, +@@ -696,6 +702,7 @@ void PostAnnouncementNotification(NSString* announcement, if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) { return true; } @@ -1645,7 +1650,7 @@ index 71c78a4d3350b6a01cd1f8321f0c1faebc829b0f..79c54d9d5c1b335b3877199a64c6d3f9 return false; } diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm -index c8171f0527fe5194f0ea73b57c4444d4c630fbc4..c2ac4da580e3e7f749a0a4de1e859af62de11672 100644 +index 6846060ef9622d8fc8d1d6c8da16e2f1b785e6bd..05c22db87e882b246bd7034e027cf1495376b6c6 100644 --- a/ui/accessibility/platform/inspect/ax_transform_mac.mm +++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm @@ -11,6 +11,7 @@ @@ -1673,7 +1678,7 @@ index c8171f0527fe5194f0ea73b57c4444d4c630fbc4..c2ac4da580e3e7f749a0a4de1e859af6 // Accessible object if (AXElementWrapper::IsValidElement(value)) { diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index a89628087cf9e38a95314972a4d2c38e39176005..2e05b5a472f36d3bff8769cde514820a3e622f4b 100644 +index 8abb389faddb435980c1c06c3d69e33d5bf13881..62bb9b60b54252a44590616142a0beabbf6b55bf 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn @@ -365,6 +365,13 @@ component("base") { @@ -1843,10 +1848,10 @@ index 874ac9d572931fe175ccab8beb7738fe0a7b3c1b..b70e2a8a7be9e00a379f47c77589dde6 // Query the display's refresh rate. if (@available(macos 12.0, *)) { diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn -index 428ba0136f09ace2652e96b0928f84b59048e4ba..9ab318c4f56728eb675d8faa3a17a29f7079905c 100644 +index e531cb42cde9863ff1c4a13150f35877b564226c..0c0ec308be02297b090d08b52cc713c22652da36 100644 --- a/ui/gfx/BUILD.gn +++ b/ui/gfx/BUILD.gn -@@ -335,6 +335,12 @@ component("gfx") { +@@ -337,6 +337,12 @@ component("gfx") { "//ui/base:ui_data_pack", ] @@ -1898,10 +1903,10 @@ index fe3f85073e31de487a08e57d7f9b07aa4eccf8f3..cf5b07203c8bd559a404600cc98cc8ec // enough. return PlatformFontMac::SystemFontType::kGeneral; diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn -index f24cdf1484910c6fdc706aefc22c97669e245e57..efcd1779c0f105510c298ac9778792cfc8108847 100644 +index a8f20a694252ae90eb6c6c7d77d250dcdb2df1a3..8e3f87df5e1345ddeb12cb424abaf3a442798320 100644 --- a/ui/views/BUILD.gn +++ b/ui/views/BUILD.gn -@@ -721,6 +721,8 @@ component("views") { +@@ -715,6 +715,8 @@ component("views") { "IOSurface.framework", "QuartzCore.framework", ] @@ -1910,7 +1915,7 @@ index f24cdf1484910c6fdc706aefc22c97669e245e57..efcd1779c0f105510c298ac9778792cf } if (is_win) { -@@ -1148,6 +1150,8 @@ source_set("test_support") { +@@ -1142,6 +1144,8 @@ source_set("test_support") { "//ui/base/mojom:ui_base_types", ] @@ -1955,7 +1960,7 @@ index cbd0b7708a7afd39852a7f75a21173d5b8a71a5e..1e8d5b3f66992a6bcbecd7149c459823 // 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 edf13478844a9686cfbfbd4d96214044c03134b4..7bda1853d47034c80a4e416b9839e8d18c5a8e2c 100644 +index 22ac01614becd53955914c44be13886d775b683e..235899693e2f2d340cc63df1ded3dfe3c9775cee 100644 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm @@ -21,6 +21,7 @@ @@ -1966,31 +1971,33 @@ index edf13478844a9686cfbfbd4d96214044c03134b4..7bda1853d47034c80a4e416b9839e8d1 #include "mojo/public/cpp/bindings/self_owned_associated_receiver.h" #include "ui/accelerated_widget_mac/window_resize_helper_mac.h" #include "ui/accessibility/accessibility_features.h" -@@ -357,7 +358,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -357,8 +358,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, if (in_process_ns_window_bridge_) { - return in_process_ns_window_bridge_->ns_view(); + return gfx::NativeViewAccessible(in_process_ns_window_bridge_->ns_view()); } +#if !IS_MAS_BUILD() - return remote_view_accessible_; + return gfx::NativeViewAccessible( + (id)remote_view_accessible_); +#else -+ return nullptr; ++ return {}; +#endif } gfx::NativeViewAccessible -@@ -372,7 +377,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, - return [in_process_ns_window_bridge_->ns_view() window]; +@@ -374,8 +379,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator, + [in_process_ns_window_bridge_->ns_view() window]); } +#if !IS_MAS_BUILD() - return remote_window_accessible_; + return gfx::NativeViewAccessible( + (id)remote_window_accessible_); +#else -+ return nullptr; ++ return {}; +#endif } remote_cocoa::mojom::NativeWidgetNSWindow* -@@ -1384,9 +1393,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1387,9 +1396,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, // for PWAs. However this breaks accessibility on in-process windows, // so set it back to NO when a local window gains focus. See // https://crbug.com/41485830. @@ -2002,7 +2009,7 @@ index edf13478844a9686cfbfbd4d96214044c03134b4..7bda1853d47034c80a4e416b9839e8d1 // Explicitly set the keyboard accessibility state on regaining key // window status. if (is_key && is_content_first_responder) { -@@ -1527,17 +1538,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1530,17 +1541,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( const std::vector& window_token, const std::vector& view_token) { @@ -2023,7 +2030,7 @@ index edf13478844a9686cfbfbd4d96214044c03134b4..7bda1853d47034c80a4e416b9839e8d1 *pid = getpid(); id element_id = GetNativeViewAccessible(); -@@ -1550,6 +1564,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, +@@ -1553,6 +1567,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, } *token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id); 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 b79aaef2ab0a..f41dfead21c2 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,10 +7,10 @@ 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 8014bb16d8108115f901346fa4ed4d84220d86c5..ee56aab6831be256390b88e65a2a949c591bbd31 100644 +index 1b26d15252c4f2799772fbbdbf983ffc0891de5c..b55c17b34e5cc5e367e28c834125c4c74f6cef77 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc -@@ -159,6 +159,11 @@ +@@ -162,6 +162,11 @@ #include "services/network/web_transport.h" #include "url/gurl.h" @@ -22,7 +22,7 @@ index 8014bb16d8108115f901346fa4ed4d84220d86c5..ee56aab6831be256390b88e65a2a949c #if BUILDFLAG(IS_CT_SUPPORTED) // gn check does not account for BUILDFLAG(). So, for iOS builds, it will // complain about a missing dependency on the target exposing this header. Add a -@@ -598,6 +603,99 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) { +@@ -601,6 +606,99 @@ void RecordHSTSPreconnectUpgradeReason(HSTSRedirectUpgradeReason reason) { } // namespace @@ -122,7 +122,7 @@ index 8014bb16d8108115f901346fa4ed4d84220d86c5..ee56aab6831be256390b88e65a2a949c constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess; NetworkContext::NetworkContextHttpAuthPreferences:: -@@ -994,6 +1092,13 @@ void NetworkContext::SetClient( +@@ -997,6 +1095,13 @@ void NetworkContext::SetClient( client_.Bind(std::move(client)); } @@ -136,7 +136,7 @@ index 8014bb16d8108115f901346fa4ed4d84220d86c5..ee56aab6831be256390b88e65a2a949c void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -2618,6 +2723,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2583,6 +2688,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( cert_verifier = std::make_unique( std::make_unique( std::move(cert_verifier))); @@ -148,10 +148,10 @@ index 8014bb16d8108115f901346fa4ed4d84220d86c5..ee56aab6831be256390b88e65a2a949c builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier( diff --git a/services/network/network_context.h b/services/network/network_context.h -index f2dcec57a22d95892a08f1fa43696d6eea46a820..930e0bd987c48d111b2c8d71147c09e4418bda6c 100644 +index 5762335609a2972341e264756225a68dee118986..2596fecc569d59394703579cda02a27c629d843c 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h -@@ -113,6 +113,7 @@ class URLMatcher; +@@ -115,6 +115,7 @@ class URLMatcher; } namespace network { @@ -159,7 +159,7 @@ index f2dcec57a22d95892a08f1fa43696d6eea46a820..930e0bd987c48d111b2c8d71147c09e4 class CookieManager; class HostResolver; class MdnsResponderManager; -@@ -249,6 +250,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -251,6 +252,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override; @@ -168,7 +168,7 @@ index f2dcec57a22d95892a08f1fa43696d6eea46a820..930e0bd987c48d111b2c8d71147c09e4 void ResetURLLoaderFactories() override; void GetViaObliviousHttp( mojom::ObliviousHttpRequestPtr request, -@@ -962,6 +965,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext +@@ -951,6 +954,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext std::vector dismount_closures_; #endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED) @@ -178,10 +178,10 @@ index f2dcec57a22d95892a08f1fa43696d6eea46a820..930e0bd987c48d111b2c8d71147c09e4 std::unique_ptr internal_host_resolver_; std::set, base::UniquePtrComparator> diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom -index a9c82bcf9a4ebf946791eccc35a0dcfff0c18288..6d79f4a4cb1a40be907ef52e35f0e5a0acab31fb 100644 +index c2dab3a6b9ca47e88ae73e386ff22587abdb49a3..0278c216fd810a1a96c53b57f80e6e91b473f5b0 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom -@@ -308,6 +308,17 @@ struct SocketBrokerRemotes { +@@ -309,6 +309,17 @@ struct SocketBrokerRemotes { pending_remote server; }; @@ -199,7 +199,7 @@ index a9c82bcf9a4ebf946791eccc35a0dcfff0c18288..6d79f4a4cb1a40be907ef52e35f0e5a0 // Parameters for constructing a network context. struct NetworkContextParams { // The user agent string. -@@ -952,6 +963,9 @@ interface NetworkContext { +@@ -953,6 +964,9 @@ interface NetworkContext { // Sets a client for this network context. SetClient(pending_remote client); @@ -210,10 +210,10 @@ index a9c82bcf9a4ebf946791eccc35a0dcfff0c18288..6d79f4a4cb1a40be907ef52e35f0e5a0 CreateURLLoaderFactory( pending_receiver url_loader_factory, diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h -index e9579ae8911ebf4a89404564cad13de200cce9ea..da8551db16849cf82a6e3a7eaeb451cae0707f2d 100644 +index 007f7fbd78bf09120f34df37a008ce4084ae8d1b..64ed19803dc00575422a1b024cfb8907be17302e 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h -@@ -63,6 +63,8 @@ class TestNetworkContext : public mojom::NetworkContext { +@@ -64,6 +64,8 @@ class TestNetworkContext : public mojom::NetworkContext { void CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) override {} diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index 407a93b96c0e..843e715ec97b 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -7,10 +7,10 @@ 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 eedafc323a9e4f736aa637d76034f4cb5239eee8..c562a59998901aaedc05be694a725150feeb4b0a 100644 +index 3627db272c082d5787f1a75618958e2a8f6f0600..e03532ea045d24ea3e7b154dd326d8531c9ab5ae 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc -@@ -244,6 +244,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( +@@ -245,6 +245,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( // TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close) void PlatformNotificationServiceImpl::DisplayNotification( @@ -19,7 +19,7 @@ index eedafc323a9e4f736aa637d76034f4cb5239eee8..c562a59998901aaedc05be694a725150 const GURL& origin, const GURL& document_url, diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h -index 178afda936a25643320b6e36a0497cbfbc370770..1a795c5059b3e41539c1f34a8d2ad23a28247cd6 100644 +index ec5ca87810d590fc95eda2006b8653bb12711b8e..203cd9645523c4f0adf90e78fa3d8f3d0aad54dc 100644 --- a/chrome/browser/notifications/platform_notification_service_impl.h +++ b/chrome/browser/notifications/platform_notification_service_impl.h @@ -57,6 +57,7 @@ class PlatformNotificationServiceImpl @@ -31,10 +31,10 @@ index 178afda936a25643320b6e36a0497cbfbc370770..1a795c5059b3e41539c1f34a8d2ad23a const GURL& origin, const GURL& document_url, diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc -index 776c9b4bad591bb0174457caadf5bcab5ffc490b..b5475b328299d823c2cee8cae2fc9111ebc033cb 100644 +index 1b3d77e66432b1f7b8c6f87634644776cd9ccb5b..147da7ad0c830c2c8e0f62f9df0e365a14764280 100644 --- a/content/browser/notifications/blink_notification_service_impl.cc +++ b/content/browser/notifications/blink_notification_service_impl.cc -@@ -84,12 +84,14 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( +@@ -85,12 +85,14 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl( BrowserContext* browser_context, scoped_refptr service_worker_context, RenderProcessHost* render_process_host, @@ -49,7 +49,7 @@ index 776c9b4bad591bb0174457caadf5bcab5ffc490b..b5475b328299d823c2cee8cae2fc9111 browser_context_(browser_context), service_worker_context_(std::move(service_worker_context)), render_process_host_id_(render_process_host->GetDeprecatedID()), -@@ -181,7 +183,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification( +@@ -182,7 +184,7 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification( creator_type_); browser_context_->GetPlatformNotificationService()->DisplayNotification( @@ -92,10 +92,10 @@ index 07e06ac6a3f14081f61f44620b537e5442419660..f2b8a977277c1f1ab014edd007d5df76 contents_.get()->GetPrimaryMainFrame()->GetWeakDocumentPtr(), RenderProcessHost::NotificationServiceCreatorType::kDocument, diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc -index 09ddcfdcf1bbdc35f8e2ad9c89e05f76a6231f68..e3e87a7d08cb2f55706d7d4f06245817811bc83b 100644 +index d840a16e3abfc81b1c45b12827462fbda8dfac43..d18b0fff1ecdde0aece2a57dace5330c6b3f37f5 100644 --- a/content/browser/notifications/platform_notification_context_impl.cc +++ b/content/browser/notifications/platform_notification_context_impl.cc -@@ -280,6 +280,7 @@ void PlatformNotificationContextImpl::Shutdown() { +@@ -281,6 +281,7 @@ void PlatformNotificationContextImpl::Shutdown() { void PlatformNotificationContextImpl::CreateService( RenderProcessHost* render_process_host, @@ -103,7 +103,7 @@ index 09ddcfdcf1bbdc35f8e2ad9c89e05f76a6231f68..e3e87a7d08cb2f55706d7d4f06245817 const blink::StorageKey& storage_key, const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, -@@ -288,7 +289,7 @@ void PlatformNotificationContextImpl::CreateService( +@@ -289,7 +290,7 @@ void PlatformNotificationContextImpl::CreateService( DCHECK_CURRENTLY_ON(BrowserThread::UI); services_.push_back(std::make_unique( this, browser_context_, service_worker_context_, render_process_host, @@ -113,7 +113,7 @@ index 09ddcfdcf1bbdc35f8e2ad9c89e05f76a6231f68..e3e87a7d08cb2f55706d7d4f06245817 } diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h -index 05d3a12dd84c7005d46cc73b312f97ef418d96f5..4765de982802541b3efc7211d106acc72518fd0a 100644 +index 5be62a3fb27e37f3c1db6b811172f6dfebe18f61..34349f9832fe4b9a3d48db613a789afb87cb2a68 100644 --- a/content/browser/notifications/platform_notification_context_impl.h +++ b/content/browser/notifications/platform_notification_context_impl.h @@ -47,6 +47,7 @@ class PlatformNotificationServiceProxy; @@ -133,10 +133,10 @@ index 05d3a12dd84c7005d46cc73b312f97ef418d96f5..4765de982802541b3efc7211d106acc7 const GURL& document_url, const WeakDocumentPtr& weak_document_ptr, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 6e46bfbd8ed2d9842f3ba7b82aa8e6eac1c4c12a..28e952d9766566e0a5213492aaf606aa56dc23f6 100644 +index 68f79d9dfec6f00aa0914f4dcbfa927c7e419d22..7a1fc82866b5a28c7f14e3c8303de2d62cbbcc84 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2206,7 +2206,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2219,7 +2219,7 @@ void RenderProcessHostImpl::CreateNotificationService( case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker: case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: { storage_partition_impl_->GetPlatformNotificationContext()->CreateService( @@ -145,7 +145,7 @@ index 6e46bfbd8ed2d9842f3ba7b82aa8e6eac1c4c12a..28e952d9766566e0a5213492aaf606aa creator_type, std::move(receiver)); break; } -@@ -2214,7 +2214,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2227,7 +2227,7 @@ void RenderProcessHostImpl::CreateNotificationService( CHECK(rfh); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch b/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch index 93df0398cfba..358b92571362 100644 --- a/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch +++ b/patches/chromium/osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch @@ -11,7 +11,7 @@ For resolving complex conflict please pin @reitowo For more reason please see: https://crrev.com/c/5465148 diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc b/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc -index f51591d21a0ce44028a3711cba72ceebb55b3567..31e01429e26f2856587b98a0213f1a5f80ddc52e 100644 +index c821349f35116f07988b2b58a6521e73a514548c..2b8f41a584c5d14ea9d72d67c2abe71eed4a54ac 100644 --- a/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc +++ b/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc @@ -178,7 +178,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer( @@ -36,10 +36,10 @@ index f51591d21a0ce44028a3711cba72ceebb55b3567..31e01429e26f2856587b98a0213f1a5f Microsoft::WRL::ComPtr d3d11_texture; diff --git a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc -index 4f216eb88e51c929468abf52049524177c3f0bb3..e216283028864b48516f690209b0e6b03f02d11c 100644 +index 7c90eca71d39521ec1968a946b6c68c9a564d225..9c40397be51f1ce30cbe73d8c6fc0bb279c95d7a 100644 --- a/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc +++ b/media/video/renderable_gpu_memory_buffer_video_frame_pool.cc -@@ -194,7 +194,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat( +@@ -196,7 +196,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat( bool FrameResources::Initialize() { auto* context = pool_->GetContext(); @@ -48,7 +48,7 @@ index 4f216eb88e51c929468abf52049524177c3f0bb3..e216283028864b48516f690209b0e6b0 #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) gfx::BufferUsage::SCANOUT_VEA_CPU_READ #else -@@ -208,6 +208,23 @@ bool FrameResources::Initialize() { +@@ -210,6 +210,23 @@ bool FrameResources::Initialize() { const gfx::Size buffer_size_in_pixels = GetBufferSizeInPixelsForVideoPixelFormat(format_, coded_size_); @@ -72,7 +72,7 @@ index 4f216eb88e51c929468abf52049524177c3f0bb3..e216283028864b48516f690209b0e6b0 gpu::SharedImageUsageSet usage = #if BUILDFLAG(IS_MAC) gpu::SHARED_IMAGE_USAGE_MACOS_VIDEO_TOOLBOX | -@@ -248,7 +265,7 @@ bool FrameResources::Initialize() { +@@ -250,7 +267,7 @@ bool FrameResources::Initialize() { viz::GetSharedImageFormat(buffer_format); shared_image_ = diff --git a/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch b/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch index d61f71763f6e..bac8c9cb13a1 100644 --- a/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch +++ b/patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch @@ -10,10 +10,10 @@ an about:blank check to this area. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 314ef160662faf6d7c00d9d6999abb1db8bbebe5..6cae6b280bfab3f1cbacbb4a4d71fa1d78b54619 100644 +index e47ef4d4541325c358c8fa173ed44f0256ef7f06..ae5dbf3790c446e37cc454f4f88b4c972f47a702 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -808,8 +808,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch( +@@ -806,8 +806,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch( // TODO(crbug.com/40092527): Consider adding a separate boolean that // tracks this instead of piggybacking `origin_calculation_debug_info`. if (renderer_side_origin.opaque() && diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index f294c6286406..336df7a964c6 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -38,7 +38,7 @@ index 8168b4cfbafd42fa93a5aa9a3691c2552fabfb86..ba49212bd76d209f99c1cee649fc1466 ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground, kCloseButtonIconSize)); 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 f246f7ea6b39a881721171515049dda8d3f2ac0b..e8524bb6706ae06a0feabccbe44250580098e937 100644 +index 81f83c6d9ad03049b368a1994b5606ec12ce04dd..43dc9886e0e08d6651810b3f9b3ed5453d8c41ab 100644 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc @@ -18,9 +18,11 @@ diff --git a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch index d25f6fc465f9..f14b4d040f86 100644 --- a/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch +++ b/patches/chromium/port_autofill_colors_to_the_color_pipeline.patch @@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be our autofill implementation to work like Chromium's. diff --git a/ui/color/color_id.h b/ui/color/color_id.h -index 8b7cc48c3fad34d91f8732c760228b546ce24a89..cf61dcb09d859729c9f1239b8278babbc057a74e 100644 +index 56ac73d6a9b8c00039bbbfc660e423bc14152e19..72a08ab14653136308ace4f4ee6e83773060dae5 100644 --- a/ui/color/color_id.h +++ b/ui/color/color_id.h -@@ -407,6 +407,10 @@ +@@ -410,6 +410,10 @@ E_CPONLY(kColorRadioButtonForegroundUnchecked) \ E_CPONLY(kColorRadioButtonForegroundDisabled) \ E_CPONLY(kColorRadioButtonForegroundChecked) \ @@ -22,7 +22,7 @@ index 8b7cc48c3fad34d91f8732c760228b546ce24a89..cf61dcb09d859729c9f1239b8278babb E_CPONLY(kColorSegmentedButtonBorder) \ E_CPONLY(kColorSegmentedButtonFocus) \ E_CPONLY(kColorSegmentedButtonForegroundChecked) \ -@@ -515,6 +519,7 @@ +@@ -518,6 +522,7 @@ E_CPONLY(kColorTreeNodeForeground) \ E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \ E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \ diff --git a/patches/chromium/preconnect_manager.patch b/patches/chromium/preconnect_manager.patch index fcc53324fc50..f9ae3f0d97e2 100644 --- a/patches/chromium/preconnect_manager.patch +++ b/patches/chromium/preconnect_manager.patch @@ -10,7 +10,7 @@ in favor of defining PreconnectRequest in this file since we don't build the header. diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc -index 4c90ccfdc5f1357989f7cd86f572915ea05c80da..cba3346fd84a2f75c40e453aeab1602b7c146dd4 100644 +index 5741fefef3a3a803a4e463ada1980d5d09a9ebe3..e8c4ccb63425a4097794dc33eccc64d54b384af9 100644 --- a/chrome/browser/predictors/preconnect_manager.cc +++ b/chrome/browser/predictors/preconnect_manager.cc @@ -15,9 +15,11 @@ @@ -25,7 +25,7 @@ index 4c90ccfdc5f1357989f7cd86f572915ea05c80da..cba3346fd84a2f75c40e453aeab1602b #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" -@@ -28,6 +30,20 @@ namespace predictors { +@@ -29,6 +31,20 @@ namespace predictors { const bool kAllowCredentialsOnPreconnectByDefault = true; @@ -46,7 +46,7 @@ index 4c90ccfdc5f1357989f7cd86f572915ea05c80da..cba3346fd84a2f75c40e453aeab1602b PreconnectedRequestStats::PreconnectedRequestStats(const url::Origin& origin, bool was_preconnected) : origin(origin), was_preconnected(was_preconnected) {} -@@ -94,12 +110,15 @@ PreconnectManager::PreconnectManager(base::WeakPtr delegate, +@@ -95,12 +111,15 @@ PreconnectManager::PreconnectManager(base::WeakPtr delegate, PreconnectManager::~PreconnectManager() = default; bool PreconnectManager::IsEnabled() { diff --git a/patches/chromium/printing.patch b/patches/chromium/printing.patch index a4e1d7141319..1a7f2489050a 100644 --- a/patches/chromium/printing.patch +++ b/patches/chromium/printing.patch @@ -666,7 +666,7 @@ index 6809c4576c71bc1e1a6ad4e0a37707272a9a10f4..3aad10424a6a31dab2ca393d00149ec6 PrintingFailed(int32 cookie, PrintFailureReason reason); diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3b3ffe41c 100644 +index 09eec30627132cf715380518643cf245b10b4bf8..a1b0bd1e46c8608ad0e3a0be8b882049514788e9 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -52,6 +52,7 @@ @@ -677,7 +677,7 @@ index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3 #include "printing/units.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" -@@ -1222,14 +1223,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1236,14 +1237,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { } print_in_progress_ = true; @@ -694,7 +694,7 @@ index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3 if (!weak_this) { return; } -@@ -1260,12 +1261,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( +@@ -1274,12 +1275,14 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver( receivers_.Add(this, std::move(receiver)); } @@ -712,7 +712,7 @@ index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3 ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr()); if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) { return; -@@ -1282,9 +1285,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( +@@ -1296,9 +1299,10 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( is_loading_ = frame->WillPrintSoon(); if (is_loading_) { @@ -726,7 +726,7 @@ index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3 SetupOnStopLoadingTimeout(); return; } -@@ -1294,7 +1298,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( +@@ -1308,7 +1312,7 @@ void PrintRenderFrameHelper::PrintRequestedPagesInternal( // plugin node and print that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -735,7 +735,7 @@ index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3 if (render_frame_gone_) { return; -@@ -1450,6 +1454,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { +@@ -1464,6 +1468,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) { if (ipc_nesting_level_ > kAllowedIpcDepthForPrint) return; @@ -744,7 +744,7 @@ index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3 print_preview_context_.OnPrintPreview(); #if BUILDFLAG(IS_CHROMEOS) -@@ -2062,17 +2068,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -2076,17 +2082,19 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -767,7 +767,7 @@ index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3 DidFinishPrinting(PrintingResult::kFailPrintInit); return; } -@@ -2093,8 +2101,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -2107,8 +2115,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, print_pages_params_->params->print_scaling_option; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -784,7 +784,7 @@ index 08af2c8458fdc2539b437c3ff7e3fa2b5d36eeda..5a8d2f3cc57a66535afb027ee43eebc3 // Check if `this` is still valid. if (!self) return; -@@ -2362,29 +2377,43 @@ void PrintRenderFrameHelper::IPCProcessed() { +@@ -2376,29 +2391,43 @@ void PrintRenderFrameHelper::IPCProcessed() { } bool PrintRenderFrameHelper::InitPrintSettings(blink::WebLocalFrame* frame, @@ -881,10 +881,10 @@ index 97cb6458bc9eec767db89b56abfc5f4b4136ff7b..d9a0b343158b8464b5c9aa8e0e655c0b ScriptingThrottler scripting_throttler_; diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn -index 5b8ea681dfee77a08bb451ec19f6e5d7ddf5b6d8..15ad186308981ddfbbe32f47ef9127ab051132e3 100644 +index 679ee6731e685a9844bb6461d664f8e5b823e258..b67e945fdb5d28168c0700a9cba4ebd416ed4858 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn -@@ -3134,8 +3134,9 @@ source_set("browser") { +@@ -3156,8 +3156,9 @@ source_set("browser") { "//ppapi/shared_impl", ] 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 d571ca89d884..295ac026b4b5 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 a54a0dedf8ef1cfffa4e80a4707debed0e83d277..e66e71fdbabb40a5307b12cd8965e773 // 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 20fcda4eb20459b69247003c51c2a3ed37c7b1e8..9bcab4e1e8a0fa429488555f4f7bd1c54888d10e 100644 +index 8637d83c1d3a912bbc48effcc095b426640351ad..3419628c08b62a16c62778cc124c365aa19adec2 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -2056,6 +2056,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { +@@ -2054,6 +2054,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) { view_->UpdateCursor(cursor); } @@ -44,10 +44,10 @@ index 20fcda4eb20459b69247003c51c2a3ed37c7b1e8..9bcab4e1e8a0fa429488555f4f7bd1c5 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index d7bf74c206cedc628d0b92fff25c29393f6c9d95..30593ec9ecd2b135a6054ed50e95c849c09b47bd 100644 +index 87eb1f54dc33211cd69a95a1d5b4b000e9882bf1..c7b606450604fe58ca2a19610a8c7784464536ab 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -5839,6 +5839,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { +@@ -5853,6 +5853,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { return text_input_manager_.get(); } @@ -60,10 +60,10 @@ index d7bf74c206cedc628d0b92fff25c29393f6c9d95..30593ec9ecd2b135a6054ed50e95c849 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index a35dc028fbcf202a7ba1aa7213f8c815e9a31e3f..fe3b8cf40ea7c26aade59c7224416594509f6308 100644 +index 73da2d3c2b16e42c90ecf94ac11dc22dc57ab45e..0424da61cac8cace2e71963cd46f845992b68305 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h -@@ -1178,6 +1178,7 @@ class CONTENT_EXPORT WebContentsImpl +@@ -1177,6 +1177,7 @@ class CONTENT_EXPORT WebContentsImpl void SendScreenRects() override; void SendActiveState(bool active) override; TextInputManager* GetTextInputManager() override; @@ -72,7 +72,7 @@ index a35dc028fbcf202a7ba1aa7213f8c815e9a31e3f..fe3b8cf40ea7c26aade59c7224416594 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 9f9f4cc755886236da2f10516b119643fca9c933..cf263ec4bf7cc5443b5cca5b2d44d3a66f2a405b 100644 +index 255420b16b66fb3a232a7938b991281cf6b6aaff..6561b5ac42cb16e0645195e2b0db25c05c35559e 100644 --- a/content/public/browser/web_contents_observer.h +++ b/content/public/browser/web_contents_observer.h @@ -37,6 +37,7 @@ @@ -83,7 +83,7 @@ index 9f9f4cc755886236da2f10516b119643fca9c933..cf263ec4bf7cc5443b5cca5b2d44d3a6 #include "ui/base/page_transition_types.h" #include "ui/base/window_open_disposition.h" -@@ -642,6 +643,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { +@@ -641,6 +642,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { // Invoked when the primary main frame changes size. virtual void PrimaryMainFrameWasResized(bool width_changed) {} diff --git a/patches/chromium/refactor_expose_file_system_access_blocklist.patch b/patches/chromium/refactor_expose_file_system_access_blocklist.patch index 275fb4db72bf..01d9e65e5d3e 100644 --- a/patches/chromium/refactor_expose_file_system_access_blocklist.patch +++ b/patches/chromium/refactor_expose_file_system_access_blocklist.patch @@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w to upstream this change to Chrome. diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc -index f08ff195ede9980cd0f491053510ed09c1b6c58a..2bdfcc05ef92c1983a9517deea98ed589ac0a065 100644 +index 258e8926bcf7e4370baaf15c5aad15da0c63a9d6..7532d92e78f19da9997001a681a63cf64e274348 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc @@ -45,7 +45,6 @@ @@ -19,7 +19,7 @@ index f08ff195ede9980cd0f491053510ed09c1b6c58a..2bdfcc05ef92c1983a9517deea98ed58 #include "chrome/grit/generated_resources.h" #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/content_settings/core/common/content_settings.h" -@@ -258,128 +257,10 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { +@@ -261,114 +260,13 @@ bool MaybeIsLocalUNCPath(const base::FilePath& path) { } #endif @@ -27,133 +27,122 @@ index f08ff195ede9980cd0f491053510ed09c1b6c58a..2bdfcc05ef92c1983a9517deea98ed58 -// the struct below. -constexpr const int kNoBasePathKey = -1; - --enum BlockType { -- kBlockAllChildren, -- kBlockNestedDirectories, -- kDontBlockChildren --}; +-using BlockType = ChromeFileSystemAccessPermissionContext::BlockType; - --const struct { -- // base::BasePathKey value (or one of the platform specific extensions to it) -- // for a path that should be blocked. Specify kNoBasePathKey if |path| should -- // be used instead. -- int base_path_key; -- -- // Explicit path to block instead of using |base_path_key|. Set to nullptr to -- // use |base_path_key| on its own. If both |base_path_key| and |path| are set, -- // |path| is treated relative to the path |base_path_key| resolves to. -- const base::FilePath::CharType* path; -- -- // If this is set to kDontBlockChildren, only the given path and its parents -- // are blocked. If this is set to kBlockAllChildren, all children of the given -- // path are blocked as well. Finally if this is set to kBlockNestedDirectories -- // access is allowed to individual files in the directory, but nested -- // directories are still blocked. -- // The BlockType of the nearest ancestor of a path to check is what ultimately -- // determines if a path is blocked or not. If a blocked path is a descendent -- // of another blocked path, then it may override the child-blocking policy of -- // its ancestor. For example, if /home blocks all children, but -- // /home/downloads does not, then /home/downloads/file.ext will *not* be -- // blocked. -- BlockType type; --} kBlockedPaths[] = { -- // Don't allow users to share their entire home directory, entire desktop or -- // entire documents folder, but do allow sharing anything inside those -- // directories not otherwise blocked. -- {base::DIR_HOME, nullptr, kDontBlockChildren}, -- {base::DIR_USER_DESKTOP, nullptr, kDontBlockChildren}, -- {chrome::DIR_USER_DOCUMENTS, nullptr, kDontBlockChildren}, -- // Similar restrictions for the downloads directory. -- {chrome::DIR_DEFAULT_DOWNLOADS, nullptr, kDontBlockChildren}, -- {chrome::DIR_DEFAULT_DOWNLOADS_SAFE, nullptr, kDontBlockChildren}, -- // The Chrome installation itself should not be modified by the web. -- {base::DIR_EXE, nullptr, kBlockAllChildren}, -- {base::DIR_MODULE, nullptr, kBlockAllChildren}, -- {base::DIR_ASSETS, nullptr, kBlockAllChildren}, -- // And neither should the configuration of at least the currently running -- // Chrome instance (note that this does not take --user-data-dir command -- // line overrides into account). -- {chrome::DIR_USER_DATA, nullptr, kBlockAllChildren}, -- // ~/.ssh is pretty sensitive on all platforms, so block access to that. -- {base::DIR_HOME, FILE_PATH_LITERAL(".ssh"), kBlockAllChildren}, -- // And limit access to ~/.gnupg as well. -- {base::DIR_HOME, FILE_PATH_LITERAL(".gnupg"), kBlockAllChildren}, +-std::vector +-GenerateBlockedPath() { +- return { +- // Don't allow users to share their entire home directory, entire desktop +- // or entire documents folder, but do allow sharing anything inside those +- // directories not otherwise blocked. +- {base::DIR_HOME, nullptr, BlockType::kDontBlockChildren}, +- {base::DIR_USER_DESKTOP, nullptr, BlockType::kDontBlockChildren}, +- {chrome::DIR_USER_DOCUMENTS, nullptr, BlockType::kDontBlockChildren}, +- // Similar restrictions for the downloads directory. +- {chrome::DIR_DEFAULT_DOWNLOADS, nullptr, BlockType::kDontBlockChildren}, +- {chrome::DIR_DEFAULT_DOWNLOADS_SAFE, nullptr, +- BlockType::kDontBlockChildren}, +- // The Chrome installation itself should not be modified by the web. +- {base::DIR_EXE, nullptr, BlockType::kBlockAllChildren}, +- {base::DIR_MODULE, nullptr, BlockType::kBlockAllChildren}, +- {base::DIR_ASSETS, nullptr, BlockType::kBlockAllChildren}, +- // And neither should the configuration of at least the currently running +- // Chrome instance (note that this does not take --user-data-dir command +- // line overrides into account). +- {chrome::DIR_USER_DATA, nullptr, BlockType::kBlockAllChildren}, +- // ~/.ssh is pretty sensitive on all platforms, so block access to that. +- {base::DIR_HOME, FILE_PATH_LITERAL(".ssh"), BlockType::kBlockAllChildren}, +- // And limit access to ~/.gnupg as well. +- {base::DIR_HOME, FILE_PATH_LITERAL(".gnupg"), +- BlockType::kBlockAllChildren}, -#if BUILDFLAG(IS_WIN) -- // Some Windows specific directories to block, basically all apps, the -- // operating system itself, as well as configuration data for apps. -- {base::DIR_PROGRAM_FILES, nullptr, kBlockAllChildren}, -- {base::DIR_PROGRAM_FILESX86, nullptr, kBlockAllChildren}, -- {base::DIR_PROGRAM_FILES6432, nullptr, kBlockAllChildren}, -- {base::DIR_WINDOWS, nullptr, kBlockAllChildren}, -- {base::DIR_ROAMING_APP_DATA, nullptr, kBlockAllChildren}, -- {base::DIR_LOCAL_APP_DATA, nullptr, kBlockAllChildren}, -- {base::DIR_COMMON_APP_DATA, nullptr, kBlockAllChildren}, -- // Opening a file from an MTP device, such as a smartphone or a camera, is -- // implemented by Windows as opening a file in the temporary internet files -- // directory. To support that, allow opening files in that directory, but -- // not whole directories. -- {base::DIR_IE_INTERNET_CACHE, nullptr, kBlockNestedDirectories}, +- // Some Windows specific directories to block, basically all apps, the +- // operating system itself, as well as configuration data for apps. +- {base::DIR_PROGRAM_FILES, nullptr, BlockType::kBlockAllChildren}, +- {base::DIR_PROGRAM_FILESX86, nullptr, BlockType::kBlockAllChildren}, +- {base::DIR_PROGRAM_FILES6432, nullptr, BlockType::kBlockAllChildren}, +- {base::DIR_WINDOWS, nullptr, BlockType::kBlockAllChildren}, +- {base::DIR_ROAMING_APP_DATA, nullptr, BlockType::kBlockAllChildren}, +- {base::DIR_LOCAL_APP_DATA, nullptr, BlockType::kBlockAllChildren}, +- {base::DIR_COMMON_APP_DATA, nullptr, BlockType::kBlockAllChildren}, +- // Opening a file from an MTP device, such as a smartphone or a camera, is +- // implemented by Windows as opening a file in the temporary internet +- // files directory. To support that, allow opening files in that +- // directory, but not whole directories. +- {base::DIR_IE_INTERNET_CACHE, nullptr, +- BlockType::kBlockNestedDirectories}, -#endif -#if BUILDFLAG(IS_MAC) -- // Similar Mac specific blocks. -- {base::DIR_APP_DATA, nullptr, kBlockAllChildren}, -- // Block access to the current bundle directory. -- {chrome::DIR_OUTER_BUNDLE, nullptr, kBlockAllChildren}, -- // Block access to the user's Applications directory. -- {base::DIR_HOME, FILE_PATH_LITERAL("Applications"), kBlockAllChildren}, -- // Block access to the root Applications directory. -- {kNoBasePathKey, FILE_PATH_LITERAL("/Applications"), kBlockAllChildren}, -- {base::DIR_HOME, FILE_PATH_LITERAL("Library"), kBlockAllChildren}, -- // Allow access to other cloud files, such as Google Drive. -- {base::DIR_HOME, FILE_PATH_LITERAL("Library/CloudStorage"), -- kDontBlockChildren}, -- // Allow the site to interact with data from its corresponding natively -- // installed (sandboxed) application. It would be nice to limit a site to -- // access only _its_ corresponding natively installed application, -- // but unfortunately there's no straightforward way to do that. See -- // https://crbug.com/984641#c22. -- {base::DIR_HOME, FILE_PATH_LITERAL("Library/Containers"), -- kDontBlockChildren}, -- // Allow access to iCloud files... -- {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), -- kDontBlockChildren}, -- // ... which may also appear at this directory. -- {base::DIR_HOME, -- FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), -- kDontBlockChildren}, +- // Similar Mac specific blocks. +- {base::DIR_APP_DATA, nullptr, BlockType::kBlockAllChildren}, +- // Block access to the current bundle directory. +- {chrome::DIR_OUTER_BUNDLE, nullptr, BlockType::kBlockAllChildren}, +- // Block access to the user's Applications directory. +- {base::DIR_HOME, FILE_PATH_LITERAL("Applications"), +- BlockType::kBlockAllChildren}, +- // Block access to the root Applications directory. +- {kNoBasePathKey, FILE_PATH_LITERAL("/Applications"), +- BlockType::kBlockAllChildren}, +- {base::DIR_HOME, FILE_PATH_LITERAL("Library"), +- BlockType::kBlockAllChildren}, +- // Allow access to other cloud files, such as Google Drive. +- {base::DIR_HOME, FILE_PATH_LITERAL("Library/CloudStorage"), +- BlockType::kDontBlockChildren}, +- // Allow the site to interact with data from its corresponding natively +- // installed (sandboxed) application. It would be nice to limit a site to +- // access only _its_ corresponding natively installed application, but +- // unfortunately there's no straightforward way to do that. See +- // https://crbug.com/984641#c22. +- {base::DIR_HOME, FILE_PATH_LITERAL("Library/Containers"), +- BlockType::kDontBlockChildren}, +- // Allow access to iCloud files... +- {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), +- BlockType::kDontBlockChildren}, +- // ... which may also appear at this directory. +- {base::DIR_HOME, +- FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), +- BlockType::kDontBlockChildren}, -#endif -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -- // On Linux also block access to devices via /dev. -- {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, -- // And security sensitive data in /proc and /sys. -- {kNoBasePathKey, FILE_PATH_LITERAL("/proc"), kBlockAllChildren}, -- {kNoBasePathKey, FILE_PATH_LITERAL("/sys"), kBlockAllChildren}, -- // And system files in /boot and /etc. -- {kNoBasePathKey, FILE_PATH_LITERAL("/boot"), kBlockAllChildren}, -- {kNoBasePathKey, FILE_PATH_LITERAL("/etc"), kBlockAllChildren}, -- // And block all of ~/.config, matching the similar restrictions on mac -- // and windows. -- {base::DIR_HOME, FILE_PATH_LITERAL(".config"), kBlockAllChildren}, -- // Block ~/.dbus as well, just in case, although there probably isn't much a -- // website can do with access to that directory and its contents. -- {base::DIR_HOME, FILE_PATH_LITERAL(".dbus"), kBlockAllChildren}, +- // On Linux also block access to devices via /dev. +- {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), BlockType::kBlockAllChildren}, +- // And security sensitive data in /proc and /sys. +- {kNoBasePathKey, FILE_PATH_LITERAL("/proc"), +- BlockType::kBlockAllChildren}, +- {kNoBasePathKey, FILE_PATH_LITERAL("/sys"), BlockType::kBlockAllChildren}, +- // And system files in /boot and /etc. +- {kNoBasePathKey, FILE_PATH_LITERAL("/boot"), +- BlockType::kBlockAllChildren}, +- {kNoBasePathKey, FILE_PATH_LITERAL("/etc"), BlockType::kBlockAllChildren}, +- // And block all of ~/.config, matching the similar restrictions on mac +- // and windows. +- {base::DIR_HOME, FILE_PATH_LITERAL(".config"), +- BlockType::kBlockAllChildren}, +- // Block ~/.dbus as well, just in case, although there probably isn't much +- // a website can do with access to that directory and its contents. +- {base::DIR_HOME, FILE_PATH_LITERAL(".dbus"), +- BlockType::kBlockAllChildren}, -#endif -#if BUILDFLAG(IS_ANDROID) -- {base::DIR_ANDROID_APP_DATA, nullptr, kBlockAllChildren}, -- {base::DIR_CACHE, nullptr, kBlockAllChildren}, +- {base::DIR_ANDROID_APP_DATA, nullptr, BlockType::kBlockAllChildren}, +- {base::DIR_CACHE, nullptr, BlockType::kBlockAllChildren}, -#endif -- // TODO(crbug.com/40095723): Refine this list, for example add -- // XDG_CONFIG_HOME when it is not set ~/.config? --}; +- // TODO(crbug.com/40095723): Refine this list, for example add +- // XDG_CONFIG_HOME when it is not set ~/.config? +- }; +-} +// This patch moves the deleted content from this file over to +// chrome/browser/file_system_access/chrome_file_system_access_permission_context.h. +// NOTE IF THERE IS A CONFLICT ABOVE, you will need to copy the changes in the +// removed block over to chrome_file_system_access_permission_context.h. ++ ++// Describes a rule for blocking a directory, which can be constructed ++// dynamically (based on state) or statically (from kBlockedPaths). - // Describes a rule for blocking a directory, which can be constructed - // dynamically (based on state) or statically (from kBlockedPaths). + // A wrapper around `base::NormalizeFilePath` that returns its result instead of + // using an out parameter. diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h -index 68a712cb272224d7a75ff3f512e45ed82eab5a86..d46119d9a7a32c9dc0c4844da73c63b42af9f7a8 100644 +index 1722dbeb24b9f26c9a24fe1c3605861400eb2a4a..8da82018d12713933230304f09f12cf5e6e9adb1 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.h @@ -21,7 +21,7 @@ @@ -174,7 +163,7 @@ index 68a712cb272224d7a75ff3f512e45ed82eab5a86..d46119d9a7a32c9dc0c4844da73c63b4 #include "components/enterprise/common/files_scan_data.h" #endif -@@ -340,6 +340,129 @@ class ChromeFileSystemAccessPermissionContext +@@ -371,6 +371,115 @@ class ChromeFileSystemAccessPermissionContext // KeyedService: void Shutdown() override; @@ -182,129 +171,115 @@ index 68a712cb272224d7a75ff3f512e45ed82eab5a86..d46119d9a7a32c9dc0c4844da73c63b4 + // the struct below. + static constexpr const int kNoBasePathKey = -1; + -+ enum BlockType { -+ kBlockAllChildren, -+ kBlockNestedDirectories, -+ kDontBlockChildren -+ }; ++ using BlockType = ChromeFileSystemAccessPermissionContext::BlockType; + -+ static constexpr struct { -+ // base::BasePathKey value (or one of the platform specific extensions to it) -+ // for a path that should be blocked. Specify kNoBasePathKey if |path| should -+ // be used instead. -+ int base_path_key; -+ -+ // Explicit path to block instead of using |base_path_key|. Set to nullptr to -+ // use |base_path_key| on its own. If both |base_path_key| and |path| are set, -+ // |path| is treated relative to the path |base_path_key| resolves to. -+ const base::FilePath::CharType* path; -+ -+ // If this is set to kDontBlockChildren, only the given path and its parents -+ // are blocked. If this is set to kBlockAllChildren, all children of the given -+ // path are blocked as well. Finally if this is set to kBlockNestedDirectories -+ // access is allowed to individual files in the directory, but nested -+ // directories are still blocked. -+ // The BlockType of the nearest ancestor of a path to check is what ultimately -+ // determines if a path is blocked or not. If a blocked path is a descendent -+ // of another blocked path, then it may override the child-blocking policy of -+ // its ancestor. For example, if /home blocks all children, but -+ // /home/downloads does not, then /home/downloads/file.ext will *not* be -+ // blocked. -+ BlockType type; -+ } kBlockedPaths[] = { -+ // Don't allow users to share their entire home directory, entire desktop or -+ // entire documents folder, but do allow sharing anything inside those -+ // directories not otherwise blocked. -+ {base::DIR_HOME, nullptr, kDontBlockChildren}, -+ {base::DIR_USER_DESKTOP, nullptr, kDontBlockChildren}, -+ {chrome::DIR_USER_DOCUMENTS, nullptr, kDontBlockChildren}, -+ // Similar restrictions for the downloads directory. -+ {chrome::DIR_DEFAULT_DOWNLOADS, nullptr, kDontBlockChildren}, -+ {chrome::DIR_DEFAULT_DOWNLOADS_SAFE, nullptr, kDontBlockChildren}, -+ // The Chrome installation itself should not be modified by the web. -+ {base::DIR_EXE, nullptr, kBlockAllChildren}, -+ {base::DIR_MODULE, nullptr, kBlockAllChildren}, -+ {base::DIR_ASSETS, nullptr, kBlockAllChildren}, -+ // And neither should the configuration of at least the currently running -+ // Chrome instance (note that this does not take --user-data-dir command -+ // line overrides into account). -+ {chrome::DIR_USER_DATA, nullptr, kBlockAllChildren}, -+ // ~/.ssh is pretty sensitive on all platforms, so block access to that. -+ {base::DIR_HOME, FILE_PATH_LITERAL(".ssh"), kBlockAllChildren}, -+ // And limit access to ~/.gnupg as well. -+ {base::DIR_HOME, FILE_PATH_LITERAL(".gnupg"), kBlockAllChildren}, ++ static std::vector ++ GenerateBlockedPath() { ++ return { ++ // Don't allow users to share their entire home directory, entire desktop ++ // or entire documents folder, but do allow sharing anything inside those ++ // directories not otherwise blocked. ++ {base::DIR_HOME, nullptr, BlockType::kDontBlockChildren}, ++ {base::DIR_USER_DESKTOP, nullptr, BlockType::kDontBlockChildren}, ++ {chrome::DIR_USER_DOCUMENTS, nullptr, BlockType::kDontBlockChildren}, ++ // Similar restrictions for the downloads directory. ++ {chrome::DIR_DEFAULT_DOWNLOADS, nullptr, BlockType::kDontBlockChildren}, ++ {chrome::DIR_DEFAULT_DOWNLOADS_SAFE, nullptr, ++ BlockType::kDontBlockChildren}, ++ // The Chrome installation itself should not be modified by the web. ++ {base::DIR_EXE, nullptr, BlockType::kBlockAllChildren}, ++ {base::DIR_MODULE, nullptr, BlockType::kBlockAllChildren}, ++ {base::DIR_ASSETS, nullptr, BlockType::kBlockAllChildren}, ++ // And neither should the configuration of at least the currently running ++ // Chrome instance (note that this does not take --user-data-dir command ++ // line overrides into account). ++ {chrome::DIR_USER_DATA, nullptr, BlockType::kBlockAllChildren}, ++ // ~/.ssh is pretty sensitive on all platforms, so block access to that. ++ {base::DIR_HOME, FILE_PATH_LITERAL(".ssh"), BlockType::kBlockAllChildren}, ++ // And limit access to ~/.gnupg as well. ++ {base::DIR_HOME, FILE_PATH_LITERAL(".gnupg"), ++ BlockType::kBlockAllChildren}, + #if BUILDFLAG(IS_WIN) -+ // Some Windows specific directories to block, basically all apps, the -+ // operating system itself, as well as configuration data for apps. -+ {base::DIR_PROGRAM_FILES, nullptr, kBlockAllChildren}, -+ {base::DIR_PROGRAM_FILESX86, nullptr, kBlockAllChildren}, -+ {base::DIR_PROGRAM_FILES6432, nullptr, kBlockAllChildren}, -+ {base::DIR_WINDOWS, nullptr, kBlockAllChildren}, -+ {base::DIR_ROAMING_APP_DATA, nullptr, kBlockAllChildren}, -+ {base::DIR_LOCAL_APP_DATA, nullptr, kBlockAllChildren}, -+ {base::DIR_COMMON_APP_DATA, nullptr, kBlockAllChildren}, -+ // Opening a file from an MTP device, such as a smartphone or a camera, is -+ // implemented by Windows as opening a file in the temporary internet files -+ // directory. To support that, allow opening files in that directory, but -+ // not whole directories. -+ {base::DIR_IE_INTERNET_CACHE, nullptr, kBlockNestedDirectories}, ++ // Some Windows specific directories to block, basically all apps, the ++ // operating system itself, as well as configuration data for apps. ++ {base::DIR_PROGRAM_FILES, nullptr, BlockType::kBlockAllChildren}, ++ {base::DIR_PROGRAM_FILESX86, nullptr, BlockType::kBlockAllChildren}, ++ {base::DIR_PROGRAM_FILES6432, nullptr, BlockType::kBlockAllChildren}, ++ {base::DIR_WINDOWS, nullptr, BlockType::kBlockAllChildren}, ++ {base::DIR_ROAMING_APP_DATA, nullptr, BlockType::kBlockAllChildren}, ++ {base::DIR_LOCAL_APP_DATA, nullptr, BlockType::kBlockAllChildren}, ++ {base::DIR_COMMON_APP_DATA, nullptr, BlockType::kBlockAllChildren}, ++ // Opening a file from an MTP device, such as a smartphone or a camera, is ++ // implemented by Windows as opening a file in the temporary internet ++ // files directory. To support that, allow opening files in that ++ // directory, but not whole directories. ++ {base::DIR_IE_INTERNET_CACHE, nullptr, ++ BlockType::kBlockNestedDirectories}, + #endif + #if BUILDFLAG(IS_MAC) -+ // Similar Mac specific blocks. -+ {base::DIR_APP_DATA, nullptr, kBlockAllChildren}, -+ // Block access to the current bundle directory. -+ {chrome::DIR_OUTER_BUNDLE, nullptr, kBlockAllChildren}, -+ // Block access to the user's Applications directory. -+ {base::DIR_HOME, FILE_PATH_LITERAL("Applications"), kBlockAllChildren}, -+ // Block access to the root Applications directory. -+ {kNoBasePathKey, FILE_PATH_LITERAL("/Applications"), kBlockAllChildren}, -+ {base::DIR_HOME, FILE_PATH_LITERAL("Library"), kBlockAllChildren}, -+ // Allow access to other cloud files, such as Google Drive. -+ {base::DIR_HOME, FILE_PATH_LITERAL("Library/CloudStorage"), -+ kDontBlockChildren}, -+ // Allow the site to interact with data from its corresponding natively -+ // installed (sandboxed) application. It would be nice to limit a site to -+ // access only _its_ corresponding natively installed application, -+ // but unfortunately there's no straightforward way to do that. See -+ // https://crbug.com/984641#c22. -+ {base::DIR_HOME, FILE_PATH_LITERAL("Library/Containers"), -+ kDontBlockChildren}, -+ // Allow access to iCloud files... -+ {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), -+ kDontBlockChildren}, -+ // ... which may also appear at this directory. -+ {base::DIR_HOME, -+ FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), -+ kDontBlockChildren}, ++ // Similar Mac specific blocks. ++ {base::DIR_APP_DATA, nullptr, BlockType::kBlockAllChildren}, ++ // Block access to the current bundle directory. ++ {chrome::DIR_OUTER_BUNDLE, nullptr, BlockType::kBlockAllChildren}, ++ // Block access to the user's Applications directory. ++ {base::DIR_HOME, FILE_PATH_LITERAL("Applications"), ++ BlockType::kBlockAllChildren}, ++ // Block access to the root Applications directory. ++ {kNoBasePathKey, FILE_PATH_LITERAL("/Applications"), ++ BlockType::kBlockAllChildren}, ++ {base::DIR_HOME, FILE_PATH_LITERAL("Library"), ++ BlockType::kBlockAllChildren}, ++ // Allow access to other cloud files, such as Google Drive. ++ {base::DIR_HOME, FILE_PATH_LITERAL("Library/CloudStorage"), ++ BlockType::kDontBlockChildren}, ++ // Allow the site to interact with data from its corresponding natively ++ // installed (sandboxed) application. It would be nice to limit a site to ++ // access only _its_ corresponding natively installed application, but ++ // unfortunately there's no straightforward way to do that. See ++ // https://crbug.com/984641#c22. ++ {base::DIR_HOME, FILE_PATH_LITERAL("Library/Containers"), ++ BlockType::kDontBlockChildren}, ++ // Allow access to iCloud files... ++ {base::DIR_HOME, FILE_PATH_LITERAL("Library/Mobile Documents"), ++ BlockType::kDontBlockChildren}, ++ // ... which may also appear at this directory. ++ {base::DIR_HOME, ++ FILE_PATH_LITERAL("Library/Mobile Documents/com~apple~CloudDocs"), ++ BlockType::kDontBlockChildren}, + #endif + #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -+ // On Linux also block access to devices via /dev. -+ {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), kBlockAllChildren}, -+ // And security sensitive data in /proc and /sys. -+ {kNoBasePathKey, FILE_PATH_LITERAL("/proc"), kBlockAllChildren}, -+ {kNoBasePathKey, FILE_PATH_LITERAL("/sys"), kBlockAllChildren}, -+ // And system files in /boot and /etc. -+ {kNoBasePathKey, FILE_PATH_LITERAL("/boot"), kBlockAllChildren}, -+ {kNoBasePathKey, FILE_PATH_LITERAL("/etc"), kBlockAllChildren}, -+ // And block all of ~/.config, matching the similar restrictions on mac -+ // and windows. -+ {base::DIR_HOME, FILE_PATH_LITERAL(".config"), kBlockAllChildren}, -+ // Block ~/.dbus as well, just in case, although there probably isn't much a -+ // website can do with access to that directory and its contents. -+ {base::DIR_HOME, FILE_PATH_LITERAL(".dbus"), kBlockAllChildren}, ++ // On Linux also block access to devices via /dev. ++ {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), BlockType::kBlockAllChildren}, ++ // And security sensitive data in /proc and /sys. ++ {kNoBasePathKey, FILE_PATH_LITERAL("/proc"), ++ BlockType::kBlockAllChildren}, ++ {kNoBasePathKey, FILE_PATH_LITERAL("/sys"), BlockType::kBlockAllChildren}, ++ // And system files in /boot and /etc. ++ {kNoBasePathKey, FILE_PATH_LITERAL("/boot"), ++ BlockType::kBlockAllChildren}, ++ {kNoBasePathKey, FILE_PATH_LITERAL("/etc"), BlockType::kBlockAllChildren}, ++ // And block all of ~/.config, matching the similar restrictions on mac ++ // and windows. ++ {base::DIR_HOME, FILE_PATH_LITERAL(".config"), ++ BlockType::kBlockAllChildren}, ++ // Block ~/.dbus as well, just in case, although there probably isn't much ++ // a website can do with access to that directory and its contents. ++ {base::DIR_HOME, FILE_PATH_LITERAL(".dbus"), ++ BlockType::kBlockAllChildren}, + #endif + #if BUILDFLAG(IS_ANDROID) -+ {base::DIR_ANDROID_APP_DATA, nullptr, kBlockAllChildren}, -+ {base::DIR_CACHE, nullptr, kBlockAllChildren}, ++ {base::DIR_ANDROID_APP_DATA, nullptr, BlockType::kBlockAllChildren}, ++ {base::DIR_CACHE, nullptr, BlockType::kBlockAllChildren}, + #endif -+ // TODO(crbug.com/40095723): Refine this list, for example add -+ // XDG_CONFIG_HOME when it is not set ~/.config? -+ }; ++ // TODO(crbug.com/40095723): Refine this list, for example add ++ // XDG_CONFIG_HOME when it is not set ~/.config? ++ }; ++ } + protected: SEQUENCE_CHECKER(sequence_checker_); -@@ -359,7 +482,7 @@ class ChromeFileSystemAccessPermissionContext +@@ -390,7 +499,7 @@ class ChromeFileSystemAccessPermissionContext void PermissionGrantDestroyed(PermissionGrantImpl* grant); diff --git a/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch b/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch new file mode 100644 index 000000000000..c3c7747ef373 --- /dev/null +++ b/patches/chromium/refactor_patch_electron_permissiontypes_into_blink.patch @@ -0,0 +1,226 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Charles Kerr +Date: Thu, 17 Apr 2025 19:07:23 -0500 +Subject: refactor: patch electron PermissionTypes into blink + +6387077: [PermissionOptions] Generalize PermissionRequestDescription | https://chromium-review.googlesource.com/c/chromium/src/+/6387077 + +diff --git a/components/permissions/permission_util.cc b/components/permissions/permission_util.cc +index d91d81297e7cdb79ee7b7a3979dcedf977e16c92..4555f9d52b51d53bdfa43c4a746714758c54e1c2 100644 +--- a/components/permissions/permission_util.cc ++++ b/components/permissions/permission_util.cc +@@ -389,7 +389,17 @@ ContentSettingsType PermissionUtil::PermissionTypeToContentSettingsTypeSafe( + return ContentSettingsType::WEB_APP_INSTALLATION; + case PermissionType::LOCAL_NETWORK_ACCESS: + return ContentSettingsType::LOCAL_NETWORK_ACCESS; ++ ++ // Permissions added by Electron + case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ: ++ case PermissionType::ELECTRON_FULLSCREEN: ++ case PermissionType::FILE_SYSTEM: ++ case PermissionType::HID: ++ case PermissionType::OPEN_EXTERNAL: ++ case PermissionType::SERIAL: ++ case PermissionType::USB: ++ break; ++ + case PermissionType::NUM: + break; + } +diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc +index a0fdb5003382d94aeb676a4224aa40f16acf1573..a740f23458d7fe840824355ef6d136e360e49175 100644 +--- a/content/browser/permissions/permission_controller_impl.cc ++++ b/content/browser/permissions/permission_controller_impl.cc +@@ -87,7 +87,15 @@ PermissionToSchedulingFeature(PermissionType permission_name) { + case PermissionType::AUTOMATIC_FULLSCREEN: + case PermissionType::WEB_APP_INSTALLATION: + case PermissionType::LOCAL_NETWORK_ACCESS: ++ ++ // Permissions added by Electron + case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ: ++ case PermissionType::FILE_SYSTEM: ++ case PermissionType::ELECTRON_FULLSCREEN: ++ case PermissionType::HID: ++ case PermissionType::OPEN_EXTERNAL: ++ case PermissionType::SERIAL: ++ case PermissionType::USB: + return std::nullopt; + } + } +diff --git a/content/browser/permissions/permission_descriptor_util.cc b/content/browser/permissions/permission_descriptor_util.cc +index 714d582d1060873765b24770b18eddcbbdcf5506..3746bafd72223a65c4183a59726601e84accf66f 100644 +--- a/content/browser/permissions/permission_descriptor_util.cc ++++ b/content/browser/permissions/permission_descriptor_util.cc +@@ -171,9 +171,27 @@ content::PermissionDescriptorUtil::CreatePermissionDescriptorForPermissionType( + case blink::PermissionType::LOCAL_NETWORK_ACCESS: + return CreatePermissionDescriptor( + blink::mojom::PermissionName::LOCAL_NETWORK_ACCESS); ++ ++ // Permissions added by Electron + case blink::PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ: + return CreatePermissionDescriptor( + blink::mojom::PermissionName::DEPRECATED_SYNC_CLIPBOARD_READ); ++ case blink::PermissionType::FILE_SYSTEM: ++ return CreatePermissionDescriptor( ++ blink::mojom::PermissionName::FILE_SYSTEM); ++ case blink::PermissionType::ELECTRON_FULLSCREEN: ++ return CreatePermissionDescriptor( ++ blink::mojom::PermissionName::ELECTRON_FULLSCREEN); ++ case blink::PermissionType::HID: ++ return CreatePermissionDescriptor(blink::mojom::PermissionName::HID); ++ case blink::PermissionType::OPEN_EXTERNAL: ++ return CreatePermissionDescriptor( ++ blink::mojom::PermissionName::OPEN_EXTERNAL); ++ case blink::PermissionType::SERIAL: ++ return CreatePermissionDescriptor(blink::mojom::PermissionName::SERIAL); ++ case blink::PermissionType::USB: ++ return CreatePermissionDescriptor(blink::mojom::PermissionName::USB); ++ + case blink::PermissionType::NUM: + NOTREACHED(); + } +diff --git a/third_party/blink/common/permissions/permission_utils.cc b/third_party/blink/common/permissions/permission_utils.cc +index 1c436c62cac1bc4b21255bdcbb2c18b882c4058b..929302db8d21c0cf8c16fc167a7b2110a400abfa 100644 +--- a/third_party/blink/common/permissions/permission_utils.cc ++++ b/third_party/blink/common/permissions/permission_utils.cc +@@ -101,8 +101,23 @@ std::string GetPermissionString(PermissionType permission) { + return "WebAppInstallation"; + case PermissionType::LOCAL_NETWORK_ACCESS: + return "LocalNetworkAccess"; ++ ++ // Permissions added by Electron + case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ: + return "DeprecatedSyncClipboardRead"; ++ case PermissionType::FILE_SYSTEM: ++ return "FileSystem"; ++ case PermissionType::ELECTRON_FULLSCREEN: ++ return "Fullscreen"; ++ case PermissionType::HID: ++ return "HID"; ++ case PermissionType::OPEN_EXTERNAL: ++ return "OpenExternal"; ++ case PermissionType::SERIAL: ++ return "Serial"; ++ case PermissionType::USB: ++ return "USB"; ++ + case PermissionType::NUM: + NOTREACHED(); + } +@@ -177,7 +192,16 @@ PermissionTypeToPermissionsPolicyFeature(PermissionType permission) { + case PermissionType::POINTER_LOCK: + // TODO(crbug.com/394009026): Add permission policy for LNA. + case PermissionType::LOCAL_NETWORK_ACCESS: ++ return std::nullopt; ++ ++ // Permissions added by Electron + case PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ: ++ case PermissionType::ELECTRON_FULLSCREEN: ++ case PermissionType::FILE_SYSTEM: ++ case PermissionType::HID: ++ case PermissionType::OPEN_EXTERNAL: ++ case PermissionType::SERIAL: ++ case PermissionType::USB: + return std::nullopt; + + case PermissionType::NUM: +@@ -345,9 +369,26 @@ std::optional PermissionDescriptorInfoToPermissionType( + return PermissionType::HAND_TRACKING; + case PermissionName::WEB_PRINTING: + return PermissionType::WEB_PRINTING; +- default: +- NOTREACHED(); ++ case PermissionName::SMART_CARD: ++ return PermissionType::SMART_CARD; ++ ++ // Permissions added by Electron ++ case PermissionName::DEPRECATED_SYNC_CLIPBOARD_READ: ++ return PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ; ++ case PermissionName::FILE_SYSTEM: ++ return PermissionType::FILE_SYSTEM; ++ case PermissionName::ELECTRON_FULLSCREEN: ++ return PermissionType::ELECTRON_FULLSCREEN; ++ case PermissionName::HID: ++ return PermissionType::HID; ++ case PermissionName::OPEN_EXTERNAL: ++ return PermissionType::OPEN_EXTERNAL; ++ case PermissionName::SERIAL: ++ return PermissionType::SERIAL; ++ case PermissionName::USB: ++ return PermissionType::USB; + } ++ NOTREACHED(); + } + + } // namespace blink +diff --git a/third_party/blink/public/common/permissions/permission_utils.h b/third_party/blink/public/common/permissions/permission_utils.h +index c286d87043ec4cb2e51ec9d82d08e4c84f5a270c..164a2a446947dae687922363d324a6d35b7ae0b8 100644 +--- a/third_party/blink/public/common/permissions/permission_utils.h ++++ b/third_party/blink/public/common/permissions/permission_utils.h +@@ -65,7 +65,17 @@ enum class PermissionType { + HAND_TRACKING = 41, + WEB_APP_INSTALLATION = 42, + LOCAL_NETWORK_ACCESS = 43, +- DEPRECATED_SYNC_CLIPBOARD_READ = 44, ++ ++ // Permissions added by Electron ++ ELECTRON_FIRST, ++ DEPRECATED_SYNC_CLIPBOARD_READ = ELECTRON_FIRST, ++ FILE_SYSTEM, ++ ELECTRON_FULLSCREEN, ++ HID, ++ OPEN_EXTERNAL, ++ SERIAL, ++ USB, ++ ELECTRON_LAST = USB, + + // Always keep this at the end. + NUM, +diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom +index e47f2089a6a187b26c981afa1ef4135ec5e6a9e7..d66eb48c619dde34c59f33c5aaa0e38c1d772563 100644 +--- a/third_party/blink/public/mojom/permissions/permission.mojom ++++ b/third_party/blink/public/mojom/permissions/permission.mojom +@@ -44,7 +44,15 @@ enum PermissionName { + HAND_TRACKING, + WEB_PRINTING, + SMART_CARD, +- DEPRECATED_SYNC_CLIPBOARD_READ ++ ++ // Permissions added by Electron ++ DEPRECATED_SYNC_CLIPBOARD_READ, ++ FILE_SYSTEM, ++ ELECTRON_FULLSCREEN, ++ HID, ++ OPEN_EXTERNAL, ++ SERIAL, ++ USB + }; + + struct MidiPermissionDescriptor { +diff --git a/third_party/blink/renderer/modules/permissions/permission_utils.cc b/third_party/blink/renderer/modules/permissions/permission_utils.cc +index 8d189eae97caa48a5796c540a74aaafa2fa676ff..fd3e12b88df9c944256358129ca3df1ac3f168d6 100644 +--- a/third_party/blink/renderer/modules/permissions/permission_utils.cc ++++ b/third_party/blink/renderer/modules/permissions/permission_utils.cc +@@ -145,8 +145,22 @@ String PermissionNameToString(PermissionName name) { + return "web-printing"; + case PermissionName::SMART_CARD: + return "smart-card"; ++ ++ // Permissions added by Electron + case PermissionName::DEPRECATED_SYNC_CLIPBOARD_READ: + return "deprecated-sync-clipboard-read"; ++ case PermissionName::FILE_SYSTEM: ++ return "file-system"; ++ case PermissionName::ELECTRON_FULLSCREEN: ++ return "electron-fullscreen"; ++ case PermissionName::HID: ++ return "hid"; ++ case PermissionName::OPEN_EXTERNAL: ++ return "open-external"; ++ case PermissionName::SERIAL: ++ return "serial"; ++ case PermissionName::USB: ++ return "usb"; + } + } + diff --git a/patches/chromium/refactor_unfilter_unresponsive_events.patch b/patches/chromium/refactor_unfilter_unresponsive_events.patch index bf60e0c2a124..37e388b5a85a 100644 --- a/patches/chromium/refactor_unfilter_unresponsive_events.patch +++ b/patches/chromium/refactor_unfilter_unresponsive_events.patch @@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be accessed from our JS event. The filtering is moved into Electron's code. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 2a17aa6a3f687d60a7ca0e839e59f637819a9376..95a714ca4a0023dc31b212611f91fc1d03543656 100644 +index 3b0faab24a3b1d4bd194d18fdef02706362de39d..71a2ea790dc97800235a471d46624397210da8f0 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -9971,25 +9971,13 @@ void WebContentsImpl::RendererUnresponsive( +@@ -10089,25 +10089,13 @@ void WebContentsImpl::RendererUnresponsive( base::RepeatingClosure hang_monitor_restarter) { OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive", "render_widget_host", render_widget_host); diff --git a/patches/chromium/render_widget_host_view_base.patch b/patches/chromium/render_widget_host_view_base.patch index 2ef6f6e7fd7a..8fc2c81a2b31 100644 --- a/patches/chromium/render_widget_host_view_base.patch +++ b/patches/chromium/render_widget_host_view_base.patch @@ -6,7 +6,7 @@ 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 ce00b0540a7ac7f7c7b4c65f1a1343f72ae21c42..cc3b694431f14b166a305a446a48c25d5099b152 100644 +index 30ec1b5e2688b94bfe6a9c6cf55a839580e81e68..e9ee463b37ebc61d01fe1ceccbb6a280e33fd268 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc @@ -654,6 +654,13 @@ void RenderWidgetHostViewBase::OnFrameTokenChangedForView( @@ -24,7 +24,7 @@ index ce00b0540a7ac7f7c7b4c65f1a1343f72ae21c42..cc3b694431f14b166a305a446a48c25d 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 ee54e91c031849307e51905fbdcdf53c5f17bf8f..72e12f6910e581c3a6f19241523322dcb6959c61 100644 +index c93e93d13f1013641709f5808bc1c66ea772d082..db5234cd13819d14b737aec3315e77e420e01603 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -30,6 +30,8 @@ @@ -36,7 +36,7 @@ index ee54e91c031849307e51905fbdcdf53c5f17bf8f..72e12f6910e581c3a6f19241523322dc #include "content/common/content_export.h" #include "content/public/browser/render_frame_metadata_provider.h" #include "content/public/browser/render_widget_host.h" -@@ -72,11 +74,13 @@ namespace content { +@@ -73,11 +75,13 @@ namespace content { class DevicePosturePlatformProvider; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; @@ -50,7 +50,7 @@ index ee54e91c031849307e51905fbdcdf53c5f17bf8f..72e12f6910e581c3a6f19241523322dc class DelegatedFrameHost; class SyntheticGestureTarget; -@@ -150,6 +154,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -151,6 +155,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase void ProcessGestureEvent(const blink::WebGestureEvent& event, const ui::LatencyInfo& latency) override; RenderWidgetHostViewBase* GetRootView() override; @@ -61,8 +61,8 @@ index ee54e91c031849307e51905fbdcdf53c5f17bf8f..72e12f6910e581c3a6f19241523322dc void OnAutoscrollStart() override; const viz::DisplayHitTestQueryMap& GetDisplayHitTestQuery() const override; -@@ -195,6 +203,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase - const gfx::Rect& keyboard_rect) override {} +@@ -199,6 +207,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase + void NotifyContextMenuInsetsObservers(const gfx::Rect&) override {} bool IsHTMLFormPopup() const override; + virtual void InitAsGuest(RenderWidgetHostView* parent_host_view, diff --git a/patches/chromium/resource_file_conflict.patch b/patches/chromium/resource_file_conflict.patch index e5d394a5c6e6..198f7518ad41 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 26ec2b8abc6783a48518c1b15a12eb2212b0db7a..95c73dcb082999d0a85d82f1fe330d27c88055ca 100644 +index a9de281b6a295840a7be4602117522649edef15f..69502170fe7a4d37773ad3e9cd7eeaf63fe1984d 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1550,7 +1550,7 @@ if (is_chrome_branded && !is_android) { +@@ -1554,7 +1554,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index 26ec2b8abc6783a48518c1b15a12eb2212b0db7a..95c73dcb082999d0a85d82f1fe330d27 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1596,6 +1596,12 @@ repack("browser_tests_pak") { +@@ -1600,6 +1600,12 @@ repack("browser_tests_pak") { deps = [ "//chrome/test/data/webui:resources" ] } diff --git a/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch b/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch index a68eb2841093..51d0047dd7b0 100644 --- a/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch +++ b/patches/chromium/revert_code_health_clean_up_stale_macwebcontentsocclusion.patch @@ -58,7 +58,7 @@ index 32523e6a6f800de3917d18825f94c66ef4ea4388..634d68b9a2840d7c9e7c3b5e23d8b1b8 // Alternative implementation of orderWindow:relativeTo:. Replaces diff --git a/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm b/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm -index 2991489fae8a4eecad97b1ecb2271f096d9a9229..93b7aa620ad1da250ac06e3383ca689732de12cd 100644 +index 7c99a9512e6f65713fe8483cef7b7c9b494b4491..8fb6cf252961c9773d1a6a09d47bec6aacf38f08 100644 --- a/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm +++ b/content/app_shim_remote_cocoa/web_contents_view_cocoa.mm @@ -29,6 +29,7 @@ @@ -233,10 +233,10 @@ index 2991489fae8a4eecad97b1ecb2271f096d9a9229..93b7aa620ad1da250ac06e3383ca6897 } diff --git a/content/common/features.cc b/content/common/features.cc -index 136290cb51f7b44cc6f8754c49203a7bad1634e8..d11fd0742b10e6318a0d3740759f474b41675ce6 100644 +index efd12c4d80edefb2848767706f6a1ceb3fd224be..035e7cee64d1989756a1e52863a4ff0515b6f7de 100644 --- a/content/common/features.cc +++ b/content/common/features.cc -@@ -261,6 +261,14 @@ BASE_FEATURE(kIOSurfaceCapturer, +@@ -300,6 +300,14 @@ BASE_FEATURE(kIOSurfaceCapturer, base::FEATURE_ENABLED_BY_DEFAULT); #endif @@ -252,10 +252,10 @@ index 136290cb51f7b44cc6f8754c49203a7bad1634e8..d11fd0742b10e6318a0d3740759f474b // invalidated upon notifications sent by base::SystemMonitor. If disabled, the // cache is considered invalid on every enumeration request. diff --git a/content/common/features.h b/content/common/features.h -index dc481abb8ef01c8e5a23d0f683a59c2ee6420826..7f61079290ba740cdad7b74feeb94143bdcc6bd4 100644 +index 7bc79ead73e5e51d7735d6964cf96990120670ca..83b5666e735aa99a8e2300b37154da1769baa2b0 100644 --- a/content/common/features.h +++ b/content/common/features.h -@@ -68,6 +68,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan); +@@ -100,6 +100,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan); #if BUILDFLAG(IS_MAC) CONTENT_EXPORT BASE_DECLARE_FEATURE(kIOSurfaceCapturer); #endif diff --git a/patches/chromium/revert_enable_crel_for_arm32_targets.patch b/patches/chromium/revert_enable_crel_for_arm32_targets.patch index 08f5f6afbb8c..adb59fe2f618 100644 --- a/patches/chromium/revert_enable_crel_for_arm32_targets.patch +++ b/patches/chromium/revert_enable_crel_for_arm32_targets.patch @@ -8,10 +8,10 @@ as its one of our supported platforms. https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index 6cbc6b8cfae044c36e83cc54c23dc500b445e5da..1d9798b5bffb4fb3166b72911cea5ba1282a757f 100644 +index ca42c82a2b10407c27cf9c764c62fc67e1df1c15..dde1079897599b8fb475f0036140d8008df3b2c2 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -628,7 +628,8 @@ config("compiler") { +@@ -617,7 +617,8 @@ config("compiler") { # Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF # (excluding toolchains that use an older version of LLVM). diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index d60a15c9a8bb..bd18c208f5d1 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/patches/chromium/scroll_bounce_flag.patch @@ -6,7 +6,7 @@ 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 f1ef5e0d6c1c659506656df5f98a8637729009a0..5f2e9766fe7e8a0ced2a15af7f8fcd529c02c1bb 100644 +index 0a5556cb6eac8be8af3a1691687205e683157794..a88f184db56cc3aab5d67cd1a0f73dff0f002a34 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -1324,7 +1324,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { @@ -17,4 +17,4 @@ index f1ef5e0d6c1c659506656df5f98a8637729009a0..5f2e9766fe7e8a0ced2a15af7f8fcd52 + return base::CommandLine::ForCurrentProcess()->HasSwitch("scroll-bounce"); } - gpu::GpuMemoryBufferManager* RenderThreadImpl::GetGpuMemoryBufferManager() { + blink::scheduler::WebThreadScheduler* diff --git a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch index f36c5ff8de66..a37e6eff5454 100644 --- a/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch +++ b/patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch @@ -15,10 +15,10 @@ short-circuit all the permissions checks in MSDC for now to allow us to unduplicate this code. diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc -index 5f1ca23a16474281a0b00b25ff8fc61c9bf4541f..bcf00895b6eb7345481143ea9b7ef49fc84262b5 100644 +index 50b665fea15c81326ea7610c66ecad970bc5b261..99c34a259786176c24c67cf91aa528ce88a6e58d 100644 --- a/components/webrtc/media_stream_devices_controller.cc +++ b/components/webrtc/media_stream_devices_controller.cc -@@ -56,7 +56,8 @@ bool PermissionIsRequested(blink::PermissionType permission, +@@ -57,7 +57,8 @@ bool PermissionIsRequested(blink::PermissionType permission, void MediaStreamDevicesController::RequestPermissions( const content::MediaStreamRequest& request, MediaStreamDeviceEnumerator* enumerator, @@ -28,16 +28,16 @@ index 5f1ca23a16474281a0b00b25ff8fc61c9bf4541f..bcf00895b6eb7345481143ea9b7ef49f content::RenderFrameHost* rfh = content::RenderFrameHost::FromID( request.render_process_id, request.render_frame_id); // The RFH may have been destroyed by the time the request is processed. -@@ -91,7 +92,7 @@ void MediaStreamDevicesController::RequestPermissions( +@@ -92,7 +93,7 @@ void MediaStreamDevicesController::RequestPermissions( std::move(callback))); - std::vector permission_types; + std::vector permission_types; - +#if 0 content::PermissionController* permission_controller = web_contents->GetBrowserContext()->GetPermissionController(); -@@ -164,19 +165,26 @@ void MediaStreamDevicesController::RequestPermissions( +@@ -174,19 +175,26 @@ void MediaStreamDevicesController::RequestPermissions( requested_audio_capture_device_ids; permission_request_description.requested_video_capture_device_ids = requested_video_capture_device_ids; @@ -63,7 +63,7 @@ index 5f1ca23a16474281a0b00b25ff8fc61c9bf4541f..bcf00895b6eb7345481143ea9b7ef49f + ->GetPermissionController() + ->RequestPermissionsFromCurrentDocument( + rfh, -+ content::PermissionRequestDescription(permission_types, ++ content::PermissionRequestDescription(std::move(permission_types), + request.user_gesture), + base::BindOnce( + &MediaStreamDevicesController::PromptAnsweredGroupedRequest, @@ -72,7 +72,7 @@ index 5f1ca23a16474281a0b00b25ff8fc61c9bf4541f..bcf00895b6eb7345481143ea9b7ef49f } MediaStreamDevicesController::~MediaStreamDevicesController() { -@@ -425,6 +433,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -436,6 +444,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( return false; } @@ -80,7 +80,7 @@ index 5f1ca23a16474281a0b00b25ff8fc61c9bf4541f..bcf00895b6eb7345481143ea9b7ef49f // TODO(raymes): This function wouldn't be needed if // PermissionManager::RequestPermissions returned a denial reason. content::PermissionResult result = -@@ -435,6 +444,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( +@@ -449,6 +458,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason( DCHECK_EQ(blink::mojom::PermissionStatus::DENIED, result.status); return true; } @@ -89,10 +89,10 @@ index 5f1ca23a16474281a0b00b25ff8fc61c9bf4541f..bcf00895b6eb7345481143ea9b7ef49f } diff --git a/components/webrtc/media_stream_devices_controller.h b/components/webrtc/media_stream_devices_controller.h -index 4d3bf184243a4c1296f41070e934730a3bd2620e..78610ff9fb93cfa1c9aae898d6f8c83520fc860a 100644 +index a976526aedc2107dd43242199b04142ca4d34eda..0410c8818d6ffdd55c49f1bef27ddb4ea16d8ab9 100644 --- a/components/webrtc/media_stream_devices_controller.h +++ b/components/webrtc/media_stream_devices_controller.h -@@ -48,7 +48,8 @@ class MediaStreamDevicesController { +@@ -49,7 +49,8 @@ class MediaStreamDevicesController { // synchronously or asynchronously returned via |callback|. static void RequestPermissions(const content::MediaStreamRequest& request, MediaStreamDeviceEnumerator* enumerator, diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 05a9c3972892..0ffef73229b4 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 28e952d9766566e0a5213492aaf606aa56dc23f6..c0d553dcbb37db7657c2374d4a6b978d7bfee88c 100644 +index 7a1fc82866b5a28c7f14e3c8303de2d62cbbcc84..ea659ff49295d9a5c449eb903f5c3ddc238e4e6a 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -1814,6 +1814,10 @@ bool RenderProcessHostImpl::Init() { +@@ -1827,6 +1827,10 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( *cmd_line, IsPdf(), IsJitDisabled()); diff --git a/patches/chromium/upload_list_add_loadsync_method.patch b/patches/chromium/upload_list_add_loadsync_method.patch index ef1eb133a728..2b4d41387eee 100644 --- a/patches/chromium/upload_list_add_loadsync_method.patch +++ b/patches/chromium/upload_list_add_loadsync_method.patch @@ -24,7 +24,7 @@ index 176f0b70225eab7d692886c241983c43d2e93b86..02e39bf0a6ba63c0a6226ba20e08a94b const base::Time& end, base::OnceClosure callback) { diff --git a/components/upload_list/upload_list.h b/components/upload_list/upload_list.h -index c45b3d46f505f516b84b8d1728a23a280dbdba2c..2c8c2c1b7ce6885329b3097ffb964c8cf549002b 100644 +index b4f61f6de22efacec14fa0e6bb702bc6a6eedaaa..5096b558a431969aeb97be73990fda647147bfc0 100644 --- a/components/upload_list/upload_list.h +++ b/components/upload_list/upload_list.h @@ -82,6 +82,8 @@ class UploadList : public base::RefCountedThreadSafe { diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 3c76a5553a50..bff71f21985d 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -9,10 +9,10 @@ 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 b6870d74a761a847e9952d409b37ddb778790b08..052e518e42c7c2d7f0e17ebc8dc4e8ec78215802 100644 +index 84c70711d45b20c22c498c4475c5cf94567d16d2..9dcf5453e51148f683d66a120b806c603c99185d 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -3908,6 +3908,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3922,6 +3922,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, params.main_frame_name, GetOpener(), primary_main_frame_policy, base::UnguessableToken::Create()); @@ -26,7 +26,7 @@ index b6870d74a761a847e9952d409b37ddb778790b08..052e518e42c7c2d7f0e17ebc8dc4e8ec std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3918,6 +3925,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3932,6 +3939,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -35,10 +35,10 @@ index b6870d74a761a847e9952d409b37ddb778790b08..052e518e42c7c2d7f0e17ebc8dc4e8ec CHECK(view_.get()); diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 4cf7eef3b54bb4d3770786f8eb03d1678516fa54..772b029c67cc74b2922fe7a034edc14bcfda6c31 100644 +index 3149e94c813d8532b12657150a25353203217645..be500380ce2ae7a0e379f922a042745bc0d97eb0 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h -@@ -119,10 +119,13 @@ class BrowserPluginGuestDelegate; +@@ -121,10 +121,13 @@ class BrowserPluginGuestDelegate; class GuestPageHolder; class RenderFrameHost; class RenderViewHost; @@ -52,7 +52,7 @@ index 4cf7eef3b54bb4d3770786f8eb03d1678516fa54..772b029c67cc74b2922fe7a034edc14b class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -268,6 +271,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData { +@@ -270,6 +273,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData { network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; diff --git a/patches/chromium/webview_fullscreen.patch b/patches/chromium/webview_fullscreen.patch index 5702e57110af..022e0b439181 100644 --- a/patches/chromium/webview_fullscreen.patch +++ b/patches/chromium/webview_fullscreen.patch @@ -15,10 +15,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 ea6ba910234659d1213b1f3f624da0f49b851725..314ef160662faf6d7c00d9d6999abb1db8bbebe5 100644 +index c88d80416ac7b6c76ff3e11016d2e20601e89d38..e47ef4d4541325c358c8fa173ed44f0256ef7f06 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -8748,6 +8748,17 @@ void RenderFrameHostImpl::EnterFullscreen( +@@ -8870,6 +8870,17 @@ void RenderFrameHostImpl::EnterFullscreen( } } @@ -37,10 +37,10 @@ index ea6ba910234659d1213b1f3f624da0f49b851725..314ef160662faf6d7c00d9d6999abb1d if (had_fullscreen_token && !GetView()->HasFocus()) GetView()->Focus(); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 052e518e42c7c2d7f0e17ebc8dc4e8ec78215802..1e6ee8c65d56f2821485f855bbf4e8bb8212058c 100644 +index 9dcf5453e51148f683d66a120b806c603c99185d..f60cc24fbffc8421d18f259a47657f0c1cb6317f 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -4183,21 +4183,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( +@@ -4197,21 +4197,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( const input::NativeWebKeyboardEvent& event) { OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), "WebContentsImpl::PreHandleKeyboardEvent"); @@ -78,7 +78,7 @@ index 052e518e42c7c2d7f0e17ebc8dc4e8ec78215802..1e6ee8c65d56f2821485f855bbf4e8bb } bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { -@@ -4356,7 +4360,7 @@ void WebContentsImpl::EnterFullscreenMode( +@@ -4370,7 +4374,7 @@ void WebContentsImpl::EnterFullscreenMode( OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); DCHECK(CanEnterFullscreenMode(requesting_frame)); DCHECK(requesting_frame->IsActive()); diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 81333a7cd013..c8bf328c6fae 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index 7a2d251ba2d13d0a34df176111e6524a27b87f55..cbbe0fbdd25a0f7859b113fdb3dcd9ce // 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 ac71ba108e5085aadc3e7f22e7bf690c38870f2b..d0c7bd3bf1c20e505548c7146ab71f2af2e57b43 100644 +index c1d1c8a094a9161856d12945945c31bb187fe5a2..45bd68c7c54c4465831a146ed5d4e72414c18770 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -903,6 +903,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -895,6 +895,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -43,10 +43,10 @@ index ac71ba108e5085aadc3e7f22e7bf690c38870f2b..d0c7bd3bf1c20e505548c7146ab71f2a 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 a3aaa495c754de62dc1970eebd9bba80bdbfb869..a5c668a7fd8426eb409b6577cf1b6ce5d24b9fde 100644 +index ce5aee7746ba05cdf185899f0b30e1f11f2ba45f..1b8af76a25eb06626ed7f211552eb5658d03429d 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -199,6 +199,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -198,6 +198,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 a3aaa495c754de62dc1970eebd9bba80bdbfb869..a5c668a7fd8426eb409b6577cf1b6ce5 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 336f771d0587751bd826c1288b4f77b2d672f95b..6a843c144b8f602e8232b2cae7954824c4ad6bc3 100644 +index 617b7a582f1331796129f78c12558ebc81850bf9..ae2de15efaae470ec8b137323c1ad543c465c5ad 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -677,6 +677,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -672,6 +672,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 fe7a511bf53a..9bb1e413d79d 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 @@ -35,10 +35,10 @@ index cbbe0fbdd25a0f7859b113fdb3dcd9ce57e597d6..1345bb5008e1b4fc3a450f7e353d52ec // 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 d0c7bd3bf1c20e505548c7146ab71f2af2e57b43..020a2cc8125eea8a017950fdcdec4a2810201e21 100644 +index 45bd68c7c54c4465831a146ed5d4e72414c18770..e6c7f23da99c63e44d14c4eb16f6a647ad9f750e 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -915,6 +915,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -907,6 +907,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } @@ -52,10 +52,10 @@ index d0c7bd3bf1c20e505548c7146ab71f2af2e57b43..020a2cc8125eea8a017950fdcdec4a28 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 a5c668a7fd8426eb409b6577cf1b6ce5d24b9fde..a53bfe2f7566828433c3c6c8e95cbd12cd6189a9 100644 +index 1b8af76a25eb06626ed7f211552eb5658d03429d..cbaf3450fc2f56cc66413c48e178879074ea072d 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -199,6 +199,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -198,6 +198,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 a5c668a7fd8426eb409b6577cf1b6ce5d24b9fde..a53bfe2f7566828433c3c6c8e95cbd12 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 6a843c144b8f602e8232b2cae7954824c4ad6bc3..ede4908eaad7f1c22fac0fe5071189c50fb5d71a 100644 +index ae2de15efaae470ec8b137323c1ad543c465c5ad..852e76537ebcabd37c22c17def182295e7e61bdd 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -677,6 +677,8 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -672,6 +672,8 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -78,10 +78,10 @@ index 6a843c144b8f602e8232b2cae7954824c4ad6bc3..ede4908eaad7f1c22fac0fe5071189c5 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 cb62ef39250ef824e5a3793cdbacc1edfab1648e..3b66d1f28e79a5ddbcd18dbab57eb347480bd7c6 100644 +index 2f39a2a6094b5ffff40e9d11d97295b26aa5eaec..aaa7645b0304eb4b8b61316731a93565b950bb5f 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 -@@ -303,6 +303,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { +@@ -300,6 +300,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() { V8PerContextData* per_context_data = script_state_->PerContextData(); std::ignore = per_context_data->ConstructorForType(global_scope_->GetWrapperTypeInfo()); diff --git a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch index e4a94ceeffcf..fdb567f230dd 100644 --- a/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch +++ b/patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch @@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer patching legacy devtools code. diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts -index ab07d9b54f6bc8183a151feabf094eaaf1c64306..b3300b1d49b816013f3ca82b084977e5644ca5b7 100644 +index 6fcf6ee9b14aead9a1fe97f5c78e98d43f57304b..1e3fea3ed5ad7dad7da98c1c4f28b5992f0051d8 100644 --- a/front_end/entrypoints/main/MainImpl.ts +++ b/front_end/entrypoints/main/MainImpl.ts -@@ -734,6 +734,8 @@ export class MainImpl { +@@ -741,6 +741,8 @@ export class MainImpl { globalThis.Main = globalThis.Main || {}; // @ts-expect-error Exported for Tests.js globalThis.Main.Main = MainImpl; diff --git a/patches/ffmpeg/link_with_loader_path.patch b/patches/ffmpeg/link_with_loader_path.patch index 644eb32fc6bd..c6369da9b209 100644 --- a/patches/ffmpeg/link_with_loader_path.patch +++ b/patches/ffmpeg/link_with_loader_path.patch @@ -15,10 +15,10 @@ include the out dir, and the linker won't be able to find ffmpeg.dylib because of so. diff --git a/BUILD.gn b/BUILD.gn -index 0ac39bfbd05f56c5601a231249f1d9286d7d8da7..1bc23f7fa8ddcccc543d23b5353326df58475a87 100644 +index 52b8ad2ad28c1210bad5411d9839ebb965f58032..e7486f4d724dd3446c24e98d1f014b8cc0f93990 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -448,7 +448,7 @@ if (is_component_ffmpeg) { +@@ -451,7 +451,7 @@ if (is_component_ffmpeg) { if (!is_component_build) { if (is_mac) { diff --git a/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch b/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch index 8abe837f5bd5..cc27c832cc93 100644 --- a/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch +++ b/patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch @@ -46,10 +46,10 @@ index 3e57ae8efe33f326ef0e5d609c311d4be5b8afd6..dc521d39c2280dfc3217e97c1e413b2b V8_INLINE static void* GetAlignedPointerFromInternalField( const BasicTracedReference& object, int index) { diff --git a/src/api/api.cc b/src/api/api.cc -index 545c1093ee7544da3878637e11c557e3964b8835..f80a7af94a9f2459a96976543f6117fb41f1aabb 100644 +index 7ae6ef7c6c8cdb5079ec606b042161dc25cddeeb..00b669e8f6973329dca5bbe52ee47327b504e475 100644 --- a/src/api/api.cc +++ b/src/api/api.cc -@@ -6324,14 +6324,33 @@ Local v8::Object::SlowGetInternalField(int index) { +@@ -6306,14 +6306,33 @@ Local v8::Object::SlowGetInternalField(int index) { i::Cast(*obj)->GetEmbedderField(index), isolate)); } diff --git a/patches/webrtc/fix_handle_pipewire_capturer_initialization_and_management.patch b/patches/webrtc/fix_handle_pipewire_capturer_initialization_and_management.patch index 4b18538c8dc9..e8082fb56750 100644 --- a/patches/webrtc/fix_handle_pipewire_capturer_initialization_and_management.patch +++ b/patches/webrtc/fix_handle_pipewire_capturer_initialization_and_management.patch @@ -49,7 +49,7 @@ index 7fd0fc31d81bf4d5eca5f8aa7106388ea4c518e4..51dde063a78be7aade1953fbee8bb2db options, CaptureType::kAnyScreenContent); } diff --git a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc b/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc -index 81caa9bd2d97ec73120c07c17d7290b2c3c5d598..3ba5267bf5c7de420131b2c14fcadffd1f5b1326 100644 +index 722806340163be3371f29263e56bcc808b6846c6..6453101606e2088de640e70a730817803d0a1a09 100644 --- a/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc +++ b/modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc @@ -111,6 +111,7 @@ void BaseCapturerPipeWire::OnScreenCastRequestResult(RequestResponse result, diff --git a/shell/app/electron_main_mac.cc b/shell/app/electron_main_mac.cc index 8fa5e132fdd1..2db7d7c44eac 100644 --- a/shell/app/electron_main_mac.cc +++ b/shell/app/electron_main_mac.cc @@ -3,7 +3,9 @@ // found in the LICENSE file. #include +#include #include +#include #include "base/strings/cstring_view.h" #include "electron/fuses.h" @@ -35,15 +37,11 @@ namespace { } #if defined(HELPER_EXECUTABLE) && !IS_MAS_BUILD() -[[noreturn]] void FatalError(const char* format, ...) { - va_list valist; - va_start(valist, format); - char message[4096]; - if (vsnprintf(message, sizeof(message), format, valist) >= 0) { - fputs(message, stderr); - abort_report_np("%s", message); +[[noreturn]] void FatalError(const std::string errmsg) { + if (!errmsg.empty()) { + std::cerr << errmsg; + abort_report_np("%s", errmsg.c_str()); } - va_end(valist); abort(); } #endif diff --git a/shell/app/electron_main_win.cc b/shell/app/electron_main_win.cc index da0143a9e63f..afa434b143f3 100644 --- a/shell/app/electron_main_win.cc +++ b/shell/app/electron_main_win.cc @@ -15,6 +15,11 @@ #include #include +// workaround for base/strings/strcat.h(18,9): error: 'StrCat' macro redefined +// [-Werror,-Wmacro-redefined] +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmacro-redefined" + #include "base/at_exit.h" #include "base/debug/alias.h" #include "base/i18n/icu_util.h" @@ -38,6 +43,8 @@ #include "shell/common/electron_constants.h" #include "third_party/crashpad/crashpad/util/win/initial_client_data.h" +#pragma clang diagnostic pop + namespace { // Redefined here so we don't have to introduce a dependency on //content diff --git a/shell/app/node_main.cc b/shell/app/node_main.cc index 82b152093d47..82a26aff92ae 100644 --- a/shell/app/node_main.cc +++ b/shell/app/node_main.cc @@ -4,6 +4,7 @@ #include "shell/app/node_main.h" +#include #include #include #include @@ -190,7 +191,7 @@ int NodeMain() { node::ProcessInitializationFlags::kNoInitializeNodeV8Platform}); for (const std::string& error : result->errors()) - fprintf(stderr, "%s: %s\n", args[0].c_str(), error.c_str()); + std::cerr << args[0] << ": " << error << '\n'; if (result->early_return() != 0) { return result->exit_code(); diff --git a/shell/browser/api/electron_api_app.cc b/shell/browser/api/electron_api_app.cc index 0bef6757120b..f6d639dc82a9 100644 --- a/shell/browser/api/electron_api_app.cc +++ b/shell/browser/api/electron_api_app.cc @@ -1167,11 +1167,13 @@ void App::SetAccessibilitySupportEnabled(gin_helper::ErrorThrower thrower, return; } + // TODO(wg-upgrades): crbug.com/1470199 remove use of deprecated + // AddAccessibilityModeFlags() and RemoveAccessibilityModeFlags() auto* ax_state = content::BrowserAccessibilityState::GetInstance(); if (enabled) { - ax_state->EnableProcessAccessibility(); + ax_state->AddAccessibilityModeFlags(ui::kAXModeComplete); } else { - ax_state->DisableProcessAccessibility(); + ax_state->RemoveAccessibilityModeFlags(ui::kAXModeComplete); } Browser::Get()->OnAccessibilitySupportChanged(); } diff --git a/shell/browser/api/electron_api_app.h b/shell/browser/api/electron_api_app.h index cc079ef5bebf..d19e5270e903 100644 --- a/shell/browser/api/electron_api_app.h +++ b/shell/browser/api/electron_api_app.h @@ -20,6 +20,7 @@ #include "electron/mas.h" #include "net/base/completion_once_callback.h" #include "net/base/completion_repeating_callback.h" +#include "net/base/features.h" #include "net/ssl/client_cert_identity.h" #include "shell/browser/browser.h" #include "shell/browser/browser_observer.h" diff --git a/shell/browser/api/electron_api_screen.cc b/shell/browser/api/electron_api_screen.cc index 1f8fa4828f75..efee699f02bd 100644 --- a/shell/browser/api/electron_api_screen.cc +++ b/shell/browser/api/electron_api_screen.cc @@ -93,13 +93,21 @@ gfx::Point Screen::GetCursorScreenPoint(v8::Isolate* isolate) { static gfx::Rect ScreenToDIPRect(electron::NativeWindow* window, const gfx::Rect& rect) { HWND hwnd = window ? window->GetAcceleratedWidget() : nullptr; - return display::win::ScreenWin::ScreenToDIPRect(hwnd, rect); + return display::win::GetScreenWin()->ScreenToDIPRect(hwnd, rect); } static gfx::Rect DIPToScreenRect(electron::NativeWindow* window, const gfx::Rect& rect) { HWND hwnd = window ? window->GetAcceleratedWidget() : nullptr; - return display::win::ScreenWin::DIPToScreenRect(hwnd, rect); + return display::win::GetScreenWin()->DIPToScreenRect(hwnd, rect); +} + +static gfx::PointF ScreenToDIPPoint(const gfx::PointF& pixel_point) { + return display::win::GetScreenWin()->ScreenToDIPPoint(pixel_point); +} + +static gfx::Point DIPToScreenPoint(const gfx::Point& dip_point) { + return display::win::GetScreenWin()->DIPToScreenPoint(dip_point); } #endif @@ -154,8 +162,8 @@ gin::ObjectTemplateBuilder Screen::GetObjectTemplateBuilder( .SetMethod("getAllDisplays", &Screen::GetAllDisplays) .SetMethod("getDisplayNearestPoint", &Screen::GetDisplayNearestPoint) #if BUILDFLAG(IS_WIN) - .SetMethod("screenToDipPoint", &display::win::ScreenWin::ScreenToDIPPoint) - .SetMethod("dipToScreenPoint", &display::win::ScreenWin::DIPToScreenPoint) + .SetMethod("screenToDipPoint", &ScreenToDIPPoint) + .SetMethod("dipToScreenPoint", &DIPToScreenPoint) .SetMethod("screenToDipRect", &ScreenToDIPRect) .SetMethod("dipToScreenRect", &DIPToScreenRect) #endif diff --git a/shell/browser/api/electron_api_view.cc b/shell/browser/api/electron_api_view.cc index 661347396826..10127a5f257e 100644 --- a/shell/browser/api/electron_api_view.cc +++ b/shell/browser/api/electron_api_view.cc @@ -170,7 +170,7 @@ class JSLayoutManager : public views::LayoutManagerBase { }; View::View(views::View* view) : view_(view) { - view_->set_owned_by_client(); + view_->set_owned_by_client(views::View::OwnedByClientPassKey{}); view_->AddObserver(this); } diff --git a/shell/browser/api/views/electron_api_image_view.cc b/shell/browser/api/views/electron_api_image_view.cc index 7918a1016041..a7bdd448917c 100644 --- a/shell/browser/api/views/electron_api_image_view.cc +++ b/shell/browser/api/views/electron_api_image_view.cc @@ -14,7 +14,7 @@ namespace electron::api { ImageView::ImageView() : View(new views::ImageView()) { - view()->set_owned_by_client(); + view()->set_owned_by_client(views::View::OwnedByClientPassKey{}); } ImageView::~ImageView() = default; diff --git a/shell/browser/electron_browser_context.cc b/shell/browser/electron_browser_context.cc index 933f783fa374..044b42175db4 100644 --- a/shell/browser/electron_browser_context.cc +++ b/shell/browser/electron_browser_context.cc @@ -252,12 +252,8 @@ std::string MakePartitionName(const std::string& input) { bool DoesDeviceMatch(const base::Value& device, const base::Value& device_to_compare, const blink::PermissionType permission_type) { - if (permission_type == - static_cast( - WebContentsPermissionHelper::PermissionType::HID) || - permission_type == - static_cast( - WebContentsPermissionHelper::PermissionType::USB)) { + if (permission_type == blink::PermissionType::HID || + permission_type == blink::PermissionType::USB) { if (device.GetDict().FindInt(kDeviceVendorIdKey) != device_to_compare.GetDict().FindInt(kDeviceVendorIdKey) || device.GetDict().FindInt(kDeviceProductIdKey) != @@ -273,9 +269,7 @@ bool DoesDeviceMatch(const base::Value& device, if (serial_number && device_serial_number && *device_serial_number == *serial_number) return true; - } else if (permission_type == - static_cast( - WebContentsPermissionHelper::PermissionType::SERIAL)) { + } else if (permission_type == blink::PermissionType::SERIAL) { #if BUILDFLAG(IS_WIN) const auto* instance_id = device.GetDict().FindString(kDeviceInstanceIdKey); const auto* port_instance_id = diff --git a/shell/browser/electron_browser_main_parts_posix.cc b/shell/browser/electron_browser_main_parts_posix.cc index 6c7d48b3d2e8..d62d8d80c4f2 100644 --- a/shell/browser/electron_browser_main_parts_posix.cc +++ b/shell/browser/electron_browser_main_parts_posix.cc @@ -53,8 +53,7 @@ int g_shutdown_pipe_read_fd = -1; // Common code between SIG{HUP, INT, TERM}Handler. void GracefulShutdownHandler(int signal) { // Reinstall the default handler. We had one shot at graceful shutdown. - struct sigaction action; - memset(&action, 0, sizeof(action)); + struct sigaction action = {}; action.sa_handler = SIG_DFL; RAW_CHECK(sigaction(signal, &action, nullptr) == 0); @@ -174,8 +173,7 @@ void ShutdownDetector::ThreadMain() { void ElectronBrowserMainParts::HandleSIGCHLD() { // We need to accept SIGCHLD, even though our handler is a no-op because // otherwise we cannot wait on children. (According to POSIX 2001.) - struct sigaction action; - memset(&action, 0, sizeof(action)); + struct sigaction action = {}; action.sa_handler = SIGCHLDHandler; CHECK_EQ(sigaction(SIGCHLD, &action, nullptr), 0); } @@ -217,8 +215,7 @@ void ElectronBrowserMainParts::InstallShutdownSignalHandlers( // We need to handle SIGTERM, because that is how many POSIX-based distros // ask processes to quit gracefully at shutdown time. - struct sigaction action; - memset(&action, 0, sizeof(action)); + struct sigaction action = {}; action.sa_handler = SIGTERMHandler; CHECK_EQ(sigaction(SIGTERM, &action, nullptr), 0); diff --git a/shell/browser/electron_permission_manager.cc b/shell/browser/electron_permission_manager.cc index 2ab961ec3005..bcd5985de24c 100644 --- a/shell/browser/electron_permission_manager.cc +++ b/shell/browser/electron_permission_manager.cc @@ -8,6 +8,7 @@ #include #include +#include "base/containers/to_vector.h" #include "base/values.h" #include "content/browser/permissions/permission_util.h" // nogncheck #include "content/public/browser/child_process_security_policy.h" @@ -54,20 +55,21 @@ void PermissionRequestResponseCallbackWrapper( class ElectronPermissionManager::PendingRequest { public: PendingRequest(content::RenderFrameHost* render_frame_host, - const std::vector& permissions, + std::vector permissions, StatusesCallback callback) : render_frame_host_id_(render_frame_host->GetGlobalId()), callback_(std::move(callback)), - permissions_(permissions), - results_(permissions.size(), blink::mojom::PermissionStatus::DENIED), - remaining_results_(permissions.size()) {} + permissions_(std::move(permissions)), + results_(permissions_.size(), blink::mojom::PermissionStatus::DENIED), + remaining_results_(permissions_.size()) {} void SetPermissionStatus(int permission_id, blink::mojom::PermissionStatus status) { DCHECK(!IsComplete()); if (status == blink::mojom::PermissionStatus::GRANTED) { - const auto permission = permissions_[permission_id]; + const auto permission = blink::PermissionDescriptorToPermissionType( + permissions_[permission_id]); if (permission == blink::PermissionType::MIDI_SYSEX) { content::ChildProcessSecurityPolicy::GetInstance() ->GrantSendMidiSysExMessage(render_frame_host_id_.child_id); @@ -97,7 +99,7 @@ class ElectronPermissionManager::PendingRequest { private: content::GlobalRenderFrameHostId render_frame_host_id_; StatusesCallback callback_; - std::vector permissions_; + std::vector permissions_; std::vector results_; size_t remaining_results_; }; @@ -141,7 +143,7 @@ void ElectronPermissionManager::SetBluetoothPairingHandler( } void ElectronPermissionManager::RequestPermissionWithDetails( - blink::PermissionType permission, + blink::mojom::PermissionDescriptorPtr permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, bool user_gesture, @@ -154,7 +156,7 @@ void ElectronPermissionManager::RequestPermissionWithDetails( RequestPermissionsWithDetails( render_frame_host, - content::PermissionRequestDescription(permission, user_gesture, + content::PermissionRequestDescription(std::move(permission), user_gesture, requesting_origin), std::move(details), base::BindOnce(PermissionRequestResponseCallbackWrapper, @@ -181,20 +183,26 @@ void ElectronPermissionManager::RequestPermissionsWithDetails( const content::PermissionRequestDescription& request_description, base::Value::Dict details, StatusesCallback response_callback) { - auto& permissions = request_description.permissions; - if (permissions.empty()) { + if (request_description.permissions.empty()) { std::move(response_callback).Run({}); return; } + auto permissions = base::ToVector(request_description.permissions, + [](const auto& permission_descriptor) { + return permission_descriptor.Clone(); + }); + if (request_handler_.is_null()) { std::vector statuses; - for (auto& permission : permissions) { - if (permission == blink::PermissionType::MIDI_SYSEX) { + for (const auto& permission : permissions) { + const auto permission_type = + blink::PermissionDescriptorToPermissionType(permission); + if (permission_type == blink::PermissionType::MIDI_SYSEX) { content::ChildProcessSecurityPolicy::GetInstance() ->GrantSendMidiSysExMessage( render_frame_host->GetProcess()->GetDeprecatedID()); - } else if (permission == blink::PermissionType::GEOLOCATION) { + } else if (permission_type == blink::PermissionType::GEOLOCATION) { ElectronBrowserMainParts::Get() ->GetGeolocationControl() ->UserDidOptIntoLocationServices(); @@ -208,14 +216,15 @@ void ElectronPermissionManager::RequestPermissionsWithDetails( auto* web_contents = content::WebContents::FromRenderFrameHost(render_frame_host); int request_id = pending_requests_.Add(std::make_unique( - render_frame_host, permissions, std::move(response_callback))); + render_frame_host, std::move(permissions), std::move(response_callback))); details.Set("requestingUrl", render_frame_host->GetLastCommittedURL().spec()); details.Set("isMainFrame", render_frame_host->GetParent() == nullptr); base::Value dict_value(std::move(details)); - for (size_t i = 0; i < permissions.size(); ++i) { - auto permission = permissions[i]; + for (size_t i = 0; i < request_description.permissions.size(); ++i) { + const auto permission = blink::PermissionDescriptorToPermissionType( + request_description.permissions[i]); const auto callback = base::BindRepeating(&ElectronPermissionManager::OnPermissionResponse, base::Unretained(this), request_id, i); diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 0787dcb94d35..db803fc3cc26 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -67,12 +67,13 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { using BluetoothPairingHandler = base::RepeatingCallback; - void RequestPermissionWithDetails(blink::PermissionType permission, - content::RenderFrameHost* render_frame_host, - const GURL& requesting_origin, - bool user_gesture, - base::Value::Dict details, - StatusCallback response_callback); + void RequestPermissionWithDetails( + blink::mojom::PermissionDescriptorPtr permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + bool user_gesture, + base::Value::Dict details, + StatusCallback response_callback); // Handler to dispatch permission requests in JS. void SetPermissionRequestHandler(const RequestHandler& handler); diff --git a/shell/browser/electron_web_contents_utility_handler_impl.cc b/shell/browser/electron_web_contents_utility_handler_impl.cc index c4a00c38be89..753f7d39abc8 100644 --- a/shell/browser/electron_web_contents_utility_handler_impl.cc +++ b/shell/browser/electron_web_contents_utility_handler_impl.cc @@ -8,6 +8,7 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/permission_controller.h" +#include "content/public/browser/permission_descriptor_util.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "mojo/public/cpp/bindings/self_owned_receiver.h" @@ -82,9 +83,13 @@ void ElectronWebContentsUtilityHandlerImpl::CanAccessClipboardDeprecated( std::move(callback).Run(blink::mojom::PermissionStatus::DENIED); return; } + // TODO(wg-upgrades) https://crbug.com/406755622 remove use of deprecated + // CreatePermissionDescriptorForPermissionType() blink::mojom::PermissionStatus status = permission_controller->GetPermissionStatusForCurrentDocument( - permission, render_frame_host); + content::PermissionDescriptorUtil:: + CreatePermissionDescriptorForPermissionType(permission), + render_frame_host); std::move(callback).Run(status); } else { std::move(callback).Run(blink::mojom::PermissionStatus::DENIED); diff --git a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc index d41b2acc27b3..b9ebc391e773 100644 --- a/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc +++ b/shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc @@ -5,6 +5,7 @@ #include "shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h" #include +#include #include "components/update_client/update_query_params.h" #include "extensions/common/api/runtime.h" @@ -45,38 +46,39 @@ void ElectronRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) { } bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) { - const char* os = update_client::UpdateQueryParams::GetOS(); - if (strcmp(os, "mac") == 0) { + if (const std::string_view os = update_client::UpdateQueryParams::GetOS(); + os == "mac") { info->os = extensions::api::runtime::PlatformOs::kMac; - } else if (strcmp(os, "win") == 0) { + } else if (os == "win") { info->os = extensions::api::runtime::PlatformOs::kWin; - } else if (strcmp(os, "linux") == 0) { + } else if (os == "linux") { info->os = extensions::api::runtime::PlatformOs::kLinux; - } else if (strcmp(os, "openbsd") == 0) { + } else if (os == "openbsd") { info->os = extensions::api::runtime::PlatformOs::kOpenbsd; } else { NOTREACHED(); } - const char* arch = update_client::UpdateQueryParams::GetArch(); - if (strcmp(arch, "arm") == 0) { + if (const std::string_view arch = update_client::UpdateQueryParams::GetArch(); + arch == "arm") { info->arch = extensions::api::runtime::PlatformArch::kArm; - } else if (strcmp(arch, "arm64") == 0) { + } else if (arch == "arm64") { info->arch = extensions::api::runtime::PlatformArch::kArm64; - } else if (strcmp(arch, "x86") == 0) { + } else if (arch == "x86") { info->arch = extensions::api::runtime::PlatformArch::kX86_32; - } else if (strcmp(arch, "x64") == 0) { + } else if (arch == "x64") { info->arch = extensions::api::runtime::PlatformArch::kX86_64; } else { NOTREACHED(); } - const char* nacl_arch = update_client::UpdateQueryParams::GetNaclArch(); - if (strcmp(nacl_arch, "arm") == 0) { + if (const std::string_view nacl_arch = + update_client::UpdateQueryParams::GetNaclArch(); + nacl_arch == "arm") { info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kArm; - } else if (strcmp(nacl_arch, "x86-32") == 0) { + } else if (nacl_arch == "x86-32") { info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kX86_32; - } else if (strcmp(nacl_arch, "x86-64") == 0) { + } else if (nacl_arch == "x86-64") { info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kX86_64; } else { NOTREACHED(); diff --git a/shell/browser/extensions/electron_extension_loader.cc b/shell/browser/extensions/electron_extension_loader.cc index e1778af45ff1..350ecc5d4db5 100644 --- a/shell/browser/extensions/electron_extension_loader.cc +++ b/shell/browser/extensions/electron_extension_loader.cc @@ -7,6 +7,7 @@ #include #include "base/auto_reset.h" +#include "base/command_line.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/functional/bind.h" @@ -98,7 +99,7 @@ ElectronExtensionLoader::ElectronExtensionLoader( : browser_context_(browser_context), extension_registrar_(ExtensionRegistrar::Get(browser_context)) { extension_registrar_->Init( - this, /*extensions_enabled=*/true, + this, /*extensions_enabled=*/true, base::CommandLine::ForCurrentProcess(), browser_context_->GetPath().AppendASCII(kInstallDirectoryName), browser_context_->GetPath().AppendASCII(kUnpackedInstallDirectoryName)); } @@ -200,9 +201,6 @@ void ElectronExtensionLoader::PostUninstallExtension( scoped_refptr extension, base::OnceClosure done_callback) {} -void ElectronExtensionLoader::PostNotifyUninstallExtension( - scoped_refptr extension) {} - void ElectronExtensionLoader::LoadExtensionForReload( const ExtensionId& extension_id, const base::FilePath& path, @@ -224,12 +222,6 @@ void ElectronExtensionLoader::ShowExtensionDisabledError( const Extension* extension, bool is_remote_install) {} -void ElectronExtensionLoader::FinishDelayedInstallationsIfAny() {} - -bool ElectronExtensionLoader::CanAddExtension(const Extension* extension) { - return true; -} - bool ElectronExtensionLoader::CanEnableExtension(const Extension* extension) { return true; } @@ -239,10 +231,6 @@ bool ElectronExtensionLoader::CanDisableExtension(const Extension* extension) { return false; } -bool ElectronExtensionLoader::ShouldBlockExtension(const Extension* extension) { - return false; -} - void ElectronExtensionLoader::GrantActivePermissions( const Extension* extension) { NOTIMPLEMENTED(); diff --git a/shell/browser/extensions/electron_extension_loader.h b/shell/browser/extensions/electron_extension_loader.h index 696ad845575c..b71c04fd7103 100644 --- a/shell/browser/extensions/electron_extension_loader.h +++ b/shell/browser/extensions/electron_extension_loader.h @@ -36,6 +36,13 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate { ElectronExtensionLoader(const ElectronExtensionLoader&) = delete; ElectronExtensionLoader& operator=(const ElectronExtensionLoader&) = delete; + void OnAddNewOrUpdatedExtension(const Extension* extension) override {} + void UpdateExternalExtensionAlert() override {} + void OnExtensionInstalled(const Extension* extension, + const syncer::StringOrdinal& page_ordinal, + int install_flags, + base::Value::Dict ruleset_install_prefs) override {} + // Loads an unpacked extension from a directory synchronously. Returns the // extension on success, or nullptr otherwise. void LoadExtension(const base::FilePath& extension_dir, @@ -75,19 +82,14 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate { void PreUninstallExtension(scoped_refptr extension) override; void PostUninstallExtension(scoped_refptr extension, base::OnceClosure done_callback) override; - void PostNotifyUninstallExtension( - scoped_refptr extension) override; void LoadExtensionForReload( const ExtensionId& extension_id, const base::FilePath& path, ExtensionRegistrar::LoadErrorBehavior load_error_behavior) override; void ShowExtensionDisabledError(const Extension* extension, bool is_remote_install) override; - void FinishDelayedInstallationsIfAny() override; - bool CanAddExtension(const Extension* extension) override; bool CanEnableExtension(const Extension* extension) override; bool CanDisableExtension(const Extension* extension) override; - bool ShouldBlockExtension(const Extension* extension) override; void GrantActivePermissions(const Extension* extension) override; raw_ptr browser_context_; // Not owned. diff --git a/shell/browser/extensions/electron_extension_system.cc b/shell/browser/extensions/electron_extension_system.cc index 81dbc4e7cc50..74ccee197f95 100644 --- a/shell/browser/extensions/electron_extension_system.cc +++ b/shell/browser/extensions/electron_extension_system.cc @@ -192,12 +192,6 @@ void ElectronExtensionSystem::InstallUpdate( NOTREACHED(); } -bool ElectronExtensionSystem::FinishDelayedInstallationIfReady( - const std::string& extension_id, - bool install_immediately) { - NOTREACHED(); -} - void ElectronExtensionSystem::PerformActionBasedOnOmahaAttributes( const std::string& extension_id, const base::Value::Dict& attributes) { diff --git a/shell/browser/extensions/electron_extension_system.h b/shell/browser/extensions/electron_extension_system.h index 6b20f9f354af..9bb1fe3093ac 100644 --- a/shell/browser/extensions/electron_extension_system.h +++ b/shell/browser/extensions/electron_extension_system.h @@ -80,8 +80,6 @@ class ElectronExtensionSystem : public ExtensionSystem { const base::FilePath& temp_dir, bool install_immediately, InstallUpdateCallback install_update_callback) override; - bool FinishDelayedInstallationIfReady(const std::string& extension_id, - bool install_immediately) override; void PerformActionBasedOnOmahaAttributes( const std::string& extension_id, const base::Value::Dict& attributes) override; diff --git a/shell/browser/feature_list.cc b/shell/browser/feature_list.cc index 676a2fae9e0d..44fef97b0132 100644 --- a/shell/browser/feature_list.cc +++ b/shell/browser/feature_list.cc @@ -32,6 +32,10 @@ #include "printing/printing_features.h" #endif +#if BUILDFLAG(IS_WIN) +#include "ui/views/views_features.h" +#endif + namespace electron { void InitializeFeatureList() { @@ -52,6 +56,12 @@ void InitializeFeatureList() { // Delayed spellcheck initialization is causing the // 'custom dictionary word list API' spec to crash. std::string(",") + spellcheck::kWinDelaySpellcheckServiceInit.name; + // Refs https://issues.chromium.org/issues/401996981 + // TODO(deepak1556): Remove this once test added in + // https://github.com/electron/electron/pull/12904 + // can work without this feature. + enable_features += std::string(",") + + views::features::kEnableTransparentHwndEnlargement.name; #endif #if BUILDFLAG(IS_MAC) diff --git a/shell/browser/file_system_access/file_system_access_permission_context.cc b/shell/browser/file_system_access/file_system_access_permission_context.cc index 865fa06f19ba..dad1d9466e6b 100644 --- a/shell/browser/file_system_access/file_system_access_permission_context.cc +++ b/shell/browser/file_system_access/file_system_access_permission_context.cc @@ -25,6 +25,7 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/disallow_activation_reason.h" +#include "content/public/browser/permission_descriptor_util.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" @@ -162,7 +163,7 @@ bool ShouldBlockAccessToPath(const base::FilePath& path, // Add the hard-coded rules to the dynamic rules. for (auto const& [key, rule_path, type] : - ChromeFileSystemAccessPermissionContext::kBlockedPaths) { + ChromeFileSystemAccessPermissionContext::GenerateBlockedPath()) { if (key == ChromeFileSystemAccessPermissionContext::kNoBasePathKey) { rules.emplace_back(base::FilePath{rule_path}, type); } else if (base::FilePath block_path; @@ -319,17 +320,17 @@ class FileSystemAccessPermissionContext::PermissionGrantImpl return; } - blink::PermissionType type = static_cast( - electron::WebContentsPermissionHelper::PermissionType::FILE_SYSTEM); - base::Value::Dict details; details.Set("filePath", base::FilePathToValue(path_info_.path)); details.Set("isDirectory", handle_type_ == HandleType::kDirectory); details.Set("fileAccessType", type_ == GrantType::kWrite ? "writable" : "readable"); + const blink::PermissionType type = blink::PermissionType::FILE_SYSTEM; permission_manager->RequestPermissionWithDetails( - type, rfh, origin, false, std::move(details), + content::PermissionDescriptorUtil:: + CreatePermissionDescriptorForPermissionType(type), + rfh, origin, false, std::move(details), base::BindOnce(&PermissionGrantImpl::OnPermissionRequestResult, this, std::move(callback))); } diff --git a/shell/browser/hid/electron_hid_delegate.cc b/shell/browser/hid/electron_hid_delegate.cc index 1915d4e48939..d23760d130b9 100644 --- a/shell/browser/hid/electron_hid_delegate.cc +++ b/shell/browser/hid/electron_hid_delegate.cc @@ -144,9 +144,7 @@ bool ElectronHidDelegate::CanRequestDevicePermission( auto* permission_manager = static_cast( browser_context->GetPermissionControllerDelegate()); return permission_manager->CheckPermissionWithDetails( - static_cast( - WebContentsPermissionHelper::PermissionType::HID), - nullptr, origin.GetURL(), std::move(details)); + blink::PermissionType::HID, nullptr, origin.GetURL(), std::move(details)); } bool ElectronHidDelegate::HasDevicePermission( diff --git a/shell/browser/hid/hid_chooser_context.cc b/shell/browser/hid/hid_chooser_context.cc index 4869f56eb8de..2fb733cfafdc 100644 --- a/shell/browser/hid/hid_chooser_context.cc +++ b/shell/browser/hid/hid_chooser_context.cc @@ -98,10 +98,9 @@ void HidChooserContext::GrantDevicePermission( auto* permission_manager = static_cast( browser_context_->GetPermissionControllerDelegate()); - permission_manager->GrantDevicePermission( - static_cast( - WebContentsPermissionHelper::PermissionType::HID), - origin, DeviceInfoToValue(device), browser_context_); + permission_manager->GrantDevicePermission(blink::PermissionType::HID, + origin, DeviceInfoToValue(device), + browser_context_); } else { ephemeral_devices_[origin].insert(device.guid); } @@ -132,10 +131,9 @@ void HidChooserContext::RevokePersistentDevicePermission( const device::mojom::HidDeviceInfo& device) { auto* permission_manager = static_cast( browser_context_->GetPermissionControllerDelegate()); - permission_manager->RevokeDevicePermission( - static_cast( - WebContentsPermissionHelper::PermissionType::HID), - origin, DeviceInfoToValue(device), browser_context_); + permission_manager->RevokeDevicePermission(blink::PermissionType::HID, origin, + DeviceInfoToValue(device), + browser_context_); RevokeEphemeralDevicePermission(origin, device); } @@ -173,9 +171,8 @@ bool HidChooserContext::HasDevicePermission( auto* permission_manager = static_cast( browser_context_->GetPermissionControllerDelegate()); return permission_manager->CheckDevicePermission( - static_cast( - WebContentsPermissionHelper::PermissionType::HID), - origin, DeviceInfoToValue(device), browser_context_); + blink::PermissionType::HID, origin, DeviceInfoToValue(device), + browser_context_); } bool HidChooserContext::IsFidoAllowedForOrigin(const url::Origin& origin) { diff --git a/shell/browser/mac/dict_util.mm b/shell/browser/mac/dict_util.mm index 71230292784a..4efda58212be 100644 --- a/shell/browser/mac/dict_util.mm +++ b/shell/browser/mac/dict_util.mm @@ -5,6 +5,7 @@ #include "shell/browser/mac/dict_util.h" #include +#include #include "base/json/json_writer.h" #include "base/strings/sys_string_conversions.h" @@ -34,12 +35,10 @@ base::Value::List NSArrayToValue(NSArray* arr) { if ([value isKindOfClass:[NSString class]]) { result.Append(base::SysNSStringToUTF8(value)); } else if ([value isKindOfClass:[NSNumber class]]) { - const char* objc_type = [value objCType]; - if (strcmp(objc_type, @encode(BOOL)) == 0 || - strcmp(objc_type, @encode(char)) == 0) + const std::string_view objc_type = [value objCType]; + if (objc_type == @encode(BOOL) || objc_type == @encode(char)) result.Append([value boolValue]); - else if (strcmp(objc_type, @encode(double)) == 0 || - strcmp(objc_type, @encode(float)) == 0) + else if (objc_type == @encode(double) || objc_type == @encode(float)) result.Append([value doubleValue]); else result.Append([value intValue]); @@ -81,12 +80,10 @@ base::Value::Dict NSDictionaryToValue(NSDictionary* dict) { if ([value isKindOfClass:[NSString class]]) { result.Set(str_key, base::Value(base::SysNSStringToUTF8(value))); } else if ([value isKindOfClass:[NSNumber class]]) { - const char* objc_type = [value objCType]; - if (strcmp(objc_type, @encode(BOOL)) == 0 || - strcmp(objc_type, @encode(char)) == 0) + const std::string_view objc_type = [value objCType]; + if (objc_type == @encode(BOOL) || objc_type == @encode(char)) result.Set(str_key, base::Value([value boolValue])); - else if (strcmp(objc_type, @encode(double)) == 0 || - strcmp(objc_type, @encode(float)) == 0) + else if (objc_type == @encode(double) || objc_type == @encode(float)) result.Set(str_key, base::Value([value doubleValue])); else result.Set(str_key, base::Value([value intValue])); diff --git a/shell/browser/mac/electron_application.mm b/shell/browser/mac/electron_application.mm index 797ae197a89e..350443fb0382 100644 --- a/shell/browser/mac/electron_application.mm +++ b/shell/browser/mac/electron_application.mm @@ -210,10 +210,12 @@ inline void dispatch_sync_main(dispatch_block_t block) { bool is_manual_ax = [attribute isEqualToString:@"AXManualAccessibility"]; if ([attribute isEqualToString:@"AXEnhancedUserInterface"] || is_manual_ax) { auto* ax_state = content::BrowserAccessibilityState::GetInstance(); + // TODO(wg-upgrades): crbug.com/1470199 remove use of deprecated + // AddAccessibilityModeFlags() and RemoveAccessibilityModeFlags() if ([value boolValue]) { - ax_state->EnableProcessAccessibility(); + ax_state->AddAccessibilityModeFlags(ui::kAXModeComplete); } else { - ax_state->DisableProcessAccessibility(); + ax_state->RemoveAccessibilityModeFlags(ui::kAXModeComplete); } electron::Browser::Get()->OnAccessibilitySupportChanged(); diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index d8a0e49c83f6..2bbd1ede039e 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -34,6 +34,7 @@ #if BUILDFLAG(IS_WIN) #include "ui/display/win/screen_win.h" +#include "ui/views/views_features.h" #endif #if defined(USE_OZONE) @@ -75,11 +76,14 @@ namespace { #if BUILDFLAG(IS_WIN) gfx::Size GetExpandedWindowSize(const NativeWindow* window, gfx::Size size) { - if (!window->transparent()) + if (!base::FeatureList::IsEnabled( + views::features::kEnableTransparentHwndEnlargement) || + !window->transparent()) { return size; + } - gfx::Size min_size = display::win::ScreenWin::ScreenToDIPSize( - window->GetAcceleratedWidget(), gfx::Size(64, 64)); + gfx::Size min_size = display::win::GetScreenWin()->ScreenToDIPSize( + window->GetAcceleratedWidget(), gfx::Size{64, 64}); // Some AMD drivers can't display windows that are less than 64x64 pixels, // so expand them to be at least that size. http://crbug.com/286609 diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 8bb7d5b51fa4..1d97e7b94445 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -210,14 +210,15 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options, window_ = static_cast( widget()->GetNativeWindow().GetNativeNSWindow()); - RegisterDeleteDelegateCallback(base::BindOnce( - [](NativeWindowMac* window) { - if (window->window_) - window->window_ = nil; - if (window->buttons_proxy_) - window->buttons_proxy_ = nil; - }, - this)); + RegisterDeleteDelegateCallback(RegisterDeleteCallbackPassKey(), + base::BindOnce( + [](NativeWindowMac* window) { + if (window->window_) + window->window_ = nil; + if (window->buttons_proxy_) + window->buttons_proxy_ = nil; + }, + this)); [window_ setEnableLargerThanScreen:enable_larger_than_screen()]; diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 34ad9081c6d4..fb32a6f4ee8e 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -106,10 +106,10 @@ DWM_SYSTEMBACKDROP_TYPE GetBackdropFromString(const std::string& material) { // original ceil()-ed values can cause calculation errors, since converting // both ways goes through a ceil() call. Related issue: #15816 gfx::Rect ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) { - float scale_factor = display::win::ScreenWin::GetScaleFactorForHWND(hwnd); + const auto* const screen_win = display::win::GetScreenWin(); + const float scale_factor = screen_win->GetScaleFactorForHWND(hwnd); gfx::Rect dip_rect = ScaleToRoundedRect(pixel_bounds, 1.0f / scale_factor); - dip_rect.set_origin( - display::win::ScreenWin::ScreenToDIPRect(hwnd, pixel_bounds).origin()); + dip_rect.set_origin(screen_win->ScreenToDIPRect(hwnd, pixel_bounds).origin()); return dip_rect; } @@ -135,10 +135,11 @@ void FlipWindowStyle(HWND handle, bool on, DWORD flag) { } gfx::Rect DIPToScreenRect(HWND hwnd, const gfx::Rect& pixel_bounds) { - float scale_factor = display::win::ScreenWin::GetScaleFactorForHWND(hwnd); + const auto* const screen_win = display::win::GetScreenWin(); + const float scale_factor = screen_win->GetScaleFactorForHWND(hwnd); gfx::Rect screen_rect = ScaleToRoundedRect(pixel_bounds, scale_factor); screen_rect.set_origin( - display::win::ScreenWin::DIPToScreenRect(hwnd, pixel_bounds).origin()); + screen_win->DIPToScreenRect(hwnd, pixel_bounds).origin()); return screen_rect; } @@ -433,20 +434,21 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options, SetBounds(gfx::Rect(GetPosition(), bounds.size()), false); #endif - SetOwnedByWidget(false); - RegisterDeleteDelegateCallback(base::BindOnce( - [](NativeWindowViews* window) { - if (window->is_modal() && window->parent()) { - auto* parent = window->parent(); - // Enable parent window after current window gets closed. - static_cast(parent)->DecrementChildModals(); - // Focus on parent window. - parent->Focus(true); - } + RegisterDeleteDelegateCallback( + RegisterDeleteCallbackPassKey(), + base::BindOnce( + [](NativeWindowViews* window) { + if (window->is_modal() && window->parent()) { + auto* parent = window->parent(); + // Enable parent window after current window gets closed. + static_cast(parent)->DecrementChildModals(); + // Focus on parent window. + parent->Focus(true); + } - window->NotifyWindowClosed(); - }, - this)); + window->NotifyWindowClosed(); + }, + this)); } NativeWindowViews::~NativeWindowViews() { @@ -1081,8 +1083,7 @@ void NativeWindowViews::SetClosable(bool closable) { bool NativeWindowViews::IsClosable() const { #if BUILDFLAG(IS_WIN) HMENU menu = GetSystemMenu(GetAcceleratedWidget(), false); - MENUITEMINFO info; - memset(&info, 0, sizeof(info)); + MENUITEMINFO info = {}; info.cbSize = sizeof(info); info.fMask = MIIM_STATE; if (!GetMenuItemInfo(menu, SC_CLOSE, false, &info)) { @@ -1137,7 +1138,8 @@ void NativeWindowViews::Center() { widget()->SetBounds(window_bounds_in_screen); #else HWND hwnd = GetAcceleratedWidget(); - gfx::Size size = display::win::ScreenWin::DIPToScreenSize(hwnd, GetSize()); + gfx::Size size = + display::win::GetScreenWin()->DIPToScreenSize(hwnd, GetSize()); gfx::CenterAndSizeWindow(nullptr, hwnd, size); #endif } @@ -1361,9 +1363,9 @@ void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) { } // Use global application menu bar when possible. - bool can_use_global_menus = ui::OzonePlatform::GetInstance() - ->GetPlatformProperties() - .supports_global_application_menus; + const bool can_use_global_menus = ui::OzonePlatform::GetInstance() + ->GetPlatformRuntimeProperties() + .supports_global_application_menus; if (can_use_global_menus && ShouldUseGlobalMenuBar()) { if (!global_menu_bar_) global_menu_bar_ = std::make_unique(this); diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 4b324bc1c3f6..ec11d02baee6 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -280,9 +280,11 @@ bool NativeWindowViews::PreHandleMSG(UINT message, checked_for_a11y_support_ = true; + // TODO(wg-upgrades): crbug.com/1470199 remove use of deprecated + // AddAccessibilityModeFlags() and RemoveAccessibilityModeFlags() auto* const axState = content::BrowserAccessibilityState::GetInstance(); if (axState && axState->GetAccessibilityMode() != ui::kAXModeComplete) { - axState->EnableProcessAccessibility(); + axState->AddAccessibilityModeFlags(ui::kAXModeComplete); Browser::Get()->OnAccessibilitySupportChanged(); } diff --git a/shell/browser/net/system_network_context_manager.h b/shell/browser/net/system_network_context_manager.h index 3f0265dbadae..b9d0753a5b66 100644 --- a/shell/browser/net/system_network_context_manager.h +++ b/shell/browser/net/system_network_context_manager.h @@ -7,6 +7,7 @@ #include "chrome/browser/net/proxy_config_monitor.h" #include "mojo/public/cpp/bindings/remote.h" +#include "net/base/features.h" #include "sandbox/policy/features.h" #include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/mojom/network_context.mojom.h" diff --git a/shell/browser/relauncher_linux.cc b/shell/browser/relauncher_linux.cc index ee4e7b1c27e4..7c9c1fa04840 100644 --- a/shell/browser/relauncher_linux.cc +++ b/shell/browser/relauncher_linux.cc @@ -31,8 +31,7 @@ void RelauncherSynchronizeWithParent() { } // set up a signum handler - struct sigaction action; - memset(&action, 0, sizeof(action)); + struct sigaction action = {}; action.sa_handler = [](int /*signum*/) { parentWaiter.Signal(); }; if (sigaction(signum, &action, nullptr) != 0) { PLOG(ERROR) << "sigaction"; diff --git a/shell/browser/serial/serial_chooser_context.cc b/shell/browser/serial/serial_chooser_context.cc index c0ae6ed24851..abf9398da4af 100644 --- a/shell/browser/serial/serial_chooser_context.cc +++ b/shell/browser/serial/serial_chooser_context.cc @@ -92,10 +92,9 @@ void SerialChooserContext::GrantPortPermission( if (CanStorePersistentEntry(port)) { auto* permission_manager = static_cast( browser_context_->GetPermissionControllerDelegate()); - permission_manager->GrantDevicePermission( - static_cast( - WebContentsPermissionHelper::PermissionType::SERIAL), - origin, PortInfoToValue(port), browser_context_); + permission_manager->GrantDevicePermission(blink::PermissionType::SERIAL, + origin, PortInfoToValue(port), + browser_context_); return; } @@ -125,9 +124,8 @@ bool SerialChooserContext::HasPortPermission( auto* permission_manager = static_cast( browser_context_->GetPermissionControllerDelegate()); return permission_manager->CheckDevicePermission( - static_cast( - WebContentsPermissionHelper::PermissionType::SERIAL), - origin, PortInfoToValue(port), browser_context_); + blink::PermissionType::SERIAL, origin, PortInfoToValue(port), + browser_context_); } void SerialChooserContext::RevokePortPermissionWebInitiated( @@ -139,9 +137,8 @@ void SerialChooserContext::RevokePortPermissionWebInitiated( auto* permission_manager = static_cast( browser_context_->GetPermissionControllerDelegate()); permission_manager->RevokeDevicePermission( - static_cast( - WebContentsPermissionHelper::PermissionType::SERIAL), - origin, PortInfoToValue(*it->second), browser_context_); + blink::PermissionType::SERIAL, origin, PortInfoToValue(*it->second), + browser_context_); } auto ephemeral = ephemeral_ports_.find(origin); diff --git a/shell/browser/ui/cocoa/electron_ns_window.mm b/shell/browser/ui/cocoa/electron_ns_window.mm index 6555f47f5bc3..f1435d0fc7f5 100644 --- a/shell/browser/ui/cocoa/electron_ns_window.mm +++ b/shell/browser/ui/cocoa/electron_ns_window.mm @@ -16,6 +16,8 @@ #import #import +using namespace std::string_view_literals; + namespace electron { int ScopedDisableResize::disable_resize_ = 0; @@ -140,19 +142,14 @@ void SwizzleSwipeWithEvent(NSView* view, SEL swiz_selector) { if (styleMask & NSWindowStyleMaskTitled) { if (!g_nsthemeframe_mousedown) { NSView* theme_frame = [[self contentView] superview]; - DCHECK(strcmp(class_getName([theme_frame class]), "NSThemeFrame") == 0) - << "Expected NSThemeFrame but was " - << class_getName([theme_frame class]); + DCHECK_EQ("NSThemeFrame"sv, class_getName([theme_frame class])); SwizzleMouseDown(theme_frame, @selector(swiz_nsthemeframe_mouseDown:), &g_nsthemeframe_mousedown); } } else { if (!g_nsnextstepframe_mousedown) { NSView* nextstep_frame = [[self contentView] superview]; - DCHECK(strcmp(class_getName([nextstep_frame class]), - "NSNextStepFrame") == 0) - << "Expected NSNextStepFrame but was " - << class_getName([nextstep_frame class]); + DCHECK_EQ("NSNextStepFrame"sv, class_getName([nextstep_frame class])); SwizzleMouseDown(nextstep_frame, @selector(swiz_nsnextstepframe_mouseDown:), &g_nsnextstepframe_mousedown); diff --git a/shell/browser/ui/cocoa/root_view_mac.mm b/shell/browser/ui/cocoa/root_view_mac.mm index 4aeaa026a6a2..695239e1a898 100644 --- a/shell/browser/ui/cocoa/root_view_mac.mm +++ b/shell/browser/ui/cocoa/root_view_mac.mm @@ -12,7 +12,7 @@ namespace electron { RootViewMac::RootViewMac(NativeWindow* window) : window_(window) { - set_owned_by_client(); + set_owned_by_client(OwnedByClientPassKey{}); SetLayoutManager(std::make_unique()); } diff --git a/shell/browser/ui/file_dialog_win.cc b/shell/browser/ui/file_dialog_win.cc index e142477ad082..7e48879c4130 100644 --- a/shell/browser/ui/file_dialog_win.cc +++ b/shell/browser/ui/file_dialog_win.cc @@ -65,26 +65,15 @@ void ConvertFilters(const Filters& filters, } } -static HRESULT GetFileNameFromShellItem(IShellItem* pShellItem, - SIGDN type, - LPWSTR lpstr, - size_t cchLength) { - assert(pShellItem != nullptr); +auto GetFileNameFromShellItem(IShellItem* pShellItem, SIGDN type) { + std::optional path; - LPWSTR lpstrName = nullptr; - HRESULT hRet = pShellItem->GetDisplayName(type, &lpstrName); - - if (SUCCEEDED(hRet)) { - if (wcslen(lpstrName) < cchLength) { - wcscpy_s(lpstr, cchLength, lpstrName); - } else { - NOTREACHED(); - } - - ::CoTaskMemFree(lpstrName); + if (wchar_t* name = {}; SUCCEEDED(pShellItem->GetDisplayName(type, &name))) { + path.emplace(name); + ::CoTaskMemFree(name); } - return hRet; + return path; } static void SetDefaultFolder(IFileDialog* dialog, @@ -206,14 +195,11 @@ bool ShowOpenDialogSync(const DialogSettings& settings, if (FAILED(hr)) return false; - wchar_t file_name[MAX_PATH]; - hr = GetFileNameFromShellItem(item, SIGDN_FILESYSPATH, file_name, - std::size(file_name)); - - if (FAILED(hr)) + auto path = GetFileNameFromShellItem(item, SIGDN_FILESYSPATH); + if (!path) return false; - paths->push_back(base::FilePath(file_name)); + paths->emplace_back(std::move(*path)); } return true; diff --git a/shell/browser/ui/inspectable_web_contents_view.cc b/shell/browser/ui/inspectable_web_contents_view.cc index 7389adbf3f9b..929fb697c18e 100644 --- a/shell/browser/ui/inspectable_web_contents_view.cc +++ b/shell/browser/ui/inspectable_web_contents_view.cc @@ -23,8 +23,6 @@ namespace electron { -namespace { - class DevToolsWindowDelegate : public views::ClientView, public views::WidgetDelegate { public: @@ -35,8 +33,8 @@ class DevToolsWindowDelegate : public views::ClientView, shell_(shell), view_(view), widget_(widget) { - SetOwnedByWidget(true); - set_owned_by_client(); + SetOwnedByWidget(OwnedByWidgetPassKey{}); + set_owned_by_client(OwnedByClientPassKey{}); if (shell->GetDelegate()) icon_ = shell->GetDelegate()->GetDevToolsWindowIcon(); @@ -72,8 +70,6 @@ class DevToolsWindowDelegate : public views::ClientView, ui::ImageModel icon_; }; -} // namespace - InspectableWebContentsView::InspectableWebContentsView( InspectableWebContents* inspectable_web_contents) : inspectable_web_contents_(inspectable_web_contents), diff --git a/shell/browser/ui/message_box_gtk.cc b/shell/browser/ui/message_box_gtk.cc index 65498ae1a81f..edc9b7a908f0 100644 --- a/shell/browser/ui/message_box_gtk.cc +++ b/shell/browser/ui/message_box_gtk.cc @@ -2,6 +2,9 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#include +#include + #include "shell/browser/ui/message_box.h" #include "base/containers/flat_map.h" @@ -25,12 +28,6 @@ #include "ui/base/ui_base_features.h" #endif -#define ANSI_FOREGROUND_RED "\x1b[31m" -#define ANSI_FOREGROUND_BLACK "\x1b[30m" -#define ANSI_TEXT_BOLD "\x1b[1m" -#define ANSI_BACKGROUND_GRAY "\x1b[47m" -#define ANSI_RESET "\x1b[0m" - namespace electron { MessageBoxSettings::MessageBoxSettings() = default; @@ -256,11 +253,15 @@ void ShowErrorBox(const std::u16string& title, const std::u16string& content) { GtkMessageBox(settings).RunSynchronous(); } else { - fprintf(stderr, - ANSI_TEXT_BOLD ANSI_BACKGROUND_GRAY ANSI_FOREGROUND_RED - "%s\n" ANSI_FOREGROUND_BLACK "%s" ANSI_RESET "\n", - base::UTF16ToUTF8(title).c_str(), - base::UTF16ToUTF8(content).c_str()); + static constexpr std::string_view ANSI_FG_RED = "\x1b[31m"; + static constexpr std::string_view ANSI_FG_BLACK = "\x1b[30m"; + static constexpr std::string_view ANSI_TEXT_BOLD = "\x1b[1m"; + static constexpr std::string_view ANSI_BG_GRAY = "\x1b[47m"; + static constexpr std::string_view ANSI_RESET = "\x1b[0m"; + std::cerr << ANSI_TEXT_BOLD << ANSI_BG_GRAY << ANSI_FG_RED + << base::UTF16ToUTF8(title) << '\n' + << ANSI_FG_BLACK << base::UTF16ToUTF8(content) << '\n' + << ANSI_RESET; } } diff --git a/shell/browser/ui/views/autofill_popup_view.cc b/shell/browser/ui/views/autofill_popup_view.cc index b5c8f03e005c..eaecac75444d 100644 --- a/shell/browser/ui/views/autofill_popup_view.cc +++ b/shell/browser/ui/views/autofill_popup_view.cc @@ -33,7 +33,9 @@ END_METADATA AutofillPopupView::AutofillPopupView(AutofillPopup* popup, views::Widget* parent_widget) - : popup_(popup), parent_widget_(parent_widget) { + : views::WidgetDelegateView(CreatePassKey()), + popup_(popup), + parent_widget_(parent_widget) { CreateChildViews(); SetFocusBehavior(FocusBehavior::ALWAYS); set_drag_controller(this); diff --git a/shell/browser/ui/views/root_view.cc b/shell/browser/ui/views/root_view.cc index c5fb92868d53..87c3aa998909 100644 --- a/shell/browser/ui/views/root_view.cc +++ b/shell/browser/ui/views/root_view.cc @@ -35,7 +35,7 @@ RootView::RootView(NativeWindow* window) : window_{raw_ref::from_ptr(window)}, main_view_{raw_ref::from_ptr( AddChildView(std::make_unique()))} { - set_owned_by_client(); + set_owned_by_client(OwnedByClientPassKey{}); views::BoxLayout* layout = SetLayoutManager(std::make_unique( views::BoxLayout::Orientation::kVertical)); @@ -63,7 +63,7 @@ void RootView::SetMenu(ElectronMenuModel* menu_model) { if (!menu_bar_) { menu_bar_ = std::make_unique(&window_.get(), this); - menu_bar_->set_owned_by_client(); + menu_bar_->set_owned_by_client(OwnedByClientPassKey{}); if (!menu_bar_autohide_) SetMenuBarVisibility(true); } diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index 75b7794462c1..d4afdb86fa38 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -68,9 +68,10 @@ gfx::Rect WinFrameView::GetWindowBoundsForClientBounds( } int WinFrameView::FrameBorderThickness() const { - return (IsMaximized() || frame()->IsFullscreen()) - ? 0 - : display::win::ScreenWin::GetSystemMetricsInDIP(SM_CXSIZEFRAME); + if (frame()->IsFullscreen() || IsMaximized()) + return 0; + + return display::win::GetScreenWin()->GetSystemMetricsInDIP(SM_CXSIZEFRAME); } views::View* WinFrameView::TargetForRect(views::View* root, @@ -178,7 +179,7 @@ int WinFrameView::FrameTopBorderThickness(bool restored) const { // to fail when it ought to succeed. return std::floor( FrameTopBorderThicknessPx(restored) / - display::win::ScreenWin::GetScaleFactorForHWND(HWNDForView(this))); + display::win::GetScreenWin()->GetScaleFactorForHWND(HWNDForView(this))); } int WinFrameView::FrameTopBorderThicknessPx(bool restored) const { @@ -203,7 +204,7 @@ int WinFrameView::FrameTopBorderThicknessPx(bool restored) const { int WinFrameView::TitlebarMaximizedVisualHeight() const { int maximized_height = - display::win::ScreenWin::GetSystemMetricsInDIP(SM_CYCAPTION); + display::win::GetScreenWin()->GetSystemMetricsInDIP(SM_CYCAPTION); return maximized_height; } diff --git a/shell/browser/ui/webui/accessibility_ui.cc b/shell/browser/ui/webui/accessibility_ui.cc index 38a401dba071..083652ad00a7 100644 --- a/shell/browser/ui/webui/accessibility_ui.cc +++ b/shell/browser/ui/webui/accessibility_ui.cc @@ -84,7 +84,6 @@ constexpr std::string_view kText = "text"; constexpr std::string_view kWeb = "web"; // Possible global flag values -constexpr std::string_view kDisabled = "disabled"; constexpr std::string_view kOff = "off"; constexpr std::string_view kOn = "on"; @@ -160,8 +159,6 @@ void HandleAccessibilityRequestCallback( static_cast(current_context)->prefs(); ui::AXMode mode = content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode(); - bool is_a11y_allowed = content::BrowserAccessibilityState::GetInstance() - ->IsAccessibilityAllowed(); bool native = mode.has_mode(ui::AXMode::kNativeAPIs); bool web = mode.has_mode(ui::AXMode::kWebContents); bool text = mode.has_mode(ui::AXMode::kInlineTextBoxes); @@ -171,16 +168,14 @@ void HandleAccessibilityRequestCallback( // The "native" and "web" flags are disabled if // --disable-renderer-accessibility is set. - data.Set(kNative, is_a11y_allowed ? (native ? kOn : kOff) : kDisabled); - data.Set(kWeb, is_a11y_allowed ? (web ? kOn : kOff) : kDisabled); + data.Set(kNative, native ? kOn : kOff); + data.Set(kWeb, web ? kOn : kOff); // The "text", "extendedProperties" and "html" flags are only // meaningful if "web" is enabled. - bool is_web_enabled = is_a11y_allowed && web; - data.Set(kText, is_web_enabled ? (text ? kOn : kOff) : kDisabled); - data.Set(kExtendedProperties, - is_web_enabled ? (extendedProperties ? kOn : kOff) : kDisabled); - data.Set(kHTML, is_web_enabled ? (html ? kOn : kOff) : kDisabled); + data.Set(kText, text ? kOn : kOff); + data.Set(kExtendedProperties, extendedProperties ? kOn : kOff); + data.Set(kHTML, html ? kOn : kOff); // The "pdfPrinting" flag is independent of the others. data.Set(kPDFPrinting, pdf_printing ? kOn : kOff); @@ -245,9 +240,9 @@ void HandleAccessibilityRequestCallback( } base::Value::Dict descriptor = BuildTargetDescriptor(rvh); - descriptor.Set(kNative, is_a11y_allowed); - descriptor.Set(kExtendedProperties, is_web_enabled && extendedProperties); - descriptor.Set(kWeb, is_web_enabled); + descriptor.Set(kNative, native); + descriptor.Set(kExtendedProperties, extendedProperties); + descriptor.Set(kWeb, web); page_list.Append(std::move(descriptor)); } data.Set(kPagesField, std::move(page_list)); diff --git a/shell/browser/ui/win/notify_icon.cc b/shell/browser/ui/win/notify_icon.cc index 9beadca88000..c4c9e66563ad 100644 --- a/shell/browser/ui/win/notify_icon.cc +++ b/shell/browser/ui/win/notify_icon.cc @@ -6,6 +6,7 @@ #include +#include "base/containers/span.h" #include "base/logging.h" #include "base/strings/string_util_win.h" #include "base/strings/utf_string_conversions.h" @@ -49,11 +50,10 @@ NotifyIcon::NotifyIcon(NotifyIconHost* host, : host_(host), icon_id_(id), window_(window), message_id_(message) { guid_ = guid; is_using_guid_ = guid != GUID_DEFAULT; - NOTIFYICONDATA icon_data; - InitIconData(&icon_data); + NOTIFYICONDATA icon_data = InitIconData(); icon_data.uFlags |= NIF_MESSAGE; icon_data.uCallbackMessage = message_id_; - BOOL result = Shell_NotifyIcon(NIM_ADD, &icon_data); + const BOOL result = Shell_NotifyIcon(NIM_ADD, &icon_data); // This can happen if the explorer process isn't running when we try to // create the icon for some reason (for example, at startup). if (!result) @@ -63,8 +63,7 @@ NotifyIcon::NotifyIcon(NotifyIconHost* host, NotifyIcon::~NotifyIcon() { // Remove our icon. host_->Remove(this); - NOTIFYICONDATA icon_data; - InitIconData(&icon_data); + NOTIFYICONDATA icon_data = InitIconData(); Shell_NotifyIcon(NIM_DELETE, &icon_data); } @@ -110,11 +109,12 @@ void NotifyIcon::HandleMouseExited(int modifiers) { } void NotifyIcon::ResetIcon() { - NOTIFYICONDATA icon_data; - InitIconData(&icon_data); // Delete any previously existing icon. + NOTIFYICONDATA icon_data = InitIconData(); Shell_NotifyIcon(NIM_DELETE, &icon_data); - InitIconData(&icon_data); + + // Update the icon. + icon_data = InitIconData(); icon_data.uFlags |= NIF_MESSAGE; icon_data.uCallbackMessage = message_id_; icon_data.hIcon = icon_.get(); @@ -132,8 +132,7 @@ void NotifyIcon::SetImage(HICON image) { icon_ = base::win::ScopedGDIObject(CopyIcon(image)); // Create the icon. - NOTIFYICONDATA icon_data; - InitIconData(&icon_data); + NOTIFYICONDATA icon_data = InitIconData(); icon_data.uFlags |= NIF_ICON; icon_data.hIcon = image; BOOL result = Shell_NotifyIcon(NIM_MODIFY, &icon_data); @@ -146,23 +145,34 @@ void NotifyIcon::SetPressedImage(HICON image) { // pressed status icons. } +template +static void CopyStringToBuf(CharT (&tgt_buf)[N], + const std::basic_string src_str) { + if constexpr (N < 1U) + return; + + const auto src = base::span{src_str}; + const auto n_chars = std::min(src.size(), N - 1U); + auto tgt = base::span{tgt_buf}; + tgt.first(n_chars).copy_from(src.first(n_chars)); + tgt[n_chars] = CharT{}; // zero-terminate the string +} + void NotifyIcon::SetToolTip(const std::string& tool_tip) { // Create the icon. - NOTIFYICONDATA icon_data; - InitIconData(&icon_data); + NOTIFYICONDATA icon_data = InitIconData(); icon_data.uFlags |= NIF_TIP; - wcsncpy_s(icon_data.szTip, base::UTF8ToWide(tool_tip).c_str(), _TRUNCATE); + CopyStringToBuf(icon_data.szTip, base::UTF8ToWide(tool_tip)); BOOL result = Shell_NotifyIcon(NIM_MODIFY, &icon_data); if (!result) LOG(WARNING) << "Unable to set tooltip for status tray icon"; } void NotifyIcon::DisplayBalloon(const BalloonOptions& options) { - NOTIFYICONDATA icon_data; - InitIconData(&icon_data); + NOTIFYICONDATA icon_data = InitIconData(); icon_data.uFlags |= NIF_INFO; - wcsncpy_s(icon_data.szInfoTitle, base::as_wcstr(options.title), _TRUNCATE); - wcsncpy_s(icon_data.szInfo, base::as_wcstr(options.content), _TRUNCATE); + CopyStringToBuf(icon_data.szInfoTitle, base::AsWString(options.title)); + CopyStringToBuf(icon_data.szInfo, base::AsWString(options.content)); icon_data.uTimeout = 0; icon_data.hBalloonIcon = options.icon; icon_data.dwInfoFlags = ConvertIconType(options.icon_type); @@ -182,8 +192,7 @@ void NotifyIcon::DisplayBalloon(const BalloonOptions& options) { } void NotifyIcon::RemoveBalloon() { - NOTIFYICONDATA icon_data; - InitIconData(&icon_data); + NOTIFYICONDATA icon_data = InitIconData(); icon_data.uFlags |= NIF_INFO; BOOL result = Shell_NotifyIcon(NIM_MODIFY, &icon_data); @@ -192,8 +201,7 @@ void NotifyIcon::RemoveBalloon() { } void NotifyIcon::Focus() { - NOTIFYICONDATA icon_data; - InitIconData(&icon_data); + NOTIFYICONDATA icon_data = InitIconData(); BOOL result = Shell_NotifyIcon(NIM_SETFOCUS, &icon_data); if (!result) @@ -242,8 +250,7 @@ void NotifyIcon::SetContextMenu(raw_ptr menu_model) { } gfx::Rect NotifyIcon::GetBounds() { - NOTIFYICONIDENTIFIER icon_id; - memset(&icon_id, 0, sizeof(NOTIFYICONIDENTIFIER)); + NOTIFYICONIDENTIFIER icon_id = {}; icon_id.uID = icon_id_; icon_id.hWnd = window_; icon_id.cbSize = sizeof(NOTIFYICONIDENTIFIER); @@ -253,18 +260,20 @@ gfx::Rect NotifyIcon::GetBounds() { RECT rect = {0}; Shell_NotifyIconGetRect(&icon_id, &rect); - return display::win::ScreenWin::ScreenToDIPRect(window_, gfx::Rect(rect)); + return display::win::GetScreenWin()->ScreenToDIPRect(window_, + gfx::Rect{rect}); } -void NotifyIcon::InitIconData(NOTIFYICONDATA* icon_data) { - memset(icon_data, 0, sizeof(NOTIFYICONDATA)); - icon_data->cbSize = sizeof(NOTIFYICONDATA); - icon_data->hWnd = window_; - icon_data->uID = icon_id_; +NOTIFYICONDATA NotifyIcon::InitIconData() const { + NOTIFYICONDATA icon_data = {}; + icon_data.cbSize = sizeof(NOTIFYICONDATA); + icon_data.hWnd = window_; + icon_data.uID = icon_id_; if (is_using_guid_) { - icon_data->uFlags = NIF_GUID; - icon_data->guidItem = guid_; + icon_data.uFlags = NIF_GUID; + icon_data.guidItem = guid_; } + return icon_data; } } // namespace electron diff --git a/shell/browser/ui/win/notify_icon.h b/shell/browser/ui/win/notify_icon.h index 0f49f8bbb9fa..935a1cb7c4d2 100644 --- a/shell/browser/ui/win/notify_icon.h +++ b/shell/browser/ui/win/notify_icon.h @@ -76,7 +76,7 @@ class NotifyIcon : public TrayIcon { base::WeakPtr GetWeakPtr() { return weak_factory_.GetWeakPtr(); } private: - void InitIconData(NOTIFYICONDATA* icon_data); + NOTIFYICONDATA InitIconData() const; // The tray that owns us. Weak. raw_ptr host_; diff --git a/shell/browser/ui/win/taskbar_host.cc b/shell/browser/ui/win/taskbar_host.cc index f94950eb5757..b0094736e670 100644 --- a/shell/browser/ui/win/taskbar_host.cc +++ b/shell/browser/ui/win/taskbar_host.cc @@ -8,6 +8,7 @@ #include #include +#include "base/containers/span.h" #include "base/strings/utf_string_conversions.h" #include "base/win/scoped_gdi_object.h" #include "shell/browser/native_window.h" @@ -52,6 +53,18 @@ bool GetThumbarButtonFlags(const std::vector& flags, return true; } +template +void CopyStringToBuf(CharT (&tgt_buf)[N], + const std::basic_string src_str) { + if constexpr (N < 1U) + return; + + const auto src = base::span{src_str}; + const auto n_chars = std::min(src.size(), N - 1U); + auto tgt = base::span{tgt_buf}; + tgt.first(n_chars).copy_from(src.first(n_chars)); + tgt[n_chars] = CharT{}; // zero-terminate the string +} } // namespace TaskbarHost::ThumbarButton::ThumbarButton() = default; @@ -109,8 +122,7 @@ bool TaskbarHost::SetThumbarButtons(HWND window, // Set tooltip. if (!button.tooltip.empty()) { thumb_button.dwMask |= THB_TOOLTIP; - wcsncpy_s(thumb_button.szTip, base::UTF8ToWide(button.tooltip).c_str(), - _TRUNCATE); + CopyStringToBuf(thumb_button.szTip, base::UTF8ToWide(button.tooltip)); } // Save callback. @@ -234,7 +246,7 @@ bool TaskbarHost::SetThumbnailClip(HWND window, const gfx::Rect& region) { return SUCCEEDED(taskbar_->SetThumbnailClip(window, nullptr)); } else { RECT rect = - display::win::ScreenWin::DIPToScreenRect(window, region).ToRECT(); + display::win::GetScreenWin()->DIPToScreenRect(window, region).ToRECT(); return SUCCEEDED(taskbar_->SetThumbnailClip(window, &rect)); } } diff --git a/shell/browser/usb/electron_usb_delegate.cc b/shell/browser/usb/electron_usb_delegate.cc index 4e3827d04f74..3b45ce654d27 100644 --- a/shell/browser/usb/electron_usb_delegate.cc +++ b/shell/browser/usb/electron_usb_delegate.cc @@ -182,9 +182,7 @@ bool ElectronUsbDelegate::CanRequestDevicePermission( auto* permission_manager = static_cast( browser_context->GetPermissionControllerDelegate()); return permission_manager->CheckPermissionWithDetails( - static_cast( - WebContentsPermissionHelper::PermissionType::USB), - nullptr, origin.GetURL(), std::move(details)); + blink::PermissionType::USB, nullptr, origin.GetURL(), std::move(details)); } void ElectronUsbDelegate::RevokeDevicePermissionWebInitiated( diff --git a/shell/browser/usb/usb_chooser_context.cc b/shell/browser/usb/usb_chooser_context.cc index 1cb603734924..a40d2c197e6a 100644 --- a/shell/browser/usb/usb_chooser_context.cc +++ b/shell/browser/usb/usb_chooser_context.cc @@ -175,9 +175,7 @@ void UsbChooserContext::RevokeObjectPermissionInternal( auto* permission_manager = static_cast( browser_context_->GetPermissionControllerDelegate()); permission_manager->RevokeDevicePermission( - static_cast( - WebContentsPermissionHelper::PermissionType::USB), - origin, object, browser_context_); + blink::PermissionType::USB, origin, object, browser_context_); } else { const std::string* guid = object_dict->FindString(kDeviceIdKey); auto it = ephemeral_devices_.find(origin); @@ -206,9 +204,8 @@ void UsbChooserContext::GrantDevicePermission( auto* permission_manager = static_cast( browser_context_->GetPermissionControllerDelegate()); permission_manager->GrantDevicePermission( - static_cast( - WebContentsPermissionHelper::PermissionType::USB), - origin, DeviceInfoToValue(device_info), browser_context_); + blink::PermissionType::USB, origin, DeviceInfoToValue(device_info), + browser_context_); } else { ephemeral_devices_[origin].insert(device_info.guid); } @@ -232,9 +229,8 @@ bool UsbChooserContext::HasDevicePermission( browser_context_->GetPermissionControllerDelegate()); return permission_manager->CheckDevicePermission( - static_cast( - WebContentsPermissionHelper::PermissionType::USB), - origin, DeviceInfoToValue(device_info), browser_context_); + blink::PermissionType::USB, origin, DeviceInfoToValue(device_info), + browser_context_); } void UsbChooserContext::GetDevices( diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 01daac783407..fcffbac319a4 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -10,6 +10,7 @@ #include "components/content_settings/core/common/content_settings.h" #include "components/webrtc/media_stream_devices_controller.h" #include "content/public/browser/browser_context.h" +#include "content/public/browser/permission_descriptor_util.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents_user_data.h" #include "shell/browser/electron_browser_context.h" @@ -220,7 +221,9 @@ void WebContentsPermissionHelper::RequestPermission( web_contents_->GetBrowserContext()->GetPermissionControllerDelegate()); auto origin = web_contents_->GetLastCommittedURL(); permission_manager->RequestPermissionWithDetails( - permission, requesting_frame, origin, false, std::move(details), + content::PermissionDescriptorUtil:: + CreatePermissionDescriptorForPermissionType(permission), + requesting_frame, origin, false, std::move(details), base::BindOnce(&OnPermissionResponse, std::move(callback))); } @@ -238,10 +241,9 @@ bool WebContentsPermissionHelper::CheckPermission( void WebContentsPermissionHelper::RequestFullscreenPermission( content::RenderFrameHost* requesting_frame, base::OnceCallback callback) { - RequestPermission( - requesting_frame, - static_cast(PermissionType::FULLSCREEN), - std::move(callback)); + RequestPermission(requesting_frame, + blink::PermissionType::ELECTRON_FULLSCREEN, + std::move(callback)); } void WebContentsPermissionHelper::RequestMediaAccessPermission( @@ -306,10 +308,8 @@ void WebContentsPermissionHelper::RequestOpenExternalPermission( const GURL& url) { base::Value::Dict details; details.Set("externalURL", url.spec()); - RequestPermission( - requesting_frame, - static_cast(PermissionType::OPEN_EXTERNAL), - std::move(callback), user_gesture, std::move(details)); + RequestPermission(requesting_frame, blink::PermissionType::OPEN_EXTERNAL, + std::move(callback), user_gesture, std::move(details)); } bool WebContentsPermissionHelper::CheckMediaAccessPermission( @@ -328,9 +328,7 @@ bool WebContentsPermissionHelper::CheckSerialAccessPermission( const url::Origin& embedding_origin) const { base::Value::Dict details; details.Set("securityOrigin", embedding_origin.GetURL().spec()); - return CheckPermission( - static_cast(PermissionType::SERIAL), - std::move(details)); + return CheckPermission(blink::PermissionType::SERIAL, std::move(details)); } WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPermissionHelper); diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index 21a38abadf81..24804ee98e64 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -25,15 +25,6 @@ class WebContentsPermissionHelper WebContentsPermissionHelper& operator=(const WebContentsPermissionHelper&) = delete; - enum class PermissionType { - FULLSCREEN = static_cast(blink::PermissionType::NUM) + 1, - OPEN_EXTERNAL, - SERIAL, - HID, - USB, - FILE_SYSTEM, - }; - // Asynchronous Requests void RequestFullscreenPermission(content::RenderFrameHost* requesting_frame, base::OnceCallback callback); diff --git a/shell/common/api/electron_api_url_loader.cc b/shell/common/api/electron_api_url_loader.cc index 547df550d434..8ec31ae1a56f 100644 --- a/shell/common/api/electron_api_url_loader.cc +++ b/shell/common/api/electron_api_url_loader.cc @@ -13,6 +13,7 @@ #include "base/check_op.h" #include "base/containers/fixed_flat_map.h" +#include "base/containers/span.h" #include "base/memory/raw_ptr.h" #include "base/notreached.h" #include "base/sequence_checker.h" @@ -151,20 +152,13 @@ class BufferDataSource : public mojo::DataPipeProducer::DataSource { private: // mojo::DataPipeProducer::DataSource: [[nodiscard]] uint64_t GetLength() const override { return buffer_.size(); } - ReadResult Read(uint64_t offset, base::span buffer) override { - ReadResult result; - if (offset <= buffer_.size()) { - size_t readable_size = buffer_.size() - offset; - size_t writable_size = buffer.size(); - size_t copyable_size = std::min(readable_size, writable_size); - if (copyable_size > 0) { - memcpy(buffer.data(), &buffer_[offset], copyable_size); - } - result.bytes_read = copyable_size; - } else { - NOTREACHED(); - } - return result; + ReadResult Read(uint64_t offset, base::span tgt) override { + CHECK_LE(offset, buffer_.size()); + const auto src = + base::span{buffer_}.subspan(static_cast(offset)); + const auto n_copied = std::min(src.size(), tgt.size()); + tgt.first(n_copied).copy_from(src.first(n_copied)); + return ReadResult{.bytes_read = n_copied}; } std::vector buffer_; @@ -715,7 +709,9 @@ void SimpleURLLoaderWrapper::OnDataReceived(std::string_view string_view, v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::HandleScope handle_scope(isolate); auto array_buffer = v8::ArrayBuffer::New(isolate, string_view.size()); - memcpy(array_buffer->Data(), string_view.data(), string_view.size()); + // TODO SAFETY: migrate this to shell/common/v8_util.h + UNSAFE_BUFFERS( + std::ranges::copy(string_view, static_cast(array_buffer->Data()))); Emit("data", array_buffer, std::move(resume)); } diff --git a/shell/common/gin_converters/content_converter.cc b/shell/common/gin_converters/content_converter.cc index 122aa7d1e453..ee21095df354 100644 --- a/shell/common/gin_converters/content_converter.cc +++ b/shell/common/gin_converters/content_converter.cc @@ -148,7 +148,6 @@ bool Converter::FromV8( v8::Local Converter::ToV8( v8::Isolate* isolate, const blink::PermissionType& val) { - using PermissionType = electron::WebContentsPermissionHelper::PermissionType; // Based on mappings from content/browser/devtools/protocol/browser_handler.cc // Not all permissions are currently used by Electron but this will future // proof these conversions. @@ -225,28 +224,28 @@ v8::Local Converter::ToV8( return StringToV8(isolate, "web-app-installation"); case blink::PermissionType::LOCAL_NETWORK_ACCESS: return StringToV8(isolate, "local-network-access"); + + // Permissions added by Electron case blink::PermissionType::DEPRECATED_SYNC_CLIPBOARD_READ: return StringToV8(isolate, "deprecated-sync-clipboard-read"); + case blink::PermissionType::FILE_SYSTEM: + return StringToV8(isolate, "fileSystem"); + case blink::PermissionType::ELECTRON_FULLSCREEN: + return StringToV8(isolate, "fullscreen"); + case blink::PermissionType::HID: + return StringToV8(isolate, "hid"); + case blink::PermissionType::OPEN_EXTERNAL: + return StringToV8(isolate, "openExternal"); + case blink::PermissionType::SERIAL: + return StringToV8(isolate, "serial"); + case blink::PermissionType::USB: + return StringToV8(isolate, "usb"); + case blink::PermissionType::NUM: break; } - switch (static_cast(val)) { - case PermissionType::FULLSCREEN: - return StringToV8(isolate, "fullscreen"); - case PermissionType::OPEN_EXTERNAL: - return StringToV8(isolate, "openExternal"); - case PermissionType::SERIAL: - return StringToV8(isolate, "serial"); - case PermissionType::HID: - return StringToV8(isolate, "hid"); - case PermissionType::USB: - return StringToV8(isolate, "usb"); - case PermissionType::FILE_SYSTEM: - return StringToV8(isolate, "fileSystem"); - default: - return StringToV8(isolate, "unknown"); - } + return StringToV8(isolate, "unknown"); } // static diff --git a/shell/common/language_util_linux.cc b/shell/common/language_util_linux.cc index 434b4f396d6d..9a3574a1518d 100644 --- a/shell/common/language_util_linux.cc +++ b/shell/common/language_util_linux.cc @@ -25,10 +25,10 @@ std::vector GetPreferredLanguages() { // SAFETY: |g_get_language_names()| returns a glib-owned array // of const C strings, terminated by an empty string. // This loop is the correct way to walk through its return values. + static constexpr std::string_view CLangName = "C"; for (; *languages; UNSAFE_BUFFERS(++languages)) { - if (strcmp(*languages, "C") != 0) { + if (CLangName != *languages) preferredLanguages.push_back(base::i18n::GetCanonicalLocale(*languages)); - } } return preferredLanguages; diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 8db9da3646a4..b8e96202dbed 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -5,6 +5,7 @@ #include "shell/common/node_bindings.h" #include +#include #include #include #include @@ -605,9 +606,8 @@ void NodeBindings::Initialize(v8::Local context) { args, static_cast(process_flags)); - for (const std::string& error : result->errors()) { - fprintf(stderr, "%s: %s\n", args[0].c_str(), error.c_str()); - } + for (const std::string& error : result->errors()) + std::cerr << args[0] << ": " << error << '\n'; if (result->early_return() != 0) exit(result->exit_code()); diff --git a/shell/common/node_bindings_mac.cc b/shell/common/node_bindings_mac.cc index b92c9bae0534..4afada977aee 100644 --- a/shell/common/node_bindings_mac.cc +++ b/shell/common/node_bindings_mac.cc @@ -2,6 +2,12 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#ifdef UNSAFE_BUFFERS_BUILD +// TODO(crbug.com/351564777): Remove FD_ZERO and convert code to safer +// constructs. +#pragma allow_unsafe_buffers +#endif + #include "shell/common/node_bindings_mac.h" #include diff --git a/shell/renderer/preload_utils.cc b/shell/renderer/preload_utils.cc index a8af3739af84..298b018eabda 100644 --- a/shell/renderer/preload_utils.cc +++ b/shell/renderer/preload_utils.cc @@ -5,6 +5,7 @@ #include "shell/renderer/preload_utils.h" #include "base/process/process.h" +#include "base/strings/strcat.h" #include "shell/common/gin_helper/arguments.h" #include "shell/common/gin_helper/dictionary.h" #include "shell/common/node_includes.h" @@ -46,10 +47,7 @@ v8::Local GetBinding(v8::Isolate* isolate, auto* mod = node::binding::get_linked_module(binding_key.c_str()); if (!mod) { - char errmsg[1024]; - snprintf(errmsg, sizeof(errmsg), "No such binding: %s", - binding_key.c_str()); - margs->ThrowError(errmsg); + margs->ThrowError(base::StrCat({"No such binding: ", binding_key})); return exports; } diff --git a/spec/api-browser-window-spec.ts b/spec/api-browser-window-spec.ts index f90078f9a391..fd0d054bfae1 100755 --- a/spec/api-browser-window-spec.ts +++ b/spec/api-browser-window-spec.ts @@ -5281,7 +5281,7 @@ describe('BrowserWindow module', () => { expect(w.maximizable).to.be.true('maximizable'); }); - ifit(process.platform === 'win32')('works for a window smaller than 64x64', () => { + ifit(process.platform !== 'darwin')('works for a window smaller than 64x64', () => { const w = new BrowserWindow({ show: false, frame: false,