chore: bump chromium to 138.0.7154.0 (37-x-y) (#46894)

* chore: bump chromium in DEPS to 138.0.7152.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: bump chromium in DEPS to 138.0.7154.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* ozone/wayland: Fix bookmark dropdown right click context menu

6488801

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Use base::cstring_view in base::Environment

6494292

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Remove Add/Remove AXMode methods

6418444

xref: 6383275

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* build: update filenames.libcxx.gni

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Use base::cstring_view in base::Environment

6494292

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Use getters to expose NativePixmapHandle from GpuMemoryBufferHandle

6374406

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
trop[bot] 2025-05-02 10:08:04 -04:00 committed by GitHub
parent 46e3ab6353
commit 03d83c293f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 174 additions and 179 deletions

2
DEPS
View file

@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'137.0.7151.0',
'138.0.7154.0',
'node_version':
'v22.14.0',
'nan_version':

View file

@ -1421,7 +1421,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__type_traits/is_member_pointer.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_assignable.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_constructible.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_convertible.h",
"//third_party/libc++/src/include/__type_traits/is_nothrow_destructible.h",
"//third_party/libc++/src/include/__type_traits/is_null_pointer.h",
"//third_party/libc++/src/include/__type_traits/is_object.h",

View file

@ -144,6 +144,5 @@ feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch
fix_win32_synchronous_spellcheck.patch
fix_enable_wrap_iter_in_string_view_and_array.patch
fix_linter_error.patch
revert_enable_crel_for_arm32_targets.patch
chore_grandfather_in_electron_views_and_delegates.patch
refactor_patch_electron_permissiontypes_into_blink.patch

View file

@ -10,7 +10,7 @@ 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 f78e6732f4a154b6a479bcfcdb237f0679a7fde3..c95b699fe2d37421ae589a14d51c5ffd4465860f 100644
index cadb96febde3fb3fe90929873b1db452a6d8fb8f..09f5504127b5a5ec3d0d69d9eb6d0cd93e0e75cd 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -254,6 +254,10 @@ int GpuMain(MainFunctionParams parameters) {
@ -24,7 +24,7 @@ index f78e6732f4a154b6a479bcfcdb237f0679a7fde3..c95b699fe2d37421ae589a14d51c5ffd
// 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
@@ -364,7 +368,6 @@ int GpuMain(MainFunctionParams parameters) {
@@ -363,7 +367,6 @@ int GpuMain(MainFunctionParams parameters) {
#endif
const bool dead_on_arrival = !init_success;

View file

@ -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 e3f9f9406f51d4d4cb48fd35d33ee3d694933038..6bcbbd6f746e00344e78447ebdaf59edc80a2b79 100644
index c0ee479cea4f34fcfac502a20130fbb4c8becc15..3be4b5225fe791901ba27b9fbb7a21ea1ae5d4ff 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4810,6 +4810,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4811,6 +4811,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}

View file

@ -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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4590c16b0 100644
index 105e84d00ff73357e1fa002ffa605e8ccb67fd71..e576ade293afd158cf5511d53d0bf5df13aa0649 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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_updates_and_events.h"
#include "ui/accessibility/platform/ax_platform_node.h"
@@ -167,7 +168,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
@@ -168,7 +169,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
rvh->GetRoutingID(), accessibility_mode);
}
@ -30,7 +30,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
base::Value::Dict target_data;
target_data.Set(kSessionIdField, browser->session_id().id());
@@ -190,7 +191,7 @@ void HandleAccessibilityRequestCallback(
@@ -192,7 +193,7 @@ void HandleAccessibilityRequestCallback(
auto& browser_accessibility_state =
*content::BrowserAccessibilityState::GetInstance();
base::Value::Dict data;
@ -39,8 +39,8 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode();
bool native = mode.has_mode(ui::AXMode::kNativeAPIs);
bool web = mode.has_mode(ui::AXMode::kWebContents);
@@ -214,7 +215,7 @@ void HandleAccessibilityRequestCallback(
data.Set(kPDFPrinting, pdf_printing);
@@ -240,7 +241,7 @@ void HandleAccessibilityRequestCallback(
initial_process_mode.has_mode(ui::AXMode::kHTML)));
std::string pref_api_type =
- pref->GetString(prefs::kShownAccessibilityApiType);
@ -48,7 +48,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
bool pref_api_type_supported = false;
std::vector<ui::AXApiType::Type> supported_api_types =
@@ -282,11 +283,11 @@ void HandleAccessibilityRequestCallback(
@@ -307,11 +308,11 @@ void HandleAccessibilityRequestCallback(
data.Set(kPagesField, std::move(page_list));
base::Value::List browser_list;
@ -62,7 +62,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
data.Set(kBrowsersField, std::move(browser_list));
std::string json_string;
@@ -762,7 +763,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
@@ -783,7 +784,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
const std::string value = CheckJSValue(data.FindString(kValueField));
if (string_name == kApiTypeField) {
@ -72,7 +72,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
pref->SetString(prefs::kShownAccessibilityApiType, value);
}
}
@@ -816,7 +818,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
@@ -837,7 +839,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@ -82,7 +82,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
ui::AXApiType::Type api_type =
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
std::string accessibility_contents =
@@ -843,6 +846,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -864,6 +867,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@ -90,7 +90,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
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(
@@ -876,6 +880,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
return;
}
}
@ -98,7 +98,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
#endif // !BUILDFLAG(IS_ANDROID)
// No browser with the specified |session_id| was found.
base::Value::Dict result;
@@ -898,11 +903,13 @@ void AccessibilityUIMessageHandler::StopRecording(
@@ -919,11 +924,13 @@ void AccessibilityUIMessageHandler::StopRecording(
}
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
@ -115,7 +115,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
// 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(
@@ -993,8 +1000,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
// static
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {

View file

@ -33,10 +33,10 @@ index 4b3f01018a9dea91b46b5917e099f272582991b2..8250f2e447ff19829cfae3f00b3df70b
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index ad39862fdd9a5a4f827f36e6a9778223a638d831..518ab769287525b1977387df56d1f50d1f0778f2 100644
index 4e84a91033465438d8510ba532ba795a2eb6bcf6..b9f60071a41de560a36214a6490d206382d9d6cb 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4627,7 +4627,7 @@ static_library("browser") {
@@ -4631,7 +4631,7 @@ static_library("browser") {
[ "//chrome/browser/ui/webui/signin:profile_impl" ]
}
@ -46,10 +46,10 @@ index ad39862fdd9a5a4f827f36e6a9778223a638d831..518ab769287525b1977387df56d1f50d
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 1b52a0d1a249c5d8beb205358c2003202c9253a0..4fbf2f66adfccb3580176be8d25598cf9ffcb616 100644
index 05073b10cb0c86b63f50071ef7e04225ef0627ec..de6c65e2ada9696c9a6c183f02493ea446e8bd3d 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7187,9 +7187,12 @@ test("unit_tests") {
@@ -7184,9 +7184,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@ -63,7 +63,7 @@ index 1b52a0d1a249c5d8beb205358c2003202c9253a0..4fbf2f66adfccb3580176be8d25598cf
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8155,6 +8158,10 @@ test("unit_tests") {
@@ -8153,6 +8156,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@ -74,7 +74,7 @@ index 1b52a0d1a249c5d8beb205358c2003202c9253a0..4fbf2f66adfccb3580176be8d25598cf
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8210,7 +8217,6 @@ test("unit_tests") {
@@ -8208,7 +8215,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target.
deps += [
"../browser/screen_ai:screen_ai_install_state",

View file

@ -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 ebf407904b9b9bc7f60a9c13a5c39ce64640189d..7b45a0006af60400f5d8ba5b925f971cb5cf393e 100644
index ad821a07ad808b392633f0e8e774b6082cc3b184..df50b84cca214a9b6a85afe2fd677a45e2529cdc 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9778,6 +9778,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -9775,6 +9775,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@ -21,10 +21,10 @@ index ebf407904b9b9bc7f60a9c13a5c39ce64640189d..7b45a0006af60400f5d8ba5b925f971c
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index fe352434dd26ebbde72145df335520ff9d026e80..4f87894219452e736311ad25a62b71b8aec4d158 100644
index 2039ac799297183b16fb4795b63c6c5b76dac478..fec569763d3ba8b171ca65a9ea523ada5f729f41 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5126,6 +5126,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5131,6 +5131,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
opener);
@ -37,7 +37,7 @@ index fe352434dd26ebbde72145df335520ff9d026e80..4f87894219452e736311ad25a62b71b8
// 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
@@ -5167,12 +5173,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5172,12 +5178,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
@ -66,10 +66,10 @@ 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 9c36ad70531bd8c31158c741ab23763ea00bc068..6909f75fb4cbd0e7b4f3067cda52a5f67dc100de 100644
index b3975f65bfbcff7bc9eb0815a0ac5e97d1ff3548..2b219ccfdbef82f9e4075243da48c4b1e53158c2 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -821,6 +821,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -823,6 +823,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@ -79,7 +79,7 @@ index 9c36ad70531bd8c31158c741ab23763ea00bc068..6909f75fb4cbd0e7b4f3067cda52a5f6
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 f1fee091b84aec20f1e15dcc90917e50bb47d1c6..3a7a6dc0a4e75c151379f8488d371439a808f1a9 100644
index 77b3e5c0fe47e5ed0139d3e54394f7d96fc69d21..cabdb73fa092683cdd2dad38f7b62b6bac974d0d 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -199,6 +199,7 @@ class NetworkService;
@ -90,7 +90,7 @@ index f1fee091b84aec20f1e15dcc90917e50bb47d1c6..3a7a6dc0a4e75c151379f8488d371439
} // namespace network
namespace sandbox {
@@ -1377,6 +1378,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1378,6 +1379,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 5af26eef19c2f7ce082af02cff6d8f919c4d245d..e3f9f9406f51d4d4cb48fd35d33ee3d694933038 100644
index 6dd63dbd96ce5c941790f97929b2826a03cabbcc..c0ee479cea4f34fcfac502a20130fbb4c8becc15 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6936,6 +6936,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
@@ -6942,6 +6942,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
GetWebFrame()->IsAdScriptInStack());

View file

@ -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 4c30f71ced0da645637c989c08ccc93e463e755f..56b2fb93d5d85f520081de9e42e26ef3f8f6090e 100644
index 05859e343a6c1fa58f3fb847ad6e97982804f910..5fef3e077072ee9dc3ff22110b7818503c8b4e4b 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5045,7 +5045,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5050,7 +5050,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.

View file

@ -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 435235c067f70f7f3d219dfc0bf91c9be40d1389..cc6c860ec51075fc047a77c26c5b42296bb6ab19 100644
index de3f9f56b47628e1104b5f64b3c17cc35e10bfc7..3a19c28386fd3a0b8755a06510895c685f2c0cdb 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2323,12 +2323,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -2327,12 +2327,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@ -99,10 +99,10 @@ index 435235c067f70f7f3d219dfc0bf91c9be40d1389..cc6c860ec51075fc047a77c26c5b4229
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index c4cea0b6e8c4c95ebcddf5497d731d1d63934f22..7686b75c5504d093dcd9dd8a7ffd28e0c2fd036c 100644
index 0bcb2fc072e47c2c259b724209b4814486329fe1..db674988cf87f198ed1af7e0f4def24776fbaa89 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -1026,8 +1026,7 @@ class Browser : public TabStripModelObserver,
@@ -1027,8 +1027,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 7a8d7ce6f628123f5288d693046ca7602eeccac1..f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c 100644
index e236eb74db68a6c11892e1ea16cab05b8c47afbf..b2d5733ff8c47f497af03171d9dfac68b2013e4d 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5008,8 +5008,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -5013,8 +5013,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,
@ -274,7 +274,7 @@ index 8d6fc67cb9b1d653bce64d1ba22aa7ec2d79257c..d5ce746373a1a4310e1eb530aee011a7
return true;
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.h b/extensions/browser/guest_view/app_view/app_view_guest.h
index 136448c9df06b9704e95d2797a60907d7ec5170a..21cc7b08dd8f9e4a32d29dd35c42ec2ce9f6cd53 100644
index 775cfbf5adac0017f343bc091daee1b8883c75bb..dc97e5d60d3663ef7f7c78c28603f9e1c5aea4ff 100644
--- a/extensions/browser/guest_view/app_view/app_view_guest.h
+++ b/extensions/browser/guest_view/app_view/app_view_guest.h
@@ -10,6 +10,7 @@

View file

@ -7,7 +7,7 @@ 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 a23d9b8fc451078708fd1a39f3d74357de7c244f..f619f8a360b43b43174647cd596ab9c75c8ea1f1 100644
index d55c408557e15650897c9ed6d5b6bd83178a551f..f1c54919990af204004380b0d84ee750de5e3c35 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -275,8 +275,13 @@ void AsanProcessInfoCB(const char*, bool*) {
@ -40,7 +40,7 @@ index a23d9b8fc451078708fd1a39f3d74357de7c244f..f619f8a360b43b43174647cd596ab9c7
#endif // V8_USE_EXTERNAL_STARTUP_DATA
}
@@ -982,7 +988,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
@@ -1005,7 +1011,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
return TerminateForFatalInitializationError();
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)

View file

@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
node initialization to not update flags after V8 initialization.
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index eb11068e932b7b94cbf215d6f84ae427ce77fcd5..9744e45974af215bfbe9e5feb2db7274f8efebf0 100644
index 7a20f5199bd6cb5d13f31ec5db3e3cc03821bc3a..22167f808cb7b27d5b2a8e517cdeee63205ab9ad 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -208,6 +208,9 @@ RenderProcessImpl::RenderProcessImpl()
@@ -212,6 +212,9 @@ RenderProcessImpl::RenderProcessImpl()
v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag));
}

View file

@ -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 ed7d7512c7112eedcbbddf30ed4a0a0cff4b7e34..fbdf54a1003f30e5113309fa74e851a4eebea85d 100644
index 9cc3ae76503699417e8b7a2bd18d0b899e20d790..cba63c2eacdb1c02391941854f94dd5e2ddc2776 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -1476,6 +1476,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1470,6 +1470,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@ -35,7 +35,7 @@ index ed7d7512c7112eedcbbddf30ed4a0a0cff4b7e34..fbdf54a1003f30e5113309fa74e851a4
// 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 &&
@@ -1525,6 +1526,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1519,6 +1520,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

View file

@ -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 9e01e61bf1fce448a93eaa3d5f363fc835b78538..d210af6fb317c922a8415a67a7ccd1d8a4a88ea1 100644
index e2c72b43f75b57ef1f49b82d3ecdfb425f8596de..51f8ff9b8424d098979a24c2e8628cdf7c4b758d 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() {

View file

@ -522,7 +522,7 @@ index f0aca972c4a81c3dfb536e14244daafae21ee716..a15afbc1a3519e657121b4952444d2f4
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 ed921225298fbb4f6d12d7c49be825ee586d009c..78a393d96ddf4dc3bf8d1af297ed2642eacac495 100644
index 391004b202e6f20ad06eb6a53a6d55f5e8981c75..acb849f4e737de45e7aa4640b6866791424f010b 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
@@ -130,7 +130,8 @@ RootCompositorFrameSinkImpl::Create(

View file

@ -80,7 +80,7 @@ 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 d210af6fb317c922a8415a67a7ccd1d8a4a88ea1..0de01879f618555030e87ea79a94d41232811c2c 100644
index 51f8ff9b8424d098979a24c2e8628cdf7c4b758d..19d8ed89211402e93632c4d83dbf452d4194a14c 100644
--- a/content/browser/service_host/utility_process_host.cc
+++ b/content/browser/service_host/utility_process_host.cc
@@ -541,7 +541,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {

View file

@ -112,10 +112,10 @@ index 99bf736ebe303d46ab1ced924ba929a0cd258909..e10c8782d2704ff9cff8062d201a4339
string mime_type;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 937a7b2ba05c11514d2d980a6fb2eaa9102c2774..6ffe746744beccbf224ad1a36ad102da5164580f 100644
index 35d3acb1a088a7b4cba7b062a62e8033c31dfe52..9770306449b39f26c047ed0c15cba9feae55c5d3 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -387,6 +387,9 @@ URLLoader::URLLoader(
@@ -386,6 +386,9 @@ URLLoader::URLLoader(
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
base::SequencedTaskRunner::GetCurrentDefault()),
per_factory_orb_state_(context.GetMutableOrbState()),
@ -125,7 +125,7 @@ index 937a7b2ba05c11514d2d980a6fb2eaa9102c2774..6ffe746744beccbf224ad1a36ad102da
devtools_request_id_(request.devtools_request_id),
options_(PopulateOptions(options,
factory_params_->is_orb_enabled,
@@ -544,7 +547,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
@@ -521,7 +524,7 @@ void URLLoader::SetUpUrlRequestCallbacks(
&URLLoader::IsSharedDictionaryReadAllowed, base::Unretained(this)));
}
@ -134,7 +134,7 @@ index 937a7b2ba05c11514d2d980a6fb2eaa9102c2774..6ffe746744beccbf224ad1a36ad102da
url_request_->SetResponseHeadersCallback(base::BindRepeating(
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
}
@@ -1225,6 +1228,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
@@ -1126,6 +1129,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
}
response_ = BuildResponseHead();
@ -155,10 +155,10 @@ index 937a7b2ba05c11514d2d980a6fb2eaa9102c2774..6ffe746744beccbf224ad1a36ad102da
ad_auction_event_record_request_helper_.HandleResponse(
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index 6832aca0d487d5cbf2fc445f1f07a17565cf9d45..78618a2c3d79455ff685d58d11b61d3d8468b7e1 100644
index f4d16508d4a34f9991b1b2f4e519e6cb2a7f5a73..099e146bc04bb4eb768c79099c5646ad7a029382 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -625,6 +625,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -599,6 +599,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
resource_scheduler_request_handle_;

View file

@ -32,7 +32,7 @@ index 0aae1d3b2777d5f6db711d1ade99b4bde24e76bf..e350f6789c710826e0885ccdc19e66e2
break;
}
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
index f53158596f935545afde6a175138347a752f73e7..b267734bf2273253aa921728e12c753adfade02e 100644
index bc4dd4c643f2aa4cba07c0560e14f65f3c6aa291..b1c9f2d59559ed33cd32ad1f22b221029018cf0f 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) {

View file

@ -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 4c78563c29ce92c8217d288ed03f73fb482c6b49..aee0097df986cb4b3b75112fab828c59803e28d1 100644
index 8a0e2b9520654002578a673bb22c9def4caa0d26..b2a28eb0276211d2949fb1b8b74cf098ae5aba41 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -11159,6 +11159,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
@@ -11151,6 +11151,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
"blob");
}

View file

@ -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 c6e88cee8640c56aad01721ab667b4255bd64a60..2742df0532c890fe97adf4a0c430c7718e5e73b5 100644
index 1c03162fbcda8ab75dcd53722f92e10403fbae08..a21c58d3f13fadf3a7888f4fe16c0e6cf6c215b0 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,

View file

@ -87,10 +87,10 @@ index 75df43e3cd2721a92c90c18154d53d5c203e2465..ce42c75c8face36d21f53f44c0201ac4
// The view with active text input state, i.e., a focused <input> 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 3b9e634245986b1ef22e8bf4e116470343f5ff60..4c30f71ced0da645637c989c08ccc93e463e755f 100644
index d0f80de98c2bd3cf686b05ef972c89a8c2276935..05859e343a6c1fa58f3fb847ad6e97982804f910 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -9992,7 +9992,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
@@ -9997,7 +9997,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame);
RenderWidgetHostViewBase* root_view =

View file

@ -20,10 +20,10 @@ 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 7934e6a8a2498acbe822df05e6087b885384c6d7..3026ebee29af3ead9f505292317160409a190b29 100644
index 8db7be4dbc924c719783ceb667e4f5708ea0133e..d8622012721795c76831bf33c62ce393e81badbb 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 {
@@ -461,6 +461,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
mojom::EvaluationTiming,
mojom::LoadEventBlockingOption,
WebScriptExecutionCallback,
@ -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 f5adaadb9058e5fcad69d131f54ea06cb298b514..3315b02953685503d49a7e871fedf04262e80b71 100644
index dcab8b2d4adcf14b285b558d85f69c303dc0818a..c998cba53d57dda9c32e7f75a9de3dcf0b974f58 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
@@ -1109,14 +1109,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
@@ -1111,14 +1111,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@ -237,10 +237,10 @@ index f5adaadb9058e5fcad69d131f54ea06cb298b514..3315b02953685503d49a7e871fedf042
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 1b5e7a1a2bb5eb0b986dd6c61b4915d29a9a5667..19c8fdb320cbc84ba00b5e0b4b33a385b61b0db1 100644
index 1d50260fb58eb439d68506de7de04b78c616b6ee..3699e331d5cb15ca12b6fa2d2ba058f7ca74df40 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
@@ -198,6 +198,7 @@ class CORE_EXPORT WebLocalFrameImpl final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,

View file

@ -6,14 +6,16 @@ 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 a777b6b4c61c24cd2885134cccd5ada7d035cd5e..1a41b716ce5366497e60a691c23c7e62627b5748 100644
index d3e06148b22f06e6676bcda5fd8907595389887e..35f22b679494940ae1b1d64fa4eb17c41c0cc623 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,
@@ -711,6 +711,16 @@ void MenuController::Run(Widget* parent,
SetSelection(root, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
}
+ if (source_type == ui::mojom::MenuSourceType::kKeyboard && context_menu && root->HasSubmenu()) {
+ if (source_type == ui::mojom::MenuSourceType::kKeyboard &&
+ (menu_type == MenuType::kContextMenu || menu_type == MenuType::kMenuItemContextMenu) &&
+ root->HasSubmenu()) {
+ // For context menus opened via the keyboard we select the first item by default
+ // to match accessibility expectations
+ MenuItemView* first_item = FindInitialSelectableMenuItem(root, INCREMENT_SELECTION_DOWN);
@ -24,7 +26,7 @@ index a777b6b4c61c24cd2885134cccd5ada7d035cd5e..1a41b716ce5366497e60a691c23c7e62
if (button_controller) {
pressed_lock_ = button_controller->TakeLock(
false, ui::LocatedEvent::FromIfValid(event));
@@ -2407,19 +2415,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2426,19 +2436,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
}
item->GetSubmenu()->ShowAt(params);

View file

@ -20,7 +20,7 @@ index d26c850e28b7df6992bf07fda2abe260ed4da769..008c131e5b4f84daeaee5ffe6ab7ae88
}
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 3a7a6dc0a4e75c151379f8488d371439a808f1a9..0869aef8fce2829f7827d36c73af65ad71f7fdd3 100644
index cabdb73fa092683cdd2dad38f7b62b6bac974d0d..6bd13985764981ccbc547faccdec78bce18600a0 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -340,6 +340,11 @@ class CONTENT_EXPORT ContentBrowserClient {

View file

@ -9,7 +9,7 @@ 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 24f6f89cfa430ed26476e1a3f79a8ed9464c45f3..a23d9b8fc451078708fd1a39f3d74357de7c244f 100644
index 48363b920c780064a6d49f4a521b476bda5ac27b..d55c408557e15650897c9ed6d5b6bd83178a551f 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -296,11 +296,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {

View file

@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority.
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 59721ed3c9e26fd83c553d82030f3e76af0c3dfd..e8a9715e9004e5d10aa96298332237c78796bf5b 100644
index a6cbbaa18ab6631aff7d76873077d2e15cbedeb6..db6fac3683f2737d05c5bc2dabfcc4b669a8a6d1 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1045,6 +1045,7 @@ component("base") {
@ -548,18 +548,18 @@ index dbf334caa3a6d10017b69ad76802e389a011436b..da828823e8195cc9e497866363c9af93
void ForwardKeyboardEvent(const input::NativeWebKeyboardEvent& key_event,
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index eca43bf620111c27c400ae2d95880e47c34fbc59..12ee7e75e437426f28002c7c9f4d5f5b5016ec53 100644
index 371b7b3ba73ee7b88027fcc31cb0a346cae40eea..c4b0654a56f4f2b4ab57ef05a119e38862b5fd2d 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -35,6 +35,7 @@
#include "content/public/browser/browser_accessibility_state.h"
@@ -36,6 +36,7 @@
#import "content/public/browser/render_widget_host_view_mac_delegate.h"
#include "content/public/browser/scoped_accessibility_mode.h"
#include "content/public/common/content_features.h"
+#include "electron/mas.h"
#include "skia/ext/skia_utils_mac.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/input/input_handler.mojom.h"
@@ -2136,15 +2137,21 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -2138,15 +2139,21 @@ - (NSAccessibilityRole)accessibilityRole {
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@ -582,7 +582,7 @@ index eca43bf620111c27c400ae2d95880e47c34fbc59..12ee7e75e437426f28002c7c9f4d5f5b
return kAttributes;
}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 3256304fe1bfb80af0312f9046b1a78a2469956e..29281a0d8a4383ed4b2d5d8bac934acd54040aa8 100644
index bdc48f4549ce6f82c5558b3c9e70c5c5a92c4faa..d10a5afe9da445b6fb940a46252efa8e0c36bcb4 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -342,6 +342,7 @@ source_set("browser") {
@ -797,7 +797,7 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
} // namespace content
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 126c0d51647ef46a12b2c47930f7bd49e55dd736..d61474fb3478a27450a037f50d2a734097eb4ca9 100644
index 4c59b6c62ad3fed9717b0330c7b46b8dc83a51a1..1c88c8f449387258259bcd65c13709d70f03117b 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -662,6 +662,7 @@ static_library("test_support") {
@ -824,7 +824,7 @@ index 126c0d51647ef46a12b2c47930f7bd49e55dd736..d61474fb3478a27450a037f50d2a7340
]
if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
@@ -3283,6 +3286,7 @@ test("content_unittests") {
@@ -3284,6 +3287,7 @@ test("content_unittests") {
"//ui/shell_dialogs:shell_dialogs",
"//ui/webui:test_support",
"//url",
@ -1848,7 +1848,7 @@ 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 e531cb42cde9863ff1c4a13150f35877b564226c..0c0ec308be02297b090d08b52cc713c22652da36 100644
index c8f01a88e0d1797baf53c517341c735d9c6e6b4a..345743dd19f862cf2b4304d70cb47ce68e6895d1 100644
--- a/ui/gfx/BUILD.gn
+++ b/ui/gfx/BUILD.gn
@@ -337,6 +337,12 @@ component("gfx") {

View file

@ -10,7 +10,7 @@ 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 5870b90b02ba5cf4b197e91ae9c9dc8fa3ebf7e4..bab3c9fdb1a90dd42394ab77732976e0b444a4e5 100644
index 78b55aa09b6db29119a0f47e11ea157e8b0c6d3b..deb02736cf52536d1c65255146ee077650d18095 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -807,8 +807,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(

View file

@ -881,10 +881,10 @@ index 97cb6458bc9eec767db89b56abfc5f4b4136ff7b..d9a0b343158b8464b5c9aa8e0e655c0b
ScriptingThrottler scripting_throttler_;
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 29281a0d8a4383ed4b2d5d8bac934acd54040aa8..0b943e7a4324b8ce9524d76f1cf4c6a2f187c595 100644
index d10a5afe9da445b6fb940a46252efa8e0c36bcb4..6cfd8d6e9a38da8adfa05075097cc491962bd8f7 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -3159,8 +3159,9 @@ source_set("browser") {
@@ -3157,8 +3157,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]

View file

@ -44,10 +44,10 @@ index 8637d83c1d3a912bbc48effcc095b426640351ad..3419628c08b62a16c62778cc124c365a
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 4f87894219452e736311ad25a62b71b8aec4d158..7a8d7ce6f628123f5288d693046ca7602eeccac1 100644
index fec569763d3ba8b171ca65a9ea523ada5f729f41..e236eb74db68a6c11892e1ea16cab05b8c47afbf 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5878,6 +5878,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -5883,6 +5883,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get();
}
@ -60,7 +60,7 @@ index 4f87894219452e736311ad25a62b71b8aec4d158..7a8d7ce6f628123f5288d693046ca760
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 ff2a3cc31a9c8e24222d3614c58d0884c1fde260..641840c371a76a729d62d59703a5d5566ef76b3c 100644
index c0a0400ae804dca3679bf8e98dc06effcc96dfe0..2e305bca22ed140a8fe28077f611b845c5478a88 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -1186,6 +1186,7 @@ class CONTENT_EXPORT WebContentsImpl
@ -72,7 +72,7 @@ index ff2a3cc31a9c8e24222d3614c58d0884c1fde260..641840c371a76a729d62d59703a5d556
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 4f97e13f9125e653f44acad78f8f35ee38e90b6d..f3c712e3f970dcccaac37e4dd407f14b52871269 100644
index 7e0dd469a7059ea38120cfd6cd17469a3c06c1fa..4fd3ab75b462cf169443473b968db64c765930b8 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -37,6 +37,7 @@

View file

@ -28,7 +28,7 @@ index e350f6789c710826e0885ccdc19e66e2213820df..b8ba008470f39f6f3559d29b9eff0a23
break;
}
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
index b267734bf2273253aa921728e12c753adfade02e..fd72e7d62ac45f51b2e7e295930ed25bb376056b 100644
index b1c9f2d59559ed33cd32ad1f22b221029018cf0f..81deda95c71f025b723571ca9a6ac20bc7bb4b0c 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) {

View file

@ -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 56b2fb93d5d85f520081de9e42e26ef3f8f6090e..b32e75e7c1922e63fdca891dfd7d4bcb27c5096e 100644
index 5fef3e077072ee9dc3ff22110b7818503c8b4e4b..2d3fc900a04e6ddc291548a37aaf2322ccbc4846 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -10129,25 +10129,13 @@ void WebContentsImpl::RendererUnresponsive(
@@ -10134,25 +10134,13 @@ void WebContentsImpl::RendererUnresponsive(
base::RepeatingClosure hang_monitor_restarter) {
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
"render_widget_host", render_widget_host);

View file

@ -8,10 +8,10 @@ respond to the first mouse click in their window, which is desirable for some
kinds of utility windows. Similarly for `disableAutoHideCursor`.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index a6b6917ee2c02c091aa51b55449d93fa55e06ac2..eca43bf620111c27c400ae2d95880e47c34fbc59 100644
index 91e5beaa68fc0b8231fce4bf195efa924744a532..371b7b3ba73ee7b88027fcc31cb0a346cae40eea 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -170,6 +170,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -171,6 +171,15 @@ void ExtractUnderlines(NSAttributedString* string,
} // namespace
@ -27,7 +27,7 @@ index a6b6917ee2c02c091aa51b55449d93fa55e06ac2..eca43bf620111c27c400ae2d95880e47
// RenderWidgetHostViewCocoa ---------------------------------------------------
// Private methods:
@@ -774,6 +783,9 @@ - (AcceptMouseEventsOption)acceptsMouseEventsOption {
@@ -776,6 +785,9 @@ - (AcceptMouseEventsOption)acceptsMouseEventsOption {
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@ -37,7 +37,7 @@ index a6b6917ee2c02c091aa51b55449d93fa55e06ac2..eca43bf620111c27c400ae2d95880e47
// Enable "click-through" if mouse clicks are accepted in inactive windows
return [self acceptsMouseEventsOption] > kAcceptMouseEventsInActiveWindow;
}
@@ -919,6 +931,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
@@ -921,6 +933,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
// its parent view.
BOOL hitSelf = NO;
while (view) {
@ -48,7 +48,7 @@ index a6b6917ee2c02c091aa51b55449d93fa55e06ac2..eca43bf620111c27c400ae2d95880e47
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -1253,6 +1269,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -1255,6 +1271,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSEventTypeKeyDown &&
!(modifierFlags & NSEventModifierFlagCommand);

View file

@ -233,10 +233,10 @@ index 7c99a9512e6f65713fe8483cef7b7c9b494b4491..8fb6cf252961c9773d1a6a09d47bec6a
}
diff --git a/content/common/features.cc b/content/common/features.cc
index 9a619bf9a4e2801d7a67bd26104066d03dcfb465..6aa5f4cb75bc8e22048b6b9bb8456a958ad7b80d 100644
index 9119155650ed4249c699cc57eaef9149b99e7297..13e2c0da07938d73b5a689cea19df4a445c4e5e5 100644
--- a/content/common/features.cc
+++ b/content/common/features.cc
@@ -300,6 +300,14 @@ BASE_FEATURE(kIOSurfaceCapturer,
@@ -294,6 +294,14 @@ BASE_FEATURE(kIOSurfaceCapturer,
base::FEATURE_ENABLED_BY_DEFAULT);
#endif
@ -252,10 +252,10 @@ index 9a619bf9a4e2801d7a67bd26104066d03dcfb465..6aa5f4cb75bc8e22048b6b9bb8456a95
// 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 7bc79ead73e5e51d7735d6964cf96990120670ca..83b5666e735aa99a8e2300b37154da1769baa2b0 100644
index 0764c2fd1086bb0da16df91c95b171eea0a06bb1..3bc7a54999ec5e1f3afa45fe59d43ba12ec10286 100644
--- a/content/common/features.h
+++ b/content/common/features.h
@@ -100,6 +100,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);
@@ -99,6 +99,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);
#if BUILDFLAG(IS_MAC)
CONTENT_EXPORT BASE_DECLARE_FEATURE(kIOSurfaceCapturer);
#endif

View file

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Maddock <smaddock@slack-corp.com>
Date: Fri, 28 Mar 2025 20:22:26 -0400
Subject: revert: Enable CREL for arm32 targets
Enabling CREL on Linux ARM64 seems to cause it to segfault. Disable for Electron
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 e579cc9a9d1fd01d390a64886f649dc53102166e..de1f3b7b1a33bf5ab4f6922f0cb2d305a8af7550 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -619,7 +619,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).
- if (is_linux && use_lld && !llvm_android_mainline &&
+ # TODO(crbug.com/376278218): This causes segfault on Linux ARM builds.
+ if (is_linux && use_lld && !llvm_android_mainline && current_cpu != "arm" &&
default_toolchain != "//build/toolchain/cros:target") {
cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
}

View file

@ -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 f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c..3ec3dd8f89bb167ed82c0da95a0f1d3d9738ac72 100644
index b2d5733ff8c47f497af03171d9dfac68b2013e4d..52b782a40724ab6d8cd9abf2193aeb1a14a5d8e9 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3947,6 +3947,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3952,6 +3952,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 f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c..3ec3dd8f89bb167ed82c0da95a0f1d3d
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3957,6 +3964,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3962,6 +3969,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@ -35,7 +35,7 @@ index f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c..3ec3dd8f89bb167ed82c0da95a0f1d3d
CHECK(view_.get());
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 437060750090e974a3257979c215d13d036afa4e..5dce8d4e37845e1bb1922d7c4da3208939549b27 100644
index 9360a2b080ebe4d6c0a475b0a536a5d7212c8a86..6e5eebfb199d322028f6b2bc72d666c24f334bba 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -121,10 +121,13 @@ class BrowserPluginGuestDelegate;
@ -52,7 +52,7 @@ index 437060750090e974a3257979c215d13d036afa4e..5dce8d4e37845e1bb1922d7c4da32089
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -270,6 +273,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
@@ -274,6 +277,10 @@ class WebContents : public PageNavigator, public base::SupportsUserData {
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;

View file

@ -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 7b45a0006af60400f5d8ba5b925f971cb5cf393e..5870b90b02ba5cf4b197e91ae9c9dc8fa3ebf7e4 100644
index df50b84cca214a9b6a85afe2fd677a45e2529cdc..78b55aa09b6db29119a0f47e11ea157e8b0c6d3b 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8884,6 +8884,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -8881,6 +8881,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}
@ -37,10 +37,10 @@ index 7b45a0006af60400f5d8ba5b925f971cb5cf393e..5870b90b02ba5cf4b197e91ae9c9dc8f
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 3ec3dd8f89bb167ed82c0da95a0f1d3d9738ac72..3b9e634245986b1ef22e8bf4e116470343f5ff60 100644
index 52b782a40724ab6d8cd9abf2193aeb1a14a5d8e9..d0f80de98c2bd3cf686b05ef972c89a8c2276935 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4222,21 +4222,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
@@ -4227,21 +4227,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
const input::NativeWebKeyboardEvent& event) {
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
"WebContentsImpl::PreHandleKeyboardEvent");
@ -78,7 +78,7 @@ index 3ec3dd8f89bb167ed82c0da95a0f1d3d9738ac72..3b9e634245986b1ef22e8bf4e1164703
}
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -4395,7 +4399,7 @@ void WebContentsImpl::EnterFullscreenMode(
@@ -4400,7 +4404,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame));
DCHECK(requesting_frame->IsActive());

View file

@ -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 0f3a5d69bef697a7787b68cd1c8261c67993edf3..1d49c1190ba7d47a76993b7f291119be243d189e 100644
index 20ffe01d89e65b3eb6dc97b75761166ae3c9acb9..0444f2d81e53a01a81861c158713336a8062434f 100644
--- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts
@@ -741,6 +741,8 @@ export class MainImpl {
@@ -736,6 +736,8 @@ export class MainImpl {
globalThis.Main = globalThis.Main || {};
// @ts-expect-error Exported for Tests.js
globalThis.Main.Main = MainImpl;

View file

@ -46,7 +46,7 @@ index 3e57ae8efe33f326ef0e5d609c311d4be5b8afd6..dc521d39c2280dfc3217e97c1e413b2b
V8_INLINE static void* GetAlignedPointerFromInternalField(
const BasicTracedReference<Object>& object, int index) {
diff --git a/src/api/api.cc b/src/api/api.cc
index 0ab95ba54d1829ea0fda9a5678a906850b4b509b..2a01241d7db654098720f00a9130996e79d63261 100644
index 62a71b9cb7594e5fcc86f32d7af160c32b8e8944..0b2d5bfa9480ea90eb0adb89132505b8cabafc08 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -6313,14 +6313,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {

View file

@ -18,6 +18,7 @@
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/strings/cstring_view.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
@ -81,8 +82,9 @@ namespace {
constexpr std::string_view kRelauncherProcess = "relauncher";
constexpr std::string_view kElectronDisableSandbox{"ELECTRON_DISABLE_SANDBOX"};
constexpr std::string_view kElectronEnableStackDumping{
constexpr base::cstring_view kElectronDisableSandbox{
"ELECTRON_DISABLE_SANDBOX"};
constexpr base::cstring_view kElectronEnableStackDumping{
"ELECTRON_ENABLE_STACK_DUMPING"};
// Returns true if this subprocess type needs the ResourceBundle initialized

View file

@ -17,6 +17,7 @@
#include "base/containers/fixed_flat_set.h"
#include "base/environment.h"
#include "base/feature_list.h"
#include "base/strings/cstring_view.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "content/public/common/content_switches.h"
@ -85,12 +86,13 @@ void ExitIfContainsDisallowedFlags(const std::vector<std::string>& argv) {
#if BUILDFLAG(IS_MAC)
// A list of node envs that may be used to inject scripts.
const char* kHijackableEnvs[] = {"NODE_OPTIONS", "NODE_REPL_EXTERNAL_MODULE"};
constexpr base::cstring_view kHijackableEnvs[] = {"NODE_OPTIONS",
"NODE_REPL_EXTERNAL_MODULE"};
// Return true if there is any env in kHijackableEnvs.
bool UnsetHijackableEnvs(base::Environment* env) {
bool has = false;
for (const char* name : kHijackableEnvs) {
for (base::cstring_view name : kHijackableEnvs) {
if (env->HasVar(name)) {
env->UnSetVar(name);
has = true;

View file

@ -1167,13 +1167,12 @@ 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->AddAccessibilityModeFlags(ui::kAXModeComplete);
} else {
ax_state->RemoveAccessibilityModeFlags(ui::kAXModeComplete);
if (!enabled) {
scoped_accessibility_mode_.reset();
} else if (!scoped_accessibility_mode_) {
scoped_accessibility_mode_ =
content::BrowserAccessibilityState::GetInstance()
->CreateScopedModeForProcess(ui::kAXModeComplete);
}
Browser::Get()->OnAccessibilitySupportChanged();
}

View file

@ -16,6 +16,7 @@
#include "content/public/browser/browser_child_process_observer.h"
#include "content/public/browser/gpu_data_manager_observer.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/scoped_accessibility_mode.h"
#include "crypto/crypto_buildflags.h"
#include "electron/mas.h"
#include "net/base/completion_once_callback.h"
@ -276,6 +277,8 @@ class App final : public ElectronBrowserClient::Delegate,
bool disable_hw_acceleration_ = false;
bool disable_domain_blocking_for_3DAPIs_ = false;
bool watch_singleton_socket_on_ready_ = false;
std::unique_ptr<content::ScopedAccessibilityMode> scoped_accessibility_mode_;
};
} // namespace api

View file

@ -4,10 +4,9 @@
#include "shell/browser/electron_browser_main_parts.h"
#include <string_view>
#include "base/command_line.h"
#include "base/environment.h"
#include "base/strings/cstring_view.h"
#include "ui/base/ozone_buildflags.h"
#include "ui/ozone/public/ozone_switches.h"
@ -22,7 +21,7 @@ namespace electron {
namespace {
constexpr std::string_view kElectronOzonePlatformHint{
constexpr base::cstring_view kElectronOzonePlatformHint{
"ELECTRON_OZONE_PLATFORM_HINT"};
#if BUILDFLAG(IS_OZONE_WAYLAND)

View file

@ -13,9 +13,11 @@
#include "content/public/browser/browser_accessibility_state.h"
#include "content/public/browser/native_event_processor_mac.h"
#include "content/public/browser/native_event_processor_observer_mac.h"
#include "content/public/browser/scoped_accessibility_mode.h"
#include "shell/browser/browser.h"
#include "shell/browser/mac/dict_util.h"
#import "shell/browser/mac/electron_application_delegate.h"
#include "ui/accessibility/ax_mode.h"
namespace {
@ -34,7 +36,10 @@ inline void dispatch_sync_main(dispatch_block_t block) {
}
@end
@implementation AtomApplication
@implementation AtomApplication {
std::unique_ptr<content::ScopedAccessibilityMode>
_scoped_accessibility_mode_general;
}
+ (AtomApplication*)sharedApplication {
return (AtomApplication*)[super sharedApplication];
@ -209,13 +214,12 @@ inline void dispatch_sync_main(dispatch_block_t block) {
- (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
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->AddAccessibilityModeFlags(ui::kAXModeComplete);
} else {
ax_state->RemoveAccessibilityModeFlags(ui::kAXModeComplete);
if (![value boolValue]) {
_scoped_accessibility_mode_general.reset();
} else if (!_scoped_accessibility_mode_general) {
_scoped_accessibility_mode_general =
content::BrowserAccessibilityState::GetInstance()
->CreateScopedModeForProcess(ui::kAXModeComplete);
}
electron::Browser::Get()->OnAccessibilitySupportChanged();
@ -230,15 +234,21 @@ inline void dispatch_sync_main(dispatch_block_t block) {
return [super accessibilitySetValue:value forAttribute:attribute];
}
// FROM:
// https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/chrome_browser_application_mac.mm;l=549;drc=4341cc4e529444bd201ad3aeeed0ec561e04103f
- (NSAccessibilityRole)accessibilityRole {
// For non-VoiceOver AT, such as Voice Control, Apple recommends turning on
// a11y when an AT accesses the 'accessibilityRole' property. This function
// is accessed frequently so we only change the accessibility state when
// accessibility is disabled.
auto* ax_state = content::BrowserAccessibilityState::GetInstance();
if (!ax_state->GetAccessibilityMode().has_mode(ui::kAXModeBasic.flags())) {
ax_state->AddAccessibilityModeFlags(ui::kAXModeBasic);
// For non-VoiceOver assistive technology (AT), such as Voice Control, Apple
// recommends turning on a11y when an AT accesses the 'accessibilityRole'
// property. This function is accessed frequently, so we only change the
// accessibility state when accessibility is already disabled.
if (!_scoped_accessibility_mode_general) {
ui::AXMode target_mode = ui::kAXModeBasic;
_scoped_accessibility_mode_general =
content::BrowserAccessibilityState::GetInstance()
->CreateScopedModeForProcess(target_mode |
ui::AXMode::kFromPlatform);
}
return [super accessibilityRole];
}

View file

@ -20,6 +20,7 @@
#if BUILDFLAG(IS_WIN)
#include "base/win/scoped_gdi_object.h"
#include "content/public/browser/scoped_accessibility_mode.h"
#include "shell/browser/ui/win/taskbar_host.h"
#endif
@ -309,6 +310,8 @@ class NativeWindowViews : public NativeWindow,
// The message ID of the "TaskbarCreated" message, sent to us when we need to
// reset our thumbar buttons.
UINT taskbar_created_message_ = 0;
std::unique_ptr<content::ScopedAccessibilityMode> scoped_accessibility_mode_;
#endif
// Handles unhandled keyboard messages coming back from the renderer process.

View file

@ -280,11 +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->AddAccessibilityModeFlags(ui::kAXModeComplete);
scoped_accessibility_mode_ =
content::BrowserAccessibilityState::GetInstance()
->CreateScopedModeForProcess(ui::kAXModeComplete);
Browser::Get()->OnAccessibilitySupportChanged();
}

View file

@ -109,7 +109,7 @@ void OffScreenVideoConsumer::OnFrameCaptured(
texture.shared_texture_handle =
reinterpret_cast<uintptr_t>(gmb_handle.io_surface.get());
#elif BUILDFLAG(IS_LINUX)
const auto& native_pixmap = gmb_handle.native_pixmap_handle;
const auto& native_pixmap = gmb_handle.native_pixmap_handle();
texture.modifier = native_pixmap.modifier;
for (const auto& plane : native_pixmap.planes) {
texture.planes.emplace_back(plane.stride, plane.offset, plane.size,

View file

@ -5,7 +5,6 @@
#include "shell/common/logging.h"
#include <string>
#include <string_view>
#include "base/base_switches.h"
#include "base/command_line.h"
@ -13,14 +12,15 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/strings/cstring_view.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/common/chrome_paths.h"
#include "content/public/common/content_switches.h"
namespace logging {
constexpr std::string_view kLogFileName{"ELECTRON_LOG_FILE"};
constexpr std::string_view kElectronEnableLogging{"ELECTRON_ENABLE_LOGGING"};
constexpr base::cstring_view kLogFileName{"ELECTRON_LOG_FILE"};
constexpr base::cstring_view kElectronEnableLogging{"ELECTRON_ENABLE_LOGGING"};
base::FilePath GetLogFileName(const base::CommandLine& command_line) {
std::string filename = command_line.GetSwitchValueASCII(switches::kLogFile);