chore: bump chromium to 122.0.6194.0 (main) (#40750)

* chore: bump chromium in DEPS to 122.0.6180.0

* chore: update render_widget_host_view_base.patch

Xref: 5079532

minor manual changes to match upstream changes

* chore: update printing.patch

Xref: 5094777

Xref: 5054299

Update patch to upstream changes in print_view_manager_base.cc.
CC @codebytere for 👀

* chore: update feat_add_onclose_to_messageport.patch

Xref: 5083156

no manual changes; patch applied with fuzz 1

* chore: update build_do_not_depend_on_packed_resource_integrity.patch

Xref: 5087072

minor manual changes to match upstream changes

* chore: update port_autofill_colors_to_the_color_pipeline.patch

Xref: 4960481

no manual changes; patch applied with fuzz 2

* chore: update revert_api_dcheck-fail_when_we_reenter_v8_while_terminating.patch

Xref: 5076902
Xref: 5096253

The `bailout_value` variable, which allowed us to fail gracefully in
these macros, has been removed upstream. This raises the temperature
on https://github.com/electron/electron/issues/40741 ...

Since we don't have a bailout value, return a default-constructed
instance of whatever the return type is of the function that invokes
the macro.

* Remove performActionOnRemotePage

Xref: 5068017

It appears it is not used by anything within Chromium or outside.

* perf: in SubmenuButton ctor, move() the PressedCallback

Xref: 5066872

The copy construtor is more expensive and has been removed upstream

* chore: update constructor call for ElectronExtensionsRendererClient::dispatcher_

Xref: 5055146

* chore: handle CAPTURED_SURFACE_CONTROL in Converter<blink::PermissionType>::ToV8()

Xref: 5096614

* chore: e patches all

* chore: bump chromium to 122.0.6181.0

* chore: e patches all

* refactor: Add lookup for per-RenderFrame SpellCheckProvider

Xref: 5075094

Previously we could pass a routing ID into the spellcheck methods.
This ID arg has been replaced with a SpellCheckHost& arg.

We can get the SpellCheckHost from an accessor in SpellCheckProvider,
which was already being created on a per-render-frame basis in
RenderClientBase.

This commit adds a RenderFrame-to-SpellCheckProvider accessor
in RenderClientBase so that it can be used to get that needed
SpellCheckHost.

* chore: make lint happy

* chore: restore the will_cause_resize arg to WebContents::ExitFullscreen

Xref: 5074445

Xref: 5031312

upstream reverted this change

* chore: bump chromium in DEPS to 122.0.6182.0

* chore: update patches

* chore: fix virtual function names that were renamed upstream

Xref: 5115241

* chore: handle new blink::PermissionType::SMART_CARD in PermissionType converter

Xref: 5049989

* chore: node script/gen-libc++-filenames.js

* fixup! chore: update build_do_not_depend_on_packed_resource_integrity.patch

* chore: remove revert_api_dcheck-fail_when_we_reenter_v8_while_terminating.patch

The previous experiment of removing the DCHECK in 35093783 was a huge
failure. We either need to either:

A) use upstream as-is and fix the DCHECK failure, or
B) revert 5076902 too
C) find some other workaround

This commit is the first half of option A, removing the patch to use
upstream as-is.

* chore: bump chromium in DEPS to 122.0.6184.0

* chore: bump chromium in DEPS to 122.0.6186.0

* chore; update mas_avoid_private_macos_api_usage.patch.patch

Xref: 5085619

minor manual changes to match upstream changes

* chore: update build_do_not_depend_on_packed_resource_integrity.patch

Xref: 5120922

minor manual changes to match upstream changes

* chore: update fix_move_autopipsettingshelper_behind_branding_buildflag.patch

Xref: 5041595

no manual changes; patch applied with fuzz 1

* chore: e patches all

* chore: add refactor_update_node-platform_to_match_v8-platform_api_changes.patch

* chore: bump chromium in DEPS to 122.0.6188.0

* chore: bump chromium in DEPS to 122.0.6190.0

* chore: bump chromium in DEPS to 122.0.6192.0

* chore: bump chromium in DEPS to 122.0.6194.0

* Remove an unnecessary DCHECK which causes Lacros to crash.

5124880

* [FixIt Week] Add shared regular profile function that includes ash

5100709

* Simplify the PrintManagerHost::ScriptedPrint() call

5019703

