chore: bump chromium to 96.0.4647.0 (main) (#30814)
* chore: bump chromium in DEPS to 95.0.4630.0 * 3133701: Fix chrome root store codegen for cross-compile builds.3133701
* 49125: Include SHA512-256 in EVP_get_digestbyname and EVP_MD_do_all. https://boringssl-review.googlesource.com/c/boringssl/+/49125 * chore: fixup patch indices * 3131662: [Code Health] Remove ListValue::Append(Integer|Boolean)3131662
* chore: bump chromium in DEPS to 95.0.4631.0 * chore: update patches * chore: bump chromium in DEPS to 95.0.4635.0 * chore: update patches * chore: bump chromium in DEPS to 95.0.4636.0 * chore: bump chromium in DEPS to 95.0.4637.0 * chore: update patches * refactor: move PlatformNotificationService into BrowserContext Refs:3137256
* refactor: ListValue::GetSize and ListValue::AppendString were removed Refs:3144540
* chore: bump chromium in DEPS to 95.0.4638.0 * chore: bump chromium in DEPS to 95.0.4638.4 * chore: bump chromium in DEPS to 96.0.4640.0 * chore: bump chromium in DEPS to 96.0.4641.0 * chore: bump chromium in DEPS to 96.0.4642.0 * chore: update patches Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org> * 3134756: Move extensions/browser/value_store to components/value_store. Ref:3134756
* 3150092: [Autofill] Allow aligning Autofill suggestions to the field's center Ref:3150092
* chore: bump chromium in DEPS to 96.0.4643.0 * chore: update patches * chore: bump chromium in DEPS to 96.0.4644.0 * chore: update patches * chore: bump chromium in DEPS to 96.0.4645.0 * chore: update patches * chore: bump chromium in DEPS to 96.0.4646.0 * chore: bump chromium in DEPS to 96.0.4647.0 * chore: update patches Ref (for chromium):3165772
* 3162087: Reland "Ensure Branch Target Identification is enabled for executable pages." Ref:3162087
* chore: update evert_add_inline_and_inline_origin_records_to_symbol_file.patch Xref:3166678
Xref:3166674
* chore: update Allocator construction Xref:3135195
Change RefCount::kAllowed/Disallowed semantics into BackupRefPtr::kEnabled/Disabled * chore: add UseConfigurablePool to v8::ArrayBuffer::Allocator invocation Xref:3090845
* chore: do not set network_context_params.context_name Xref:3155743
Remove name field from mojom::NetworkContext * fix: use ForEachRenderFrameHost to iterate frames. Xref:3163336
New implementation partially cribbed from https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/script_executor.cc;drc=f894f106c6d5fac8e0b75158f622256e0f34f593;l=109 * [Blink Cleanup] Remove WebLocalFrame::RequestExecuteScriptAndReturnValue() Xref:3149699
ExecuteJavaScript's RequestExecuteScript() new params are cribbed from3149699/4/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
* Remove IsDescendantOf API on RenderFrameHost. Xref:3165357
function is trivial to implement, so make a local copy in anon namespace * Rewrite IsDescendantOf check to check GetParentOrOuterDocument.3160061
* Remove GetFramesInSubtree from RenderFrameHost3163336
* fix: dump_syms for macOS * chore: update patches * [Code Health] Remove ListValue::AppendString and ListValue::GetSize3144540
* fix: gn check3163890
* fix: crash with Isolate::GetHeapCodeAndMetadataStatistics3175820
* chore: update patches * chore: fix windows build * Add kPrintWithPostScriptType42Fonts feature.3150776
* chore: update patches * chore: fix tests * ozone/x11: fix VA-API.3141878
* Revert "ozone/x11: fix VA-API." This reverts commit 23e742acb1032bf4afc1a45e4bed38e42184fd01. * Reland "Make Ozone/X11 default."3114071
* fixup Reland "Make Ozone/X11 default." * fixup Reland "Make Ozone/X11 default." for clipboard Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: VerteDinde <khammond@slack-corp.com> Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org> Co-authored-by: VerteDinde <keeleymhammond@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
This commit is contained in:
parent
959b657903
commit
cc01272a8d
109 changed files with 629 additions and 2265 deletions
|
@ -264,15 +264,13 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
|
|||
options.Get(options::kType, &window_type);
|
||||
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
// Start monitoring window states.
|
||||
window_state_watcher_ = std::make_unique<WindowStateWatcher>(this);
|
||||
// Start monitoring window states.
|
||||
window_state_watcher_ = std::make_unique<WindowStateWatcher>(this);
|
||||
|
||||
// Set _GTK_THEME_VARIANT to dark if we have "dark-theme" option set.
|
||||
bool use_dark_theme = false;
|
||||
if (options.Get(options::kDarkTheme, &use_dark_theme) && use_dark_theme) {
|
||||
SetGTKDarkThemeEnabled(use_dark_theme);
|
||||
}
|
||||
// Set _GTK_THEME_VARIANT to dark if we have "dark-theme" option set.
|
||||
bool use_dark_theme = false;
|
||||
if (options.Get(options::kDarkTheme, &use_dark_theme) && use_dark_theme) {
|
||||
SetGTKDarkThemeEnabled(use_dark_theme);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -282,39 +280,37 @@ NativeWindowViews::NativeWindowViews(const gin_helper::Dictionary& options,
|
|||
#endif
|
||||
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
// Before the window is mapped the SetWMSpecState can not work, so we have
|
||||
// to manually set the _NET_WM_STATE.
|
||||
std::vector<x11::Atom> state_atom_list;
|
||||
bool skip_taskbar = false;
|
||||
if (options.Get(options::kSkipTaskbar, &skip_taskbar) && skip_taskbar) {
|
||||
state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_SKIP_TASKBAR"));
|
||||
}
|
||||
|
||||
// Before the window is mapped, there is no SHOW_FULLSCREEN_STATE.
|
||||
if (fullscreen) {
|
||||
state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_FULLSCREEN"));
|
||||
}
|
||||
|
||||
if (parent) {
|
||||
// Force using dialog type for child window.
|
||||
window_type = "dialog";
|
||||
|
||||
// Modal window needs the _NET_WM_STATE_MODAL hint.
|
||||
if (is_modal())
|
||||
state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_MODAL"));
|
||||
}
|
||||
|
||||
if (!state_atom_list.empty())
|
||||
SetArrayProperty(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
x11::GetAtom("_NET_WM_STATE"), x11::Atom::ATOM,
|
||||
state_atom_list);
|
||||
|
||||
// Set the _NET_WM_WINDOW_TYPE.
|
||||
if (!window_type.empty())
|
||||
SetWindowType(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
window_type);
|
||||
// Before the window is mapped the SetWMSpecState can not work, so we have
|
||||
// to manually set the _NET_WM_STATE.
|
||||
std::vector<x11::Atom> state_atom_list;
|
||||
bool skip_taskbar = false;
|
||||
if (options.Get(options::kSkipTaskbar, &skip_taskbar) && skip_taskbar) {
|
||||
state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_SKIP_TASKBAR"));
|
||||
}
|
||||
|
||||
// Before the window is mapped, there is no SHOW_FULLSCREEN_STATE.
|
||||
if (fullscreen) {
|
||||
state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_FULLSCREEN"));
|
||||
}
|
||||
|
||||
if (parent) {
|
||||
// Force using dialog type for child window.
|
||||
window_type = "dialog";
|
||||
|
||||
// Modal window needs the _NET_WM_STATE_MODAL hint.
|
||||
if (is_modal())
|
||||
state_atom_list.push_back(x11::GetAtom("_NET_WM_STATE_MODAL"));
|
||||
}
|
||||
|
||||
if (!state_atom_list.empty())
|
||||
SetArrayProperty(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
x11::GetAtom("_NET_WM_STATE"), x11::Atom::ATOM,
|
||||
state_atom_list);
|
||||
|
||||
// Set the _NET_WM_WINDOW_TYPE.
|
||||
if (!window_type.empty())
|
||||
SetWindowType(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
window_type);
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
@ -413,12 +409,10 @@ NativeWindowViews::~NativeWindowViews() {
|
|||
|
||||
void NativeWindowViews::SetGTKDarkThemeEnabled(bool use_dark_theme) {
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
const std::string color = use_dark_theme ? "dark" : "light";
|
||||
x11::SetStringProperty(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
x11::GetAtom("_GTK_THEME_VARIANT"),
|
||||
x11::GetAtom("UTF8_STRING"), color);
|
||||
}
|
||||
const std::string color = use_dark_theme ? "dark" : "light";
|
||||
x11::SetStringProperty(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
x11::GetAtom("_GTK_THEME_VARIANT"),
|
||||
x11::GetAtom("UTF8_STRING"), color);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -474,7 +468,7 @@ void NativeWindowViews::Show() {
|
|||
NotifyWindowShow();
|
||||
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform() && global_menu_bar_)
|
||||
if (global_menu_bar_)
|
||||
global_menu_bar_->OnWindowMapped();
|
||||
#endif
|
||||
}
|
||||
|
@ -485,7 +479,7 @@ void NativeWindowViews::ShowInactive() {
|
|||
NotifyWindowShow();
|
||||
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform() && global_menu_bar_)
|
||||
if (global_menu_bar_)
|
||||
global_menu_bar_->OnWindowMapped();
|
||||
#endif
|
||||
}
|
||||
|
@ -499,7 +493,7 @@ void NativeWindowViews::Hide() {
|
|||
NotifyWindowHide();
|
||||
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform() && global_menu_bar_)
|
||||
if (global_menu_bar_)
|
||||
global_menu_bar_->OnWindowUnmapped();
|
||||
#endif
|
||||
|
||||
|
@ -521,9 +515,7 @@ bool NativeWindowViews::IsEnabled() {
|
|||
return ::IsWindowEnabled(GetAcceleratedWidget());
|
||||
#elif defined(OS_LINUX)
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
return !event_disabler_.get();
|
||||
}
|
||||
return !event_disabler_.get();
|
||||
#endif
|
||||
NOTIMPLEMENTED();
|
||||
return true;
|
||||
|
@ -563,17 +555,15 @@ void NativeWindowViews::SetEnabledInternal(bool enable) {
|
|||
#if defined(OS_WIN)
|
||||
::EnableWindow(GetAcceleratedWidget(), enable);
|
||||
#elif defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
views::DesktopWindowTreeHostPlatform* tree_host =
|
||||
views::DesktopWindowTreeHostLinux::GetHostForWidget(
|
||||
GetAcceleratedWidget());
|
||||
if (enable) {
|
||||
tree_host->RemoveEventRewriter(event_disabler_.get());
|
||||
event_disabler_.reset();
|
||||
} else {
|
||||
event_disabler_ = std::make_unique<EventDisabler>();
|
||||
tree_host->AddEventRewriter(event_disabler_.get());
|
||||
}
|
||||
views::DesktopWindowTreeHostPlatform* tree_host =
|
||||
views::DesktopWindowTreeHostLinux::GetHostForWidget(
|
||||
GetAcceleratedWidget());
|
||||
if (enable) {
|
||||
tree_host->RemoveEventRewriter(event_disabler_.get());
|
||||
event_disabler_.reset();
|
||||
} else {
|
||||
event_disabler_ = std::make_unique<EventDisabler>();
|
||||
tree_host->AddEventRewriter(event_disabler_.get());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -786,13 +776,11 @@ bool NativeWindowViews::MoveAbove(const std::string& sourceId) {
|
|||
0, 0, 0,
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
|
||||
#elif defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
if (!IsWindowValid(static_cast<x11::Window>(id.id)))
|
||||
return false;
|
||||
if (!IsWindowValid(static_cast<x11::Window>(id.id)))
|
||||
return false;
|
||||
|
||||
electron::MoveWindowAbove(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
static_cast<x11::Window>(id.id));
|
||||
}
|
||||
electron::MoveWindowAbove(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
static_cast<x11::Window>(id.id));
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
@ -808,10 +796,8 @@ void NativeWindowViews::MoveTop() {
|
|||
size.width(), size.height(),
|
||||
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
|
||||
#elif defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
electron::MoveWindowToForeground(
|
||||
static_cast<x11::Window>(GetAcceleratedWidget()));
|
||||
}
|
||||
electron::MoveWindowToForeground(
|
||||
static_cast<x11::Window>(GetAcceleratedWidget()));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -994,10 +980,8 @@ void NativeWindowViews::SetSkipTaskbar(bool skip) {
|
|||
taskbar_host_.RestoreThumbarButtons(GetAcceleratedWidget());
|
||||
}
|
||||
#elif defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
SetWMSpecState(static_cast<x11::Window>(GetAcceleratedWidget()), skip,
|
||||
x11::GetAtom("_NET_WM_STATE_SKIP_TASKBAR"));
|
||||
}
|
||||
SetWMSpecState(static_cast<x11::Window>(GetAcceleratedWidget()), skip,
|
||||
x11::GetAtom("_NET_WM_STATE_SKIP_TASKBAR"));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1098,27 +1082,23 @@ void NativeWindowViews::SetIgnoreMouseEvents(bool ignore, bool forward) {
|
|||
SetForwardMouseMessages(forward);
|
||||
}
|
||||
#elif defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
auto* connection = x11::Connection::Get();
|
||||
if (ignore) {
|
||||
x11::Rectangle r{0, 0, 1, 1};
|
||||
connection->shape().Rectangles({
|
||||
.operation = x11::Shape::So::Set,
|
||||
.destination_kind = x11::Shape::Sk::Input,
|
||||
.ordering = x11::ClipOrdering::YXBanded,
|
||||
.destination_window =
|
||||
static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
.rectangles = {r},
|
||||
});
|
||||
} else {
|
||||
connection->shape().Mask({
|
||||
.operation = x11::Shape::So::Set,
|
||||
.destination_kind = x11::Shape::Sk::Input,
|
||||
.destination_window =
|
||||
static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
.source_bitmap = x11::Pixmap::None,
|
||||
});
|
||||
}
|
||||
auto* connection = x11::Connection::Get();
|
||||
if (ignore) {
|
||||
x11::Rectangle r{0, 0, 1, 1};
|
||||
connection->shape().Rectangles({
|
||||
.operation = x11::Shape::So::Set,
|
||||
.destination_kind = x11::Shape::Sk::Input,
|
||||
.ordering = x11::ClipOrdering::YXBanded,
|
||||
.destination_window = static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
.rectangles = {r},
|
||||
});
|
||||
} else {
|
||||
connection->shape().Mask({
|
||||
.operation = x11::Shape::So::Set,
|
||||
.destination_kind = x11::Shape::Sk::Input,
|
||||
.destination_window = static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
.source_bitmap = x11::Pixmap::None,
|
||||
});
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -1157,23 +1137,21 @@ bool NativeWindowViews::IsFocusable() {
|
|||
|
||||
void NativeWindowViews::SetMenu(ElectronMenuModel* menu_model) {
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
// Remove global menu bar.
|
||||
if (global_menu_bar_ && menu_model == nullptr) {
|
||||
global_menu_bar_.reset();
|
||||
root_view_->UnregisterAcceleratorsWithFocusManager();
|
||||
return;
|
||||
}
|
||||
// Remove global menu bar.
|
||||
if (global_menu_bar_ && menu_model == nullptr) {
|
||||
global_menu_bar_.reset();
|
||||
root_view_->UnregisterAcceleratorsWithFocusManager();
|
||||
return;
|
||||
}
|
||||
|
||||
// Use global application menu bar when possible.
|
||||
if (ShouldUseGlobalMenuBar()) {
|
||||
if (!global_menu_bar_)
|
||||
global_menu_bar_ = std::make_unique<GlobalMenuBarX11>(this);
|
||||
if (global_menu_bar_->IsServerStarted()) {
|
||||
root_view_->RegisterAcceleratorsWithFocusManager(menu_model);
|
||||
global_menu_bar_->SetMenu(menu_model);
|
||||
return;
|
||||
}
|
||||
// Use global application menu bar when possible.
|
||||
if (ShouldUseGlobalMenuBar()) {
|
||||
if (!global_menu_bar_)
|
||||
global_menu_bar_ = std::make_unique<GlobalMenuBarX11>(this);
|
||||
if (global_menu_bar_->IsServerStarted()) {
|
||||
root_view_->RegisterAcceleratorsWithFocusManager(menu_model);
|
||||
global_menu_bar_->SetMenu(menu_model);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1255,13 +1233,11 @@ void NativeWindowViews::SetParentWindow(NativeWindow* parent) {
|
|||
NativeWindow::SetParentWindow(parent);
|
||||
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
x11::SetProperty(
|
||||
static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
x11::Atom::WM_TRANSIENT_FOR, x11::Atom::WINDOW,
|
||||
parent ? static_cast<x11::Window>(parent->GetAcceleratedWidget())
|
||||
: ui::GetX11RootWindow());
|
||||
}
|
||||
x11::SetProperty(
|
||||
static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
x11::Atom::WM_TRANSIENT_FOR, x11::Atom::WINDOW,
|
||||
parent ? static_cast<x11::Window>(parent->GetAcceleratedWidget())
|
||||
: ui::GetX11RootWindow());
|
||||
#elif defined(OS_WIN)
|
||||
// To set parentship between windows into Windows is better to play with the
|
||||
// owner instead of the parent, as Windows natively seems to do if a parent
|
||||
|
@ -1340,18 +1316,17 @@ void NativeWindowViews::SetVisibleOnAllWorkspaces(
|
|||
|
||||
bool NativeWindowViews::IsVisibleOnAllWorkspaces() {
|
||||
#if defined(USE_X11)
|
||||
if (!features::IsUsingOzonePlatform()) {
|
||||
// Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to
|
||||
// determine whether the current window is visible on all workspaces.
|
||||
x11::Atom sticky_atom = x11::GetAtom("_NET_WM_STATE_STICKY");
|
||||
std::vector<x11::Atom> wm_states;
|
||||
GetArrayProperty(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
x11::GetAtom("_NET_WM_STATE"), &wm_states);
|
||||
return std::find(wm_states.begin(), wm_states.end(), sticky_atom) !=
|
||||
wm_states.end();
|
||||
}
|
||||
#endif
|
||||
// Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to
|
||||
// determine whether the current window is visible on all workspaces.
|
||||
x11::Atom sticky_atom = x11::GetAtom("_NET_WM_STATE_STICKY");
|
||||
std::vector<x11::Atom> wm_states;
|
||||
GetArrayProperty(static_cast<x11::Window>(GetAcceleratedWidget()),
|
||||
x11::GetAtom("_NET_WM_STATE"), &wm_states);
|
||||
return std::find(wm_states.begin(), wm_states.end(), sticky_atom) !=
|
||||
wm_states.end();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
content::DesktopMediaID NativeWindowViews::GetDesktopMediaID() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue