chore: bump chromium to 123.0.6272.0 (main) (#41130)

* chore: bump chromium in DEPS to 123.0.6265.0

* chore: bump chromium in DEPS to 123.0.6266.0

* chore: update feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch

Xref: 5232280

reverts the revert *and* undoes the rewrites 😵

* chore: update chromium/disable_hidden.patch

Xref: 5148491

minor manual intervention

* chore: update patches

* chore: Rename mouse lock to pointer lock

Xref: 5148491

* refactor: fix use of newly-removed QuitCurrentWhenIdleClosureDeprecated()

Xref: 4710351

Xref: https://github.com/electron/electron/pull/26022

This usage was added in #26022 as part of Wayland support and some
simple fiddles WfM with this patch on Wayland, but I'm unsure what
to be testing for & would like a second opinion on this commit.

* chore: bump chromium in DEPS to 123.0.6268.0

* chore: update patches

* 5235021: WebUI: Migrate accessibility and bluetooth internals to WebUIConfig
5235021

* address review comment for 5196547

See: 5196547
Review comment: https://github.com/electron/electron/pull/41130#discussion_r1468973786

* 5075962: Introduce URLLoaderFactoryBuilder
5075962

* chore: bump chromium in DEPS to 123.0.6270.0

* the missing semicolon strikes again

* chore: update chromium patches

* chore: update v8 patches

* 5242326: Some followup cleanup to Fuchia files in chrome | 5242326

* chore: bump chromium in DEPS to 123.0.6272.0

* chore: update patches

* chore: update patch after rebase

* 5247339: [Clipboard] Remove ClipboardContentType enum.

5247339

* Reland: "Allow content shell to enable the built-in DNS resolver"

5232354

* 5018206: [accessibility] Migrate to ScopedAccessibilityMode

5018206

* 5246669: [Default Nav Transition]Add GetBackForwardTransitionAnimationManager on WebContentsView | 5246669

* fix: move nut-js to optional spec deps (#41199)

* chore: bump chromium in DEPS to 123.0.6265.0

* chore: bump chromium in DEPS to 123.0.6266.0

* chore: update feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch

Xref: 5232280

reverts the revert *and* undoes the rewrites 😵

* chore: update chromium/disable_hidden.patch

Xref: 5148491

minor manual intervention

* chore: update patches

* chore: Rename mouse lock to pointer lock

Xref: 5148491

* refactor: fix use of newly-removed QuitCurrentWhenIdleClosureDeprecated()

Xref: 4710351

Xref: https://github.com/electron/electron/pull/26022

This usage was added in #26022 as part of Wayland support and some
simple fiddles WfM with this patch on Wayland, but I'm unsure what
to be testing for & would like a second opinion on this commit.

* chore: bump chromium in DEPS to 123.0.6268.0

* chore: update patches

* 5235021: WebUI: Migrate accessibility and bluetooth internals to WebUIConfig
5235021

* address review comment for 5196547

See: 5196547
Review comment: https://github.com/electron/electron/pull/41130#discussion_r1468973786

* 5075962: Introduce URLLoaderFactoryBuilder
5075962

* chore: bump chromium in DEPS to 123.0.6270.0

* the missing semicolon strikes again

* chore: update chromium patches

* chore: update v8 patches

* 5242326: Some followup cleanup to Fuchia files in chrome | 5242326

* chore: bump chromium in DEPS to 123.0.6272.0

* chore: update patches

* chore: update patch after rebase

* 5247339: [Clipboard] Remove ClipboardContentType enum.

5247339

* Reland: "Allow content shell to enable the built-in DNS resolver"

5232354

* 5018206: [accessibility] Migrate to ScopedAccessibilityMode

5018206

* 5246669: [Default Nav Transition]Add GetBackForwardTransitionAnimationManager on WebContentsView | 5246669

* fix: typescript error for optional dependency

(cherry picked from commit ea17105c8c01bd1f4c1df5e72190a687d92f93cc)

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
Co-authored-by: VerteDinde <vertedinde@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Sam Maddock <smaddock@slack-corp.com>
This commit is contained in:
electron-roller[bot] 2024-01-31 17:04:13 -06:00 committed by GitHub
parent 12870cafb7
commit bccb7b572a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
80 changed files with 400 additions and 401 deletions

View file

@ -1578,7 +1578,7 @@ void ConfigureHostResolver(v8::Isolate* isolate,
}
bool enable_built_in_resolver =
base::FeatureList::IsEnabled(features::kAsyncDns);
base::FeatureList::IsEnabled(net::features::kAsyncDns);
bool additional_dns_query_types_enabled = true;
if (opts.Has("enableBuiltInResolver") &&

View file

@ -1512,32 +1512,32 @@ void WebContents::FindReply(content::WebContents* web_contents,
Emit("found-in-page", result.GetHandle());
}
void WebContents::OnRequestToLockMouse(content::WebContents* web_contents,
void WebContents::OnRequestPointerLock(content::WebContents* web_contents,
bool user_gesture,
bool last_unlocked_by_target,
bool allowed) {
if (allowed) {
exclusive_access_manager_.mouse_lock_controller()->RequestToLockMouse(
exclusive_access_manager_.pointer_lock_controller()->RequestToLockPointer(
web_contents, user_gesture, last_unlocked_by_target);
} else {
web_contents->GotResponseToLockMouseRequest(
web_contents->GotResponseToPointerLockRequest(
blink::mojom::PointerLockResult::kPermissionDenied);
}
}
void WebContents::RequestToLockMouse(content::WebContents* web_contents,
void WebContents::RequestPointerLock(content::WebContents* web_contents,
bool user_gesture,
bool last_unlocked_by_target) {
auto* permission_helper =
WebContentsPermissionHelper::FromWebContents(web_contents);
permission_helper->RequestPointerLockPermission(
user_gesture, last_unlocked_by_target,
base::BindOnce(&WebContents::OnRequestToLockMouse,
base::BindOnce(&WebContents::OnRequestPointerLock,
base::Unretained(this)));
}
void WebContents::LostMouseLock() {
exclusive_access_manager_.mouse_lock_controller()->LostMouseLock();
void WebContents::LostPointerLock() {
exclusive_access_manager_.pointer_lock_controller()->LostPointerLock();
}
void WebContents::OnRequestKeyboardLock(content::WebContents* web_contents,

View file

@ -593,14 +593,14 @@ class WebContents : public ExclusiveAccessContext,
const gfx::Rect& selection_rect,
int active_match_ordinal,
bool final_update) override;
void OnRequestToLockMouse(content::WebContents* web_contents,
void OnRequestPointerLock(content::WebContents* web_contents,
bool user_gesture,
bool last_unlocked_by_target,
bool allowed);
void RequestToLockMouse(content::WebContents* web_contents,
void RequestPointerLock(content::WebContents* web_contents,
bool user_gesture,
bool last_unlocked_by_target) override;
void LostMouseLock() override;
void LostPointerLock() override;
void OnRequestKeyboardLock(content::WebContents* web_contents,
bool esc_key_locked,
bool allowed);

View file

@ -71,6 +71,7 @@
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/cpp/resource_request_body.h"
#include "services/network/public/cpp/self_deleting_url_loader_factory.h"
#include "services/network/public/cpp/url_loader_factory_builder.h"
#include "shell/app/electron_crash_reporter_client.h"
#include "shell/browser/api/electron_api_app.h"
#include "shell/browser/api/electron_api_crash_reporter.h"
@ -1294,7 +1295,7 @@ void ElectronBrowserClient::CreateWebSocket(
&next_id_);
}
bool ElectronBrowserClient::WillCreateURLLoaderFactory(
void ElectronBrowserClient::WillCreateURLLoaderFactory(
content::BrowserContext* browser_context,
content::RenderFrameHost* frame_host,
int render_process_id,
@ -1302,7 +1303,7 @@ bool ElectronBrowserClient::WillCreateURLLoaderFactory(
const url::Origin& request_initiator,
std::optional<int64_t> navigation_id,
ukm::SourceIdObj ukm_source_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
network::URLLoaderFactoryBuilder& factory_builder,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
header_client,
bool* bypass_redirect_checks,
@ -1320,22 +1321,20 @@ bool ElectronBrowserClient::WillCreateURLLoaderFactory(
extensions::WebRequestAPI>::Get(browser_context);
DCHECK(web_request_api);
bool use_proxy_for_web_request =
bool used_proxy_for_web_request =
web_request_api->MaybeProxyURLLoaderFactory(
browser_context, frame_host, render_process_id, type, navigation_id,
ukm_source_id, factory_receiver, header_client,
ukm_source_id, factory_builder, header_client,
navigation_response_task_runner);
if (bypass_redirect_checks)
*bypass_redirect_checks = use_proxy_for_web_request;
if (use_proxy_for_web_request)
return true;
*bypass_redirect_checks = used_proxy_for_web_request;
if (used_proxy_for_web_request)
return;
}
#endif
auto proxied_receiver = std::move(*factory_receiver);
mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory_remote;
*factory_receiver = target_factory_remote.InitWithNewPipeAndPassReceiver();
auto [proxied_receiver, target_factory_remote] = factory_builder.Append();
// Required by WebRequestInfoInitParams.
//
@ -1362,8 +1361,6 @@ bool ElectronBrowserClient::WillCreateURLLoaderFactory(
std::move(navigation_ui_data), std::move(navigation_id),
std::move(proxied_receiver), std::move(target_factory_remote),
std::move(header_client_receiver), type);
return true;
}
std::vector<std::unique_ptr<content::URLLoaderRequestInterceptor>>

View file

@ -215,7 +215,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
handshake_client) override;
bool WillInterceptWebSocket(content::RenderFrameHost*) override;
bool WillCreateURLLoaderFactory(
void WillCreateURLLoaderFactory(
content::BrowserContext* browser_context,
content::RenderFrameHost* frame,
int render_process_id,
@ -223,7 +223,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
const url::Origin& request_initiator,
std::optional<int64_t> navigation_id,
ukm::SourceIdObj ukm_source_id,
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
network::URLLoaderFactoryBuilder& factory_builder,
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
header_client,
bool* bypass_redirect_checks,

View file

@ -37,6 +37,7 @@
#include "content/public/browser/web_contents_media_capture_id.h"
#include "media/audio/audio_device_description.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/url_loader_factory_builder.h"
#include "services/network/public/cpp/wrapper_shared_url_loader_factory.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "shell/browser/cookie_change_notifier.h"
@ -449,9 +450,7 @@ ElectronBrowserContext::GetURLLoaderFactory() {
if (url_loader_factory_)
return url_loader_factory_;
mojo::PendingRemote<network::mojom::URLLoaderFactory> network_factory_remote;
mojo::PendingReceiver<network::mojom::URLLoaderFactory> factory_receiver =
network_factory_remote.InitWithNewPipeAndPassReceiver();
network::URLLoaderFactoryBuilder factory_builder;
// Consult the embedder.
mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>
@ -461,8 +460,7 @@ ElectronBrowserContext::GetURLLoaderFactory() {
this, nullptr, -1,
content::ContentBrowserClient::URLLoaderFactoryType::kNavigation,
url::Origin(), std::nullopt, ukm::kInvalidSourceIdObj,
&factory_receiver, &header_client, nullptr, nullptr, nullptr,
nullptr);
factory_builder, &header_client, nullptr, nullptr, nullptr, nullptr);
network::mojom::URLLoaderFactoryParamsPtr params =
network::mojom::URLLoaderFactoryParams::New();
@ -475,11 +473,9 @@ ElectronBrowserContext::GetURLLoaderFactory() {
params->disable_web_security = false;
auto* storage_partition = GetDefaultStoragePartition();
storage_partition->GetNetworkContext()->CreateURLLoaderFactory(
std::move(factory_receiver), std::move(params));
url_loader_factory_ =
base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
std::move(network_factory_remote));
std::move(factory_builder)
.Finish(storage_partition->GetNetworkContext(), std::move(params));
return url_loader_factory_;
}

View file

@ -505,10 +505,11 @@ void ElectronBrowserMainParts::PostCreateMainMessageLoop() {
#endif
#if BUILDFLAG(IS_LINUX)
auto shutdown_cb =
base::BindOnce(base::RunLoop::QuitCurrentWhenIdleClosureDeprecated());
base::BindOnce([] { LOG(FATAL) << "Failed to shutdown."; });
ui::OzonePlatform::GetInstance()->PostCreateMainMessageLoop(
std::move(shutdown_cb),
content::GetUIThreadTaskRunner({content::BrowserTaskType::kUserInput}));
if (!bluez::BluezDBusManager::IsInitialized())
bluez::DBusBluezManagerWrapperLinux::Initialize();

View file

@ -281,7 +281,7 @@ void SystemNetworkContextManager::OnNetworkServiceCreated(
// Configure the stub resolver. This must be done after the system
// NetworkContext is created, but before anything has the chance to use it.
content::GetNetworkService()->ConfigureStubHostResolver(
base::FeatureList::IsEnabled(features::kAsyncDns),
base::FeatureList::IsEnabled(net::features::kAsyncDns),
default_secure_dns_mode, doh_config, additional_dns_query_types_enabled);
// The OSCrypt keys are process bound, so if network service is out of

View file

@ -366,17 +366,18 @@ gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() {
void OffScreenRenderWidgetHostView::SetInsets(const gfx::Insets& insets) {}
blink::mojom::PointerLockResult OffScreenRenderWidgetHostView::LockMouse(
blink::mojom::PointerLockResult OffScreenRenderWidgetHostView::LockPointer(
bool request_unadjusted_movement) {
return blink::mojom::PointerLockResult::kUnsupportedOptions;
}
blink::mojom::PointerLockResult OffScreenRenderWidgetHostView::ChangeMouseLock(
blink::mojom::PointerLockResult
OffScreenRenderWidgetHostView::ChangePointerLock(
bool request_unadjusted_movement) {
return blink::mojom::PointerLockResult::kUnsupportedOptions;
}
void OffScreenRenderWidgetHostView::UnlockMouse() {}
void OffScreenRenderWidgetHostView::UnlockPointer() {}
void OffScreenRenderWidgetHostView::TakeFallbackContentFrom(
content::RenderWidgetHostView* view) {

View file

@ -97,11 +97,11 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
void SetBackgroundColor(SkColor color) override;
std::optional<SkColor> GetBackgroundColor() override;
void UpdateBackgroundColor() override;
blink::mojom::PointerLockResult LockMouse(
blink::mojom::PointerLockResult LockPointer(
bool request_unadjusted_movement) override;
blink::mojom::PointerLockResult ChangeMouseLock(
blink::mojom::PointerLockResult ChangePointerLock(
bool request_unadjusted_movement) override;
void UnlockMouse(void) override;
void UnlockPointer(void) override;
void TakeFallbackContentFrom(content::RenderWidgetHostView* view) override;
#if BUILDFLAG(IS_MAC)
void SetActive(bool active) override;

View file

@ -223,4 +223,9 @@ void OffScreenWebContentsView::FullscreenStateChanged(bool is_fullscreen) {}
void OffScreenWebContentsView::UpdateWindowControlsOverlay(
const gfx::Rect& bounding_rect) {}
content::BackForwardTransitionAnimationManager*
OffScreenWebContentsView::GetBackForwardTransitionAnimationManager() {
return nullptr;
}
} // namespace electron

View file

@ -68,6 +68,8 @@ class OffScreenWebContentsView : public content::WebContentsView,
void OnCapturerCountChanged() override;
void FullscreenStateChanged(bool is_fullscreen) override;
void UpdateWindowControlsOverlay(const gfx::Rect& bounding_rect) override;
content::BackForwardTransitionAnimationManager*
GetBackForwardTransitionAnimationManager() override;
#if BUILDFLAG(IS_MAC)
bool CloseTabAfterEventTrackingIfNeeded() override;

View file

@ -389,8 +389,9 @@ void ElectronAccessibilityUIMessageHandler::RegisterMessages() {
web_ui()->RegisterMessageCallback(
"toggleAccessibility",
base::BindRepeating(&AccessibilityUIMessageHandler::ToggleAccessibility,
base::Unretained(this)));
base::BindRepeating(
&AccessibilityUIMessageHandler::ToggleAccessibilityForWebContents,
base::Unretained(this)));
web_ui()->RegisterMessageCallback(
"setGlobalFlag",
base::BindRepeating(&AccessibilityUIMessageHandler::SetGlobalFlag,

View file

@ -5,7 +5,7 @@
#ifndef ELECTRON_SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_
#define ELECTRON_SHELL_BROWSER_UI_WEBUI_ACCESSIBILITY_UI_H_
#include "chrome/browser/accessibility/accessibility_ui.h"
#include "chrome/browser/ui/webui/accessibility/accessibility_ui.h"
#include "content/public/browser/web_ui_controller.h"
#include "content/public/browser/web_ui_data_source.h"
#include "content/public/browser/web_ui_message_handler.h"

View file

@ -137,7 +137,7 @@ void Clipboard::Write(const gin_helper::Dictionary& data,
}
if (data.Get("html", &html))
writer.WriteHTML(html, std::string(), ui::ClipboardContentType::kSanitized);
writer.WriteHTML(html, std::string());
if (data.Get("image", &image))
writer.WriteImage(image.AsBitmap());
@ -198,7 +198,7 @@ std::u16string Clipboard::ReadHTML(gin_helper::Arguments* args) {
void Clipboard::WriteHTML(const std::u16string& html,
gin_helper::Arguments* args) {
ui::ScopedClipboardWriter writer(GetClipboardBuffer(args));
writer.WriteHTML(html, std::string(), ui::ClipboardContentType::kSanitized);
writer.WriteHTML(html, std::string());
}
v8::Local<v8::Value> Clipboard::ReadBookmark(gin_helper::Arguments* args) {