chore: bump chromium to 121.0.6159.0 (main) (#40632)

* chore: bump chromium in DEPS to 121.0.6154.0

* chore: bump chromium in DEPS to 121.0.6155.0

* fix patches

* chore: update patches

* patch out reference to GetOcclusionTracker

* un-flag PIPOcclusionTracker

* chore: bump chromium in DEPS to 121.0.6157.0

* fix conflicts

5038807

* add PIP occlusion tracker sources to chromium_src

* 5037591: Replace feature_list's Initialize* methods with Init*.

5037591

* 4811903: Move //content/browser/renderer_host/input/synthetic_gesture_controller to //content/common/input

4811903

* 4917953: usb: Add usb-unrestricted to permission policy

4917953

* 5072395: Remove unused `creation_context` parameter from blink/public APIs

5072395

* 5052035: [X11] Change AtomCache from a singleton to owned by Connection

5052035

* fix v8/.patches

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

* 5035771: Remove the SetImage method of ImageButton

5035771

* fixup! 5052035: [X11] Change AtomCache from a singleton to owned by Connection

* fixup! 5035771: Remove the SetImage method of ImageButton

* chore: bump chromium in DEPS to 121.0.6159.0

* 4505903: [Extensions] Add lastAccessed property to chrome.tabs.Tab

4505903

* update patches

* don't duplicate tabs API types

this causes weird memory bugs if the two get out of sync

* fix UAF in TrayIconCocoa

not sure why this is popping up just now ... this has been broken for ages afaict

* Revert "don't duplicate tabs API types"

This reverts commit 80dff2efaa1297e5c191b2c69648099d6665dbff.

This is failing tests with extensions API schema check failures, so
revert for now. we'll fix it later.

* revert v8 change causing node crashes

* chore: reduce diffs in revert_api_dcheck-fail_when_we_reenter_v8_while_terminating.patch

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
electron-roller[bot] 2023-12-11 14:58:26 -06:00 committed by GitHub
parent 890a557eed
commit 08a51f3339
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
63 changed files with 415 additions and 664 deletions

View file

@ -158,7 +158,7 @@ int NodeMain(int argc, char* argv[]) {
// Initialize feature list.
auto feature_list = std::make_unique<base::FeatureList>();
feature_list->InitializeFromCommandLine("", "");
feature_list->InitFromCommandLine("", "");
base::FeatureList::SetInstance(std::move(feature_list));
// Explicitly register electron's builtin bindings.

View file

@ -43,8 +43,8 @@
#include "ui/base/x/x11_display_util.h"
#include "ui/base/x/x11_util.h"
#include "ui/display/util/edid_parser.h" // nogncheck
#include "ui/gfx/x/atom_cache.h"
#include "ui/gfx/x/randr.h"
#include "ui/gfx/x/x11_atom_cache.h"
#endif // defined(USE_OZONE_PLATFORM_X11)
#endif // BUILDFLAG(IS_WIN)

View file

@ -49,7 +49,7 @@ void InitializeFeatureList() {
// 'custom dictionary word list API' spec to crash.
std::string(",") + spellcheck::kWinDelaySpellcheckServiceInit.name;
#endif
base::FeatureList::InitializeInstance(enable_features, disable_features);
base::FeatureList::InitInstance(enable_features, disable_features);
}
void InitializeFieldTrials() {

View file

@ -73,9 +73,9 @@
#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/x11_atom_cache.h"
#include "ui/gfx/x/xproto.h"
#endif
#if defined(USE_OZONE)

View file

@ -21,9 +21,9 @@
#include "components/viz/common/frame_sinks/delay_based_time_source.h"
#include "components/viz/common/quads/compositor_render_pass.h"
#include "content/browser/renderer_host/cursor_manager.h" // nogncheck
#include "content/browser/renderer_host/input/synthetic_gesture_target.h" // nogncheck
#include "content/browser/renderer_host/render_widget_host_delegate.h" // nogncheck
#include "content/browser/renderer_host/render_widget_host_owner_delegate.h" // nogncheck
#include "content/common/input/synthetic_gesture.h" // nogncheck
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/context_factory.h"

View file

@ -35,6 +35,10 @@ class TrayIconCocoa : public TrayIcon {
void SetContextMenu(raw_ptr<ElectronMenuModel> menu_model) override;
gfx::Rect GetBounds() override;
base::WeakPtr<TrayIconCocoa> GetWeakPtr() {
return weak_factory_.GetWeakPtr();
}
private:
// Electron custom view for NSStatusItem.
StatusItemView* __strong status_item_view_;

View file

@ -249,7 +249,15 @@
useDefaultAccelerator:NO];
// Hacky way to mimic design of ordinary tray menu.
[statusItem_ setMenu:[menuController menu]];
base::WeakPtr<electron::TrayIconCocoa> weak_tray_icon =
trayIcon_->GetWeakPtr();
[[statusItem_ button] performClick:self];
// /⚠️ \ Warning! Arbitrary JavaScript and who knows what else has been run
// during -performClick:. This object may have been deleted.
// We check if |trayIcon_| is still alive as it owns us and has the same
// lifetime.
if (!weak_tray_icon)
return;
[statusItem_ setMenu:[menuController_ menu]];
return;
}

View file

@ -14,6 +14,7 @@
#include "shell/browser/ui/views/frameless_view.h"
#include "ui/base/hit_test.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/image_model.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/insets.h"
@ -380,9 +381,9 @@ void ClientFrameViewLinux::UpdateButtonImages() {
state_id++) {
views::Button::ButtonState state =
static_cast<views::Button::ButtonState>(state_id);
button.button->SetImage(
state, nav_button_provider_->GetImage(
button.type, ButtonStateToNavButtonProviderState(state)));
button.button->SetImageModel(
state, ui::ImageModel::FromImageSkia(nav_button_provider_->GetImage(
button.type, ButtonStateToNavButtonProviderState(state))));
}
}
}

View file

@ -13,8 +13,8 @@
#include "dbus/object_proxy.h"
#include "shell/common/thread_restrictions.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/x11_atom_cache.h"
#include "ui/gfx/x/xproto.h"
namespace electron {
@ -28,7 +28,8 @@ void SetWMSpecState(x11::Window window, bool enabled, x11::Atom state) {
void SetWindowType(x11::Window window, const std::string& type) {
std::string type_prefix = "_NET_WM_WINDOW_TYPE_";
x11::Atom window_type = x11::GetAtom(type_prefix + base::ToUpperASCII(type));
std::string window_type_str = type_prefix + base::ToUpperASCII(type);
x11::Atom window_type = x11::GetAtom(window_type_str.c_str());
auto* connection = x11::Connection::Get();
connection->SetProperty(window, x11::GetAtom("_NET_WM_WINDOW_TYPE"),
x11::Atom::ATOM, window_type);

View file

@ -202,6 +202,7 @@ const device::mojom::UsbDeviceInfo* ElectronUsbDelegate::GetDeviceInfo(
bool ElectronUsbDelegate::HasDevicePermission(
content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
const url::Origin& origin,
const device::mojom::UsbDeviceInfo& device) {
if (IsDevicePermissionAutoGranted(origin, device))

View file

@ -57,6 +57,7 @@ class ElectronUsbDelegate : public content::UsbDelegate {
content::BrowserContext* browser_context,
const std::string& guid) override;
bool HasDevicePermission(content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
const url::Origin& origin,
const device::mojom::UsbDeviceInfo& device) override;
void GetDevices(

View file

@ -57,112 +57,34 @@
"id": "Tab",
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": -1,
"optional": true,
"description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a tab may not be assigned an ID; for example, when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to <code>chrome.tabs.TAB_ID_NONE</code> for apps and devtools windows."
},
"index": {
"type": "integer",
"minimum": -1,
"description": "The zero-based index of the tab within its window."
},
"groupId": {
"type": "integer",
"minimum": -1,
"description": "The ID of the group that the tab belongs to."
},
"windowId": {
"type": "integer",
"minimum": 0,
"description": "The ID of the window that contains the tab."
},
"openerTabId": {
"type": "integer",
"minimum": 0,
"optional": true,
"description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."
},
"selected": {
"type": "boolean",
"description": "Whether the tab is selected.",
"deprecated": "Please use $(ref:tabs.Tab.highlighted)."
},
"highlighted": {
"type": "boolean",
"description": "Whether the tab is highlighted."
},
"active": {
"type": "boolean",
"description": "Whether the tab is active in its window. Does not necessarily mean the window is focused."
},
"pinned": {
"type": "boolean",
"description": "Whether the tab is pinned."
},
"audible": {
"type": "boolean",
"optional": true,
"description": "Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the 'speaker audio' indicator is showing."
},
"discarded": {
"type": "boolean",
"description": "Whether the tab is discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content is reloaded the next time it is activated."
},
"autoDiscardable": {
"type": "boolean",
"description": "Whether the tab can be discarded automatically by the browser when resources are low."
},
"mutedInfo": {
"$ref": "MutedInfo",
"optional": true,
"description": "The tab's muted state and the reason for the last state change."
},
"url": {
"type": "string",
"optional": true,
"description": "The last committed URL of the main frame of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission and may be an empty string if the tab has not yet committed. See also $(ref:Tab.pendingUrl)."
},
"pendingUrl": {
"type": "string",
"optional": true,
"description": "The URL the tab is navigating to, before it has committed. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission and there is a pending navigation."
},
"title": {
"type": "string",
"optional": true,
"description": "The title of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."
},
"favIconUrl": {
"type": "string",
"optional": true,
"description": "The URL of the tab's favicon. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission. It may also be an empty string if the tab is loading."
},
"id": {"type": "integer", "minimum": -1, "optional": true, "description": "The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a tab may not be assigned an ID; for example, when querying foreign tabs using the $(ref:sessions) API, in which case a session ID may be present. Tab ID can also be set to <code>chrome.tabs.TAB_ID_NONE</code> for apps and devtools windows."},
// TODO(kalman): Investigate how this is ending up as -1 (based on window type? a bug?) and whether it should be optional instead.
"index": {"type": "integer", "minimum": -1, "description": "The zero-based index of the tab within its window."},
"groupId": {"type": "integer", "minimum": -1, "description": "The ID of the group that the tab belongs to."},
"windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window that contains the tab."},
"openerTabId": {"type": "integer", "minimum": 0, "optional": true, "description": "The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists."},
"selected": {"type": "boolean", "description": "Whether the tab is selected.", "deprecated": "Please use $(ref:tabs.Tab.highlighted)."},
"lastAccessed": {"type": "number", "optional": true, "description": "The last time the tab was accessed as the number of milliseconds since epoch."},
"highlighted": {"type": "boolean", "description": "Whether the tab is highlighted."},
"active": {"type": "boolean", "description": "Whether the tab is active in its window. Does not necessarily mean the window is focused."},
"pinned": {"type": "boolean", "description": "Whether the tab is pinned."},
"audible": {"type": "boolean", "optional": true, "description": "Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the 'speaker audio' indicator is showing."},
"discarded": {"type": "boolean", "description": "Whether the tab is discarded. A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content is reloaded the next time it is activated."},
"autoDiscardable": {"type": "boolean", "description": "Whether the tab can be discarded automatically by the browser when resources are low."},
"mutedInfo": {"$ref": "MutedInfo", "optional": true, "description": "The tab's muted state and the reason for the last state change."},
"url": {"type": "string", "optional": true, "description": "The last committed URL of the main frame of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission and may be an empty string if the tab has not yet committed. See also $(ref:Tab.pendingUrl)."},
"pendingUrl": {"type": "string", "optional": true, "description": "The URL the tab is navigating to, before it has committed. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission and there is a pending navigation."},
"title": {"type": "string", "optional": true, "description": "The title of the tab. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission."},
"favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This property is only present if the extension's manifest includes the <code>\"tabs\"</code> permission. It may also be an empty string if the tab is loading."},
"status": {
"type": "string",
"$ref": "TabStatus",
"optional": true,
"description": "Either <em>loading</em> or <em>complete</em>."
"description": "The tab's loading status."
},
"incognito": {
"type": "boolean",
"description": "Whether the tab is in an incognito window."
},
"width": {
"type": "integer",
"optional": true,
"description": "The width of the tab in pixels."
},
"height": {
"type": "integer",
"optional": true,
"description": "The height of the tab in pixels."
},
"sessionId": {
"type": "string",
"optional": true,
"description": "The session ID used to uniquely identify a tab obtained from the $(ref:sessions) API."
}
"incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."},
"width": {"type": "integer", "optional": true, "description": "The width of the tab in pixels."},
"height": {"type": "integer", "optional": true, "description": "The height of the tab in pixels."},
"sessionId": {"type": "string", "optional": true, "description": "The session ID used to uniquely identify a tab obtained from the $(ref:sessions) API."}
}
},
{
@ -1086,4 +1008,4 @@
}
]
}
]
]

View file

@ -391,8 +391,8 @@ v8::MaybeLocal<v8::Value> PassValueToOtherContext(
blink::WebElement::FromV8Value(destination_context->GetIsolate(), value);
if (!elem.IsNull()) {
v8::Context::Scope destination_context_scope(destination_context);
return v8::MaybeLocal<v8::Value>(elem.ToV8Value(
destination_context->Global(), destination_context->GetIsolate()));
return v8::MaybeLocal<v8::Value>(
elem.ToV8Value(destination_context->GetIsolate()));
}
// Custom logic to "clone" Blob references