* [local compile hints] Add tests

5024173

* chore: update patches

* fixup! chore: add refactor_update_node-platform_to_match_v8-platform_api_changes.patch

* chore: node script/gen-libc++-filenames.js

* Remove //ui/ozone/buildflags.h

5119048

* fixup! Remove //ui/ozone/buildflags.h

* fixup! Remove //ui/ozone/buildflags.h

* chore: update patches

* fixup! refactor: Add lookup for per-RenderFrame SpellCheckProvider

* fixup! Remove //ui/ozone/buildflags.h

* Add permission policy verification in PermissionControllerImpl

5059112

* fix: ensure spellcheck interface is registered for frame

* [exceptions] Unify pending and scheduled exceptions

5050065

* fix: dchecks in node.js tests

* fix: try adding termination check

* chore: document breaking iframe change

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
electron-roller[bot] 2024-01-03 09:52:49 +01:00 committed by GitHub
parent be4e4ff11b
commit 8c89137ecd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
104 changed files with 977 additions and 871 deletions

View file

@ -2,16 +2,10 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#if defined(USE_OZONE)
#include "ui/ozone/buildflags.h"
#if BUILDFLAG(OZONE_PLATFORM_X11)
#define USE_OZONE_PLATFORM_X11
#endif
#endif
// FIXME(ckerr) this incorrect #include order is a temporary
// fix to unblock the roll. Will fix in an upgrade followup.
#ifdef USE_OZONE_PLATFORM_X11
#include "ui/base/ozone_buildflags.h"
#if BUILDFLAG(IS_OZONE_X11)
#include "ui/base/x/x11_util.h"
#endif
@ -47,6 +41,7 @@
#include "ui/base/hit_test.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/views/background.h"
#include "ui/views/controls/webview/webview.h"
#include "ui/views/widget/native_widget_private.h"
@ -67,19 +62,15 @@
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#include "ui/views/window/native_frame_view.h"
#if defined(USE_OZONE_PLATFORM_X11)
#if BUILDFLAG(IS_OZONE_X11)
#include "shell/browser/ui/views/global_menu_bar_x11.h"
#include "shell/browser/ui/x/event_disabler.h"
#include "shell/browser/ui/x/x_window_utils.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/x/atom_cache.h"
#include "ui/gfx/x/connection.h"
#include "ui/gfx/x/shape.h"
#include "ui/gfx/x/xproto.h"
#endif
#if defined(USE_OZONE)
#include "ui/ozone/public/ozone_platform.h"
#endif
#elif BUILDFLAG(IS_WIN)
#include "base/win/win_util.h"
@ -174,26 +165,12 @@ gfx::Size WindowSizeToContentSizeBuggy(HWND hwnd, const gfx::Size& size) {
#endif
#if defined(USE_OZONE)
bool CreateGlobalMenuBar() {
return ui::OzonePlatform::GetInstance()
->GetPlatformProperties()
.supports_global_application_menus;
}
#endif
#if defined(USE_OZONE_PLATFORM_X11)
bool IsX11() {
[[maybe_unused]] bool IsX11() {
return ui::OzonePlatform::GetInstance()
->GetPlatformProperties()
.electron_can_call_x11;
}
#endif
class NativeWindowClientView : public views::ClientView {
public:
NativeWindowClientView(views::Widget* widget,
@ -350,9 +327,7 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
if (parent)
SetParentWindow(parent);
#endif
#if defined(USE_OZONE_PLATFORM_X11)
if (IsX11()) {
// Before the window is mapped the SetWMSpecState can not work, so we have
// to manually set the _NET_WM_STATE.
@ -481,7 +456,7 @@ NativeWindowViews::~NativeWindowViews() {
}
void NativeWindowViews::SetGTKDarkThemeEnabled(bool use_dark_theme) {
#if defined(USE_OZONE_PLATFORM_X11)
#if BUILDFLAG(IS_LINUX)
if (IsX11()) {
const std::string color = use_dark_theme ? "dark" : "light";
auto* connection = x11::Connection::Get();
@ -543,12 +518,10 @@ void NativeWindowViews::Show() {
NotifyWindowShow();
#if defined(USE_OZONE)
#if BUILDFLAG(IS_LINUX)
if (global_menu_bar_)
global_menu_bar_->OnWindowMapped();
#endif
#if defined(USE_OZONE_PLATFORM_X11)
// On X11, setting Z order before showing the window doesn't take effect,
// so we have to call it again.
if (IsX11())
@ -561,7 +534,7 @@ void NativeWindowViews::ShowInactive() {
NotifyWindowShow();
#if defined(USE_OZONE)
#if BUILDFLAG(IS_LINUX)
if (global_menu_bar_)
global_menu_bar_->OnWindowMapped();
#endif
@ -575,7 +548,7 @@ void NativeWindowViews::Hide() {
NotifyWindowHide();
#if defined(USE_OZONE)
#if BUILDFLAG(IS_LINUX)
if (global_menu_bar_)
global_menu_bar_->OnWindowUnmapped();
#endif
@ -607,10 +580,8 @@ bool NativeWindowViews::IsEnabled() {
#if BUILDFLAG(IS_WIN)
return ::IsWindowEnabled(GetAcceleratedWidget());
#elif BUILDFLAG(IS_LINUX)
#if defined(USE_OZONE_PLATFORM_X11)
if (IsX11())
return !event_disabler_.get();
#endif
NOTIMPLEMENTED();
return true;
#endif
@ -648,7 +619,7 @@ void NativeWindowViews::SetEnabledInternal(bool enable) {
#if BUILDFLAG(IS_WIN)
::EnableWindow(GetAcceleratedWidget(), enable);
#elif defined(USE_OZONE_PLATFORM_X11)
#else
if (IsX11()) {
views::DesktopWindowTreeHostPlatform* tree_host =
views::DesktopWindowTreeHostLinux::GetHostForWidget(
@ -923,7 +894,7 @@ bool NativeWindowViews::MoveAbove(const std::string& sourceId) {
::SetWindowPos(GetAcceleratedWidget(), GetWindow(otherWindow, GW_HWNDPREV), 0,
0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
#elif defined(USE_OZONE_PLATFORM_X11)
#else
if (IsX11()) {
if (!IsWindowValid(static_cast<x11::Window>(id.id)))
return false;
@ -945,7 +916,7 @@ void NativeWindowViews::MoveTop() {
::SetWindowPos(GetAcceleratedWidget(), HWND_TOP, pos.x(), pos.y(),
size.width(), size.height(),
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
#elif defined(USE_OZONE_PLATFORM_X11)
#else
if (IsX11())
electron::MoveWindowToForeground(
static_cast<x11::Window>(GetAcceleratedWidget()));
@ -1244,7 +1215,7 @@ void NativeWindowViews::SetIgnoreMouseEvents(bool ignore, bool forward) {
} else {
SetForwardMouseMessages(forward);
}
#elif defined(USE_OZONE_PLATFORM_X11)
#else
if (IsX11()) {
auto* connection = x11::Connection::Get();
if (ignore) {
@ -1312,7 +1283,7 @@ bool NativeWindowViews::IsFocusable() {
}
void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) {
#if defined(USE_OZONE)
#if BUILDFLAG(IS_LINUX)
// Remove global menu bar.
if (global_menu_bar_ && menu_model == nullptr) {
global_menu_bar_.reset();
@ -1321,7 +1292,10 @@ void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) {
}
// Use global application menu bar when possible.
if (CreateGlobalMenuBar() && ShouldUseGlobalMenuBar()) {
bool can_use_global_menus = ui::OzonePlatform::GetInstance()
->GetPlatformProperties()
.supports_global_application_menus;
if (can_use_global_menus && ShouldUseGlobalMenuBar()) {
if (!global_menu_bar_)
global_menu_bar_ = std::make_unique<GlobalMenuBarX11>(this);
if (global_menu_bar_->IsServerStarted()) {
@ -1364,7 +1338,7 @@ void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) {
void NativeWindowViews::SetParentWindow(NativeWindow* parent) {
NativeWindow::SetParentWindow(parent);
#if defined(USE_OZONE_PLATFORM_X11)
#if BUILDFLAG(IS_LINUX)
if (IsX11()) {
auto* connection = x11::Connection::Get();
connection->SetProperty(
@ -1481,7 +1455,7 @@ void NativeWindowViews::SetVisibleOnAllWorkspaces(
}
bool NativeWindowViews::IsVisibleOnAllWorkspaces() {
#if defined(USE_OZONE_PLATFORM_X11)
#if BUILDFLAG(IS_LINUX)
if (IsX11()) {
// Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to
// determine whether the current window is visible on all workspaces.