chore: bump chromium to 117.0.5884.1 (main) (#38969)

* chore: bump chromium in DEPS to 117.0.5866.0

* chore: bump chromium in DEPS to 117.0.5868.0

* chore: update mas_no_private_api.patch

Xref: 4634925

Minor manual patch syncing due to upstream code shear

* chore: update mas_disable_remote_layer.patch

Xref: 4647191

Manually sync patch to minor upstream code shear

* chore: update mas_disable_remote_accessibility.patch

Xref: 4641746

No manual changes; patch applied with fuzz

* chore: update mas_avoid_usage_of_private_macos_apis.patch

Xref: 4634925

Manually sync base/process/launch_mac.cc to minor upstream shear

Manually sync base/mac/foundation_util.mm to upstream changes:
_CFIsObjC use has been removed upstream, so we no longer need
to remove it 🎉

* chore: update printing.patch

Xref: 4658496

Manually sync patch to minor upstream code shear

* chore: update disable_color_correct_rendering.patch

Xref: 4625254

Manually sync patch to minor upstream code shear

* chore: update feat_expose_raw_response_headers_from_urlloader.patch

Xref: services/network/public/cpp/resource_request.cc

No manual changes; patch applied with fuzz

* chore: update add_electron_deps_to_license_credits_file.patch

Xref: 4634961

No manual changes; patch applied with fuzz

* chore: update build_only_use_the_mas_build_config_in_the_required_components.patch

Xref: 4648411

No manual changes; patch applied with fuzz

* chore: update patches

* fixup! chore: update add_electron_deps_to_license_credits_file.patch

chore: license files must be an array

* chore: bump chromium in DEPS to 117.0.5870.0

* chore: update patches

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

* chore: update json_parse_errors_made_user-friendly.patch

Xref: 4652014

v8 error message changed upstream; update Node test to match it

* chore: bump chromium in DEPS to 117.0.5872.0

* chore: update patches

* chore: explicitly cast x11::Window to unsigned int

Xref: 4661049

This is an `enum class Window : uint32_t` defined in ui/gfx/x/xproto.h.
Previous versions of clang let this implicit cast happen,
but it generates a warning in the new clang roll.

* chore: remove unused #include

Xref: 4650453

header was removed upstream, so FTBFS unless removed here

* chore: add include guard patch

Xref: 4628373

h/t @jkleinsc

* chore: bump chromium in DEPS to 117.0.5874.0

* chore: update render_widget_host_view_mac.patch

Xref: 4661244

Manually sync patch to minor upstream code

* chore: update mas_disable_remote_accessibility.patch

Xref: 4653209

Manually sync patch to upstream code shear

* chore: update build_only_use_the_mas_build_config_in_the_required_components.patch

Xref: 4653209

Manually sync patch to minor upstream code shear

* chore: update GetInitiatorProcessId()

Xref: 4641991

trivial upstream naming change: s/ProcessID/ProcessId/

* chore: sync to upstream SetInputRegion() changes

Xref: 4665245

Simple upstream chang: SetInputRegion() used to take a gfx::Rect* where
`nullptr` meant "no opaque region". The function signature changed to
absl::optional<gfx::Rect> w/the same meaning.

* chore: sync to upstream SetOpaqueRegion() changes

Xref: 4656738

Simple upstream chang: SetOpaqueRegion() used to take a vector<Rect>* where
`nullptr` meant "no opaque region". The function signature changed to
absl::optional<std::vector<gfx::Rect>> w/the same meaning.

* chore: update patches

* chore: bump chromium in DEPS to 117.0.5876.0

* chore: update mas_disable_remote_accessibility.patch

Xref: 4658375

We no longer need to patch out a field that's now removed upstream.
RenderWidgetHostNSViewBridgeOwner.remote_accessibility_element_

* chore: update feat_filter_out_non-shareable_windows_in_the_current_application_in.patch

Xref: 4658680

Manually sync patch to upstream code shear (ARC adoption).

* chore: update patches

* fix: -Werror,-Wshadow error in Node.js

* chore: bump chromium in DEPS to 117.0.5878.0

* chore: bump chromium in DEPS to 117.0.5880.0

* chore: bump chromium in DEPS to 117.0.5880.4

* chore: update patches

* 4658680: Convert /content/browser to use ARC

4658680

* 4669995: Remove CFToNSCast and NSToCFCast

4669995

* WIP: 4658680: Convert /content/browser to use ARC

4658680

* chore: update printing patch after rebase

* chore: bump chromium in DEPS to 117.0.5882.0

* Revert "WIP: 4658680: Convert /content/browser to use ARC"

This reverts commit c8559ea448ad93123865a6fa8af6fe2767e43396.

* Revert "4669995: Remove CFToNSCast and NSToCFCast"

This reverts commit 38e145f33d844e077b09e1fb119fae9d5d7bbc3e.

* chore: bump chromium in DEPS to 117.0.5874.0

* 4661244: Convert /content/browser/renderer_host to use ARC

4661244

* 4653209: Convert /ui/views:views to use ARC

4653209

* chore: fixup mas_disable_remote_accessibility.patch

* chore: fixup render_widget_host_view_mac.patch

* chore: update to newer clang

* chore: bump chromium in DEPS to 117.0.5884.1

(cherry picked from commit a3879acfde8f3d962d58d6ad0632164ccb88ee63)

* 4669995: Remove CFToNSCast and NSToCFCast

4669995
(cherry picked from commit 38e145f33d844e077b09e1fb119fae9d5d7bbc3e)
(cherry picked from commit b1224ab7e00aedbd0e5dc78ebb3c6162573b28c4)

* 4658680: Convert /content/browser to use ARC

4658680
(cherry picked from commit 77039a323b9ebb3e8edb3a92a3b94a8d7d026a32)

* Rename and cleanup ExtensionsBrowserClient functions

| 4665670

(cherry picked from commit 677a2e646a8d82da60dc252b08b320c3ddff6be6)

* chore: bump chromium in DEPS to 117.0.5886.0

* chore: update patches

* Revert "chore: update patches"

This reverts commit db9294f9446492d4a3d63f5f3ecc551aeeeb2e26.

* Revert "chore: bump chromium in DEPS to 117.0.5886.0"

This reverts commit a7de0276e6e0eeecfdbb17f9bbc27c01b4bbfc24.

* build: use built toolchains instead of locally installed VSCode

* fixup: build: use built toolchains instead of locally installed VSCode

* chore: add missing mojo dep

---------

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: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
electron-roller[bot] 2023-07-16 16:14:43 +02:00 committed by GitHub
parent f61425efdb
commit 9645f7f6d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
97 changed files with 632 additions and 589 deletions

View file

@ -1865,7 +1865,7 @@ bool WebContents::EmitNavigationEvent(
content::RenderFrameHost* initiator_frame_host =
navigation_handle->GetInitiatorFrameToken().has_value()
? content::RenderFrameHost::FromFrameToken(
navigation_handle->GetInitiatorProcessID(),
navigation_handle->GetInitiatorProcessId(),
navigation_handle->GetInitiatorFrameToken().value())
: nullptr;

View file

@ -8,9 +8,9 @@
#include <string>
#include <utility>
#include "base/apple/bridging.h"
#include "base/apple/bundle_locations.h"
#include "base/i18n/rtl.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mac_util.h"
#include "base/mac/mac_util.mm"
#include "base/mac/scoped_cftyperef.h"
@ -36,6 +36,10 @@
#include "ui/gfx/image/image.h"
#include "url/gurl.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
namespace electron {
namespace {
@ -52,14 +56,15 @@ NSString* GetAppPathForProtocol(const GURL& url) {
URLWithString:base::SysUTF8ToNSString(url.possibly_invalid_spec())];
base::ScopedCFTypeRef<CFErrorRef> out_err;
base::ScopedCFTypeRef<CFURLRef> openingApp(LSCopyDefaultApplicationURLForURL(
(CFURLRef)ns_url, kLSRolesAll, out_err.InitializeInto()));
base::ScopedCFTypeRef<CFURLRef> openingApp(
LSCopyDefaultApplicationURLForURL(base::apple::NSToCFPtrCast(ns_url),
kLSRolesAll, out_err.InitializeInto()));
if (out_err) {
// likely kLSApplicationNotFoundErr
return nullptr;
}
NSString* app_path = [base::mac::CFToNSCast(openingApp.get()) path];
NSString* app_path = [base::apple::CFToNSPtrCast(openingApp.get()) path];
return app_path;
}
@ -178,7 +183,7 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
return false;
NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()];
CFStringRef protocol_cf = base::mac::NSToCFCast(protocol_ns);
CFStringRef protocol_cf = base::apple::NSToCFPtrCast(protocol_ns);
// TODO(codebytere): Use -[NSWorkspace URLForApplicationToOpenURL:] instead
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
@ -200,7 +205,7 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
// No other app was found set it to none instead of setting it back to itself.
if ([identifier isEqualToString:(__bridge NSString*)other]) {
other = base::mac::NSToCFCast(@"None");
other = base::apple::NSToCFPtrCast(@"None");
}
OSStatus return_code = LSSetDefaultHandlerForURLScheme(protocol_cf, other);
@ -217,8 +222,9 @@ bool Browser::SetAsDefaultProtocolClient(const std::string& protocol,
return false;
NSString* protocol_ns = [NSString stringWithUTF8String:protocol.c_str()];
OSStatus return_code = LSSetDefaultHandlerForURLScheme(
base::mac::NSToCFCast(protocol_ns), base::mac::NSToCFCast(identifier));
OSStatus return_code =
LSSetDefaultHandlerForURLScheme(base::apple::NSToCFPtrCast(protocol_ns),
base::apple::NSToCFPtrCast(identifier));
return return_code == noErr;
}
@ -236,8 +242,8 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
// TODO(codebytere): Use -[NSWorkspace URLForApplicationToOpenURL:] instead
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
base::ScopedCFTypeRef<CFStringRef> bundleId(
LSCopyDefaultHandlerForURLScheme(base::mac::NSToCFCast(protocol_ns)));
base::ScopedCFTypeRef<CFStringRef> bundleId(LSCopyDefaultHandlerForURLScheme(
base::apple::NSToCFPtrCast(protocol_ns)));
#pragma clang diagnostic pop
if (!bundleId)
return false;
@ -245,7 +251,7 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
// Ensure the comparison is case-insensitive
// as LS does not persist the case of the bundle id.
NSComparisonResult result =
[base::mac::CFToNSCast(bundleId) caseInsensitiveCompare:identifier];
[base::apple::CFToNSPtrCast(bundleId) caseInsensitiveCompare:identifier];
return result == NSOrderedSame;
}

View file

@ -121,25 +121,22 @@ BrowserContext* ElectronExtensionsBrowserClient::GetOriginalContext(
}
content::BrowserContext*
ElectronExtensionsBrowserClient::GetRedirectedContextInIncognito(
ElectronExtensionsBrowserClient::GetContextRedirectedToOriginal(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) {
bool force_guest_profile) {
return GetOriginalContext(context);
}
content::BrowserContext*
ElectronExtensionsBrowserClient::GetContextForRegularAndIncognito(
content::BrowserContext* ElectronExtensionsBrowserClient::GetContextOwnInstance(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) {
bool force_guest_profile) {
return context;
}
content::BrowserContext* ElectronExtensionsBrowserClient::GetRegularProfile(
content::BrowserContext*
ElectronExtensionsBrowserClient::GetContextForOriginalOnly(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) {
bool force_guest_profile) {
return context->IsOffTheRecord() ? nullptr : context;
}

View file

@ -56,18 +56,15 @@ class ElectronExtensionsBrowserClient
content::BrowserContext* context) override;
content::BrowserContext* GetOriginalContext(
content::BrowserContext* context) override;
content::BrowserContext* GetRedirectedContextInIncognito(
content::BrowserContext* GetContextRedirectedToOriginal(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) override;
content::BrowserContext* GetContextForRegularAndIncognito(
bool force_guest_profile) override;
content::BrowserContext* GetContextOwnInstance(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) override;
content::BrowserContext* GetRegularProfile(
bool force_guest_profile) override;
content::BrowserContext* GetContextForOriginalOnly(
content::BrowserContext* context,
bool force_guest_profile,
bool force_system_profile) override;
bool force_guest_profile) override;
bool IsGuestSession(content::BrowserContext* context) const override;
bool IsExtensionIncognitoEnabled(
const std::string& extension_id,

View file

@ -17,11 +17,11 @@
#include "base/supports_user_data.h"
#include "content/public/browser/desktop_media_id.h"
#include "content/public/browser/web_contents_user_data.h"
#include "electron/shell/common/api/api.mojom.h"
#include "extensions/browser/app_window/size_constraints.h"
#include "shell/browser/draggable_region_provider.h"
#include "shell/browser/native_window_observer.h"
#include "shell/browser/ui/inspectable_web_contents_view.h"
#include "shell/common/api/api.mojom.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "ui/views/widget/widget_delegate.h"

View file

@ -12,8 +12,8 @@
#include <vector>
#include "base/mac/scoped_nsobject.h"
#include "electron/shell/common/api/api.mojom.h"
#include "shell/browser/native_window.h"
#include "shell/common/api/api.mojom.h"
#include "ui/display/display_observer.h"
#include "ui/native_theme/native_theme_observer.h"
#include "ui/views/controls/native/native_view_host.h"

View file

@ -52,6 +52,10 @@
#include "ui/views/widget/widget.h"
#include "ui/views/window/native_frame_view_mac.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@interface ElectronProgressBar : NSProgressIndicator
@end
@ -450,12 +454,6 @@ void NativeWindowMac::Close() {
void NativeWindowMac::CloseImmediately() {
RemoveChildFromParentWindow(this);
// Retain the child window before closing it. If the last reference to the
// NSWindow goes away inside -[NSWindow close], then bad stuff can happen.
// See e.g. http://crbug.com/616701.
base::scoped_nsobject<NSWindow> child_window(window_,
base::scoped_policy::RETAIN);
[window_ close];
}
@ -1330,13 +1328,13 @@ void NativeWindowMac::SetProgressBar(double progress,
// For the first time API invoked, we need to create a ContentView in
// DockTile.
if (first_time) {
NSImageView* image_view = [[[NSImageView alloc] init] autorelease];
NSImageView* image_view = [[NSImageView alloc] init];
[image_view setImage:[NSApp applicationIconImage]];
[dock_tile setContentView:image_view];
NSRect frame = NSMakeRect(0.0f, 0.0f, dock_tile.size.width, 15.0);
NSProgressIndicator* progress_indicator =
[[[ElectronProgressBar alloc] initWithFrame:frame] autorelease];
[[ElectronProgressBar alloc] initWithFrame:frame];
[progress_indicator setStyle:NSProgressIndicatorStyleBar];
[progress_indicator setIndeterminate:NO];
[progress_indicator setBezeled:YES];
@ -1483,8 +1481,8 @@ void NativeWindowMac::SetVibrancy(const std::string& type) {
vibrancy_type_ = type;
if (vibrantView == nil) {
vibrantView = [[[NSVisualEffectView alloc]
initWithFrame:[[window_ contentView] bounds]] autorelease];
vibrantView = [[NSVisualEffectView alloc]
initWithFrame:[[window_ contentView] bounds]];
[window_ setVibrantView:vibrantView];
[vibrantView

View file

@ -6,7 +6,6 @@
#include <utility>
#include "components/viz/common/resources/resource_format.h"
#include "components/viz/common/resources/resource_sizes.h"
#include "mojo/public/cpp/system/platform_handle.h"
#include "skia/ext/platform_canvas.h"

View file

@ -17,6 +17,10 @@
#include "ui/views/cocoa/native_widget_mac_ns_window_host.h"
#include "ui/views/widget/native_widget_mac.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
using TitleBarStyle = electron::NativeWindowMac::TitleBarStyle;
using FullScreenTransitionState =
electron::NativeWindow::FullScreenTransitionState;
@ -324,9 +328,9 @@ using FullScreenTransitionState =
NSWindow* window = shell_->GetNativeWindow().GetNativeNSWindow();
NSWindow* sheetParent = [window sheetParent];
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
FROM_HERE, base::BindOnce(base::RetainBlock(^{
FROM_HERE, base::BindOnce(^{
[sheetParent endSheet:window];
})));
}));
}
// Clears the delegate when window is going to be closed, since EL Capitan it

View file

@ -8,7 +8,7 @@
#include <memory>
#include <vector>
#include "shell/common/api/api.mojom.h"
#include "electron/shell/common/api/api.mojom.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/image/image.h"

View file

@ -181,8 +181,7 @@ void ElectronDesktopWindowTreeHostLinux::UpdateClientDecorationHints(
gfx::Rect input_bounds(view->GetWidget()->GetWindowBoundsInScreen().size());
input_bounds.Inset(insets + input_insets);
gfx::Rect scaled_bounds = gfx::ScaleToEnclosingRect(input_bounds, scale);
window->SetInputRegion(&scaled_bounds);
window->SetInputRegion(gfx::ScaleToEnclosingRect(input_bounds, scale));
if (should_set_opaque_region) {
// The opaque region is a list of rectangles that contain only fully
@ -224,8 +223,8 @@ void ElectronDesktopWindowTreeHostLinux::UpdateClientDecorationHints(
// Convert the region to a list of rectangles.
std::vector<gfx::Rect> opaque_region;
for (SkRegion::Iterator i(region); !i.done(); i.next())
opaque_region.push_back(gfx::SkIRectToRect(i.rect()));
window->SetOpaqueRegion(&opaque_region);
opaque_region.emplace_back(gfx::SkIRectToRect(i.rect()));
window->SetOpaqueRegion(opaque_region);
}
}

View file

@ -9,7 +9,7 @@
#include <string>
#include "base/memory/raw_ptr.h"
#include "shell/common/api/api.mojom.h"
#include "electron/shell/common/api/api.mojom.h"
#include "ui/gfx/native_widget_types.h"
class DevToolsContentsResizingStrategy;

View file

@ -194,7 +194,8 @@ GlobalMenuBarX11::~GlobalMenuBarX11() {
// static
std::string GlobalMenuBarX11::GetPathForWindow(x11::Window window) {
return base::StringPrintf("/com/canonical/menu/%X", window);
return base::StringPrintf("/com/canonical/menu/%X",
static_cast<uint>(window));
}
void GlobalMenuBarX11::SetMenu(ElectronMenuModel* menu_model) {