chore: bump chromium to 108.0.5359.22 (22-x-y) (#36163)

* chore: bump chromium in DEPS to 108.0.5359.19

* chore: update patches

* 3859750: [linux/wayland] Added plumbing for the state of tiled edges.

https://chromium-review.googlesource.com/c/chromium/src/+/3859750

Also 3970920: [linux/wayland] Fixed the tiled edges for the GTK frame.

https://chromium-review.googlesource.com/c/chromium/src/+/3970920
(cherry picked from commit d3f0dbb68a)

* chore: bump chromium in DEPS to 108.0.5359.22

* chore: update patches

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
electron-roller[bot]
2022-11-01 17:17:00 -04:00
committed by GitHub
parent ddcc9b20f2
commit 7a8346cc11
19 changed files with 67 additions and 42 deletions

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'108.0.5359.10',
'108.0.5359.22',
'node_version':
'v16.17.1',
'nan_version':

View File

@@ -53,7 +53,7 @@ index 18c34ce9965912caa58457fc28be2b4f6edffb78..d1fc002ff98ea25ff4fec7bacd44140c
} // namespace gtk
diff --git a/ui/gtk/window_frame_provider_gtk.cc b/ui/gtk/window_frame_provider_gtk.cc
index 6aff3b989aff9488b85ca46a62a52a1c7cfb3215..751247c2608ca5143044f6395baae5917c909f46 100644
index c7857a3e316554e6b5f46c023a1a8084a3263074..5ad7d4ffa7e9c12ec4640a845a4c763420c23ec2 100644
--- a/ui/gtk/window_frame_provider_gtk.cc
+++ b/ui/gtk/window_frame_provider_gtk.cc
@@ -38,16 +38,18 @@ std::string GetThemeName() {
@@ -111,8 +111,8 @@ index 6aff3b989aff9488b85ca46a62a52a1c7cfb3215..751247c2608ca5143044f6395baae591
WindowFrameProviderGtk::~WindowFrameProviderGtk() = default;
@@ -264,7 +266,7 @@ void WindowFrameProviderGtk::PaintWindowFrame(gfx::Canvas* canvas,
top_area_height_dip * scale - asset.frame_thickness_px.top();
@@ -272,7 +274,7 @@ void WindowFrameProviderGtk::PaintWindowFrame(
top_area_height_dip * scale - effective_frame_thickness_px.top();
auto header = PaintHeaderbar({client_bounds_px.width(), top_area_height_px},
- HeaderContext(solid_frame_, focused), scale);
@@ -120,7 +120,7 @@ index 6aff3b989aff9488b85ca46a62a52a1c7cfb3215..751247c2608ca5143044f6395baae591
image = gfx::ImageSkia::CreateFrom1xBitmap(header);
// In GTK4, the headerbar gets clipped by the window.
if (GtkCheckVersion(4)) {
@@ -296,7 +298,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
@@ -304,7 +306,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
gfx::Rect frame_bounds_dip(kMaxFrameSizeDip, kMaxFrameSizeDip,
2 * kMaxFrameSizeDip, 2 * kMaxFrameSizeDip);
@@ -129,7 +129,7 @@ index 6aff3b989aff9488b85ca46a62a52a1c7cfb3215..751247c2608ca5143044f6395baae591
frame_bounds_dip.Inset(-GtkStyleContextGetPadding(focused_context));
frame_bounds_dip.Inset(-GtkStyleContextGetBorder(focused_context));
gfx::Size bitmap_size(BitmapSizePx(asset), BitmapSizePx(asset));
@@ -304,7 +306,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
@@ -312,7 +314,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
PaintBitmap(bitmap_size, frame_bounds_dip, focused_context, scale);
asset.unfocused_bitmap =
PaintBitmap(bitmap_size, frame_bounds_dip,
@@ -139,7 +139,7 @@ index 6aff3b989aff9488b85ca46a62a52a1c7cfb3215..751247c2608ca5143044f6395baae591
// In GTK4, there's no way to obtain the frame thickness from CSS values
// directly, so we must determine it experimentally based on the drawn
diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h
index 867896de7fa036b7c8be5adf5a7731c97e942d69..2c38d399f95cc2c8851aded5993e3019941defc0 100644
index d8cb2c6aab333cc55ad1daa70ac91b0569d33a7c..558aa3979301f79df789a29ba3ad1cf134bd6494 100644
--- a/ui/gtk/window_frame_provider_gtk.h
+++ b/ui/gtk/window_frame_provider_gtk.h
@@ -14,7 +14,7 @@ namespace gtk {
@@ -151,7 +151,7 @@ index 867896de7fa036b7c8be5adf5a7731c97e942d69..2c38d399f95cc2c8851aded5993e3019
WindowFrameProviderGtk(const WindowFrameProviderGtk&) = delete;
WindowFrameProviderGtk& operator=(const WindowFrameProviderGtk&) = delete;
@@ -69,6 +69,9 @@ class WindowFrameProviderGtk : public ui::WindowFrameProvider {
@@ -70,6 +70,9 @@ class WindowFrameProviderGtk : public ui::WindowFrameProvider {
// Cached bitmaps and metrics. The scale is rounded to percent.
base::flat_map<int, Asset> assets_;

View File

@@ -15,7 +15,7 @@ Refs changes in:
This patch reverts the changes to fix associated crashes in Electron.
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index b7c1c9e1db6e7366912447cd4c2e3d4ac6f131e6..65689678cafabd61b273ef8350f4c11394384945 100644
index 8b6abb315d33ce752884510beca325833b893bce..b197d38944c0560c7f9cb25b706eb8a5876c59d3 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -124,14 +124,6 @@ bool Frame::Detach(FrameDetachType type) {

View File

@@ -33,10 +33,10 @@ index b12b4e65be8ad29054f5fdd98600888726b1d068..d67683efeabed3209eac553ff050ec2e
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 68415e75360cec6de27d95ba01b30935c491023e..b5885d348ed5a3ed18bb524cbbde51ed185a8658 100644
index 6af6b725815f67cee31bf03382ea69c53c2897d8..63807e436ef7011a284357e237ada68508870d87 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4683,7 +4683,7 @@ static_library("browser") {
@@ -4687,7 +4687,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
@@ -46,10 +46,10 @@ index 68415e75360cec6de27d95ba01b30935c491023e..b5885d348ed5a3ed18bb524cbbde51ed
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index 15b713cb25724fc2a0b743725837720492739ed2..f7649e3bc908cd9a04294d63c405f98b6363b05d 100644
index 1c660e23fbfbe97d489bb7b0e463ef40197851be..60a43d97d47924e4d95ab27feb0a365e52878bfc 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -6156,7 +6156,6 @@ test("unit_tests") {
@@ -6157,7 +6157,6 @@ test("unit_tests") {
deps += [
"//chrome:other_version",
@@ -57,7 +57,7 @@ index 15b713cb25724fc2a0b743725837720492739ed2..f7649e3bc908cd9a04294d63c405f98b
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:crash_reporter_client_win_unit_tests",
@@ -6181,6 +6180,10 @@ test("unit_tests") {
@@ -6182,6 +6181,10 @@ test("unit_tests") {
"//ui/resources",
]
@@ -68,7 +68,7 @@ index 15b713cb25724fc2a0b743725837720492739ed2..f7649e3bc908cd9a04294d63c405f98b
ldflags = [
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
@@ -7107,7 +7110,7 @@ test("unit_tests") {
@@ -7109,7 +7112,7 @@ test("unit_tests") {
}
deps += [
@@ -77,7 +77,7 @@ index 15b713cb25724fc2a0b743725837720492739ed2..f7649e3bc908cd9a04294d63c405f98b
"//chrome/browser/autofill_assistant/password_change/vector_icons:vector_icons",
"//chrome/browser/enterprise/connectors/analysis:features",
"//chrome/browser/media/router:test_support",
@@ -7230,6 +7233,10 @@ test("unit_tests") {
@@ -7232,6 +7235,10 @@ test("unit_tests") {
}
}

View File

@@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
https://crbug.com/634542 and https://crbug.com/711107.
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index e4db8136e957313da28b7ef2bcff4ec91eee5deb..bd4fbda15d8d73d92ec8684a66a4aaeea53990d1 100644
index d129d26e2ee18a30aa44c7f9c2ba3af2d12dca6a..06867e89b6a0a73dc7d8f4060b366a8b43dd5525 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1882,6 +1882,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -1890,6 +1890,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
gfx::ContentColorUsage content_color_usage) const {
TargetColorParams params;

View File

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 0133090585389abafc843d7f7258d3d2281a5b54..a81933bcbb926659ba9dc8c775ce022a0f7bdafb 100644
index ff4e181fae1849772b699bf83e0f7e9556dbd71e..84b3bcbfb4f52098efad6f2b8ab8e8445d8fe13a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -819,6 +819,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -824,6 +824,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@@ -20,12 +20,12 @@ index 0133090585389abafc843d7f7258d3d2281a5b54..a81933bcbb926659ba9dc8c775ce022a
blink::mojom::PointerLockResult::kWrongDocument);
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 688c6b226d83996e29f5aebc542163fe6b53e77a..a57beb8ba60416db6bc8d99eea0c450d3eb7a44b 100644
index 6ea55a22496a5186513963d06fa700cb82758177..bbcff3ff49234e2f6b9fcdaa1409678189d91b67 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -889,6 +889,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
SiteInstanceGroup* GetSiteInstanceGroup();
@@ -894,6 +894,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
cc::BrowserControlsState current,
bool animate);
+ // Electron: Prevents the widget from getting hidden.
+ bool disable_hidden_ = false;

View File

@@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 14dfb45da60c0552be10c8998ec126db1e7be202..bf89fb878e2bddf98558e6d6e9db8b00d525baf2 100644
index 28605cda32c8a499271ff358bbdbaa2261012c88..1496adf92d0e0c7868869263eba5c7786bed6bd8 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -6716,10 +6716,11 @@ std::pair<url::Origin, std::string> NavigationRequest::
@@ -6724,10 +6724,11 @@ std::pair<url::Origin, std::string> NavigationRequest::
if (IsForMhtmlSubframe())
return origin_with_debug_info;

View File

@@ -44,7 +44,7 @@ index 89b9323c08cfed0d3ea3a0ec1beaa0bdfabe343e..d000b7f43f393d297a3715ea4279537b
} // namespace
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index eb178455e92ae0c5f6d5033ffc1990b711466a83..9b4f909501f6cbc50a7d88cef679add9e6c454d2 100644
index 1b91b71bae8201d7cae5850a8c810bd179a36ab1..7f4bc1ded505067ba83001b389ab5813bad17dc4 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -566,10 +566,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {

View File

@@ -796,10 +796,10 @@ index 51a5497b809cda82b223138f43507172a9f066ae..71227492fd87e577518f3bf55ded37b0
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Set options for print preset from source PDF document.
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 5a032fac280466c9e1498c4d629acbe0b0bb1ec6..3274b0331aaa077603e8ad10ca9fe4b3cebc3161 100644
index 18328bedfdd0dc735126f7541ee7ed3e736d94b0..e5e28db9a970b49ac5624c59cbaeed9aff5e52d8 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -2819,8 +2819,9 @@ source_set("browser") {
@@ -2821,8 +2821,9 @@ source_set("browser") {
"//ppapi/shared_impl",
]

View File

@@ -30,10 +30,10 @@ index 5f1eea557b549a6db081ff925ba9995b0591d9fa..62c5ef52ec774623f2cfc7c269973a26
// RenderWidgetHost on the primary main frame, and false otherwise.
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index a81933bcbb926659ba9dc8c775ce022a0f7bdafb..bc0d1fab2160fa476c875a6a5e549c878c855795 100644
index 84b3bcbfb4f52098efad6f2b8ab8e8445d8fe13a..6ed422b4bfc5019a935634cad5488b2927461486 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2093,6 +2093,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
@@ -2098,6 +2098,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
if (view_)
view_->UpdateCursor(WebCursor(cursor));

View File

@@ -6,7 +6,7 @@ Subject: render_widget_host_view_base.patch
... something to do with OSR? and maybe <webview> as well? terrifying.
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index b0c9044e9978ff38ecd730541e512bbe73e45a27..aecd5ef1019188a593f23436b5392f57805620b0 100644
index e5d57b61367227762c1e4cab6a3d7c7ffc4c74a5..b1217d282b8c70a3afb2c5af130aed9c0d78de2f 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -706,6 +706,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(

View File

@@ -67,7 +67,7 @@ index bb82952036825aa6b19449956984cb3c90874af1..9550aee35d129c5cdd71de67150dfb70
const WebSecurityOrigin& script_origin) {
return false;
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index 8bf05b2789af3f7d2f6ecda9b7a6eb4abb84dbd6..b739ed97b190bce06b6c0f2bc12a1869fa590e39 100644
index 9056d1bb293dfb8c40c7e3d3d94c238cd514a2aa..fc576e5ad08b93204e1ebfb5486d0ad15733f317 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -747,6 +747,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {

View File

@@ -9,10 +9,10 @@ necessary for native modules to load.
Also, some fixes relating to mksnapshot on ARM.
diff --git a/BUILD.gn b/BUILD.gn
index 29eb0dc060063e0f68b16d5809e39ce2ebc8156e..f3a5b9f5d1e1dcb881497d793f982a8c38091bb4 100644
index 61187af3053a02e62cc75ae0c6e368dd541af877..a596586c695f4a4d8daea63881c2334414b6ef5c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -634,7 +634,7 @@ config("internal_config") {
@@ -636,7 +636,7 @@ config("internal_config") {
":cppgc_header_features",
]
@@ -21,7 +21,7 @@ index 29eb0dc060063e0f68b16d5809e39ce2ebc8156e..f3a5b9f5d1e1dcb881497d793f982a8c
defines += [ "BUILDING_V8_SHARED" ]
}
@@ -6073,7 +6073,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6075,7 +6075,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]

View File

@@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
contain any standard C++ library exports (e.g. `std::ostringstream`).
diff --git a/BUILD.gn b/BUILD.gn
index 12e322d66485ad174eb6cc7220296d0f8eb4655d..f481aaa18d18034b7f5ddd834820c2d065e39a83 100644
index 61752da47dd3393ae25a949a92eda4b8aaca8f74..c3393a116390d5321da578110c9d3ab227126351 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -634,6 +634,10 @@ config("internal_config") {
@@ -636,6 +636,10 @@ config("internal_config") {
":cppgc_header_features",
]

View File

@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index f3a5b9f5d1e1dcb881497d793f982a8c38091bb4..12e322d66485ad174eb6cc7220296d0f8eb4655d 100644
index a596586c695f4a4d8daea63881c2334414b6ef5c..61752da47dd3393ae25a949a92eda4b8aaca8f74 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -6085,7 +6085,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6087,7 +6087,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View File

@@ -78,6 +78,14 @@ void ElectronDesktopWindowTreeHostLinux::OnWindowStateChanged(
UpdateWindowState(new_state);
}
void ElectronDesktopWindowTreeHostLinux::OnWindowTiledStateChanged(
ui::WindowTiledEdges new_tiled_edges) {
static_cast<ClientFrameViewLinux*>(
native_window_view_->widget()->non_client_view()->frame_view())
->set_tiled_edges(new_tiled_edges);
UpdateFrameHints();
}
void ElectronDesktopWindowTreeHostLinux::UpdateWindowState(
ui::PlatformWindowState new_state) {
if (window_state_ == new_state)
@@ -159,7 +167,15 @@ void ElectronDesktopWindowTreeHostLinux::UpdateClientDecorationHints(
input_insets = view->GetInputInsets();
}
const auto tiled_edges = view->tiled_edges();
if (tiled_edges.left)
insets.set_left(0);
if (tiled_edges.right)
insets.set_right(0);
if (tiled_edges.top)
insets.set_top(0);
if (tiled_edges.bottom)
insets.set_bottom(0);
gfx::Insets scaled_insets = gfx::ScaleToCeiledInsets(insets, scale);
window->SetDecorationInsets(&scaled_insets);

View File

@@ -46,6 +46,7 @@ class ElectronDesktopWindowTreeHostLinux
void OnBoundsChanged(const BoundsChange& change) override;
void OnWindowStateChanged(ui::PlatformWindowState old_state,
ui::PlatformWindowState new_state) override;
void OnWindowTiledStateChanged(ui::WindowTiledEdges new_tiled_edges) override;
// ui::NativeThemeObserver:
void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override;

View File

@@ -295,7 +295,7 @@ void ClientFrameViewLinux::OnPaint(gfx::Canvas* canvas) {
if (!frame_->IsFullscreen()) {
frame_provider_->PaintWindowFrame(canvas, GetLocalBounds(),
GetTitlebarBounds().bottom(),
ShouldPaintAsActive());
ShouldPaintAsActive(), tiled_edges());
}
}

View File

@@ -11,6 +11,7 @@
#include "base/scoped_observation.h"
#include "shell/browser/ui/views/frameless_view.h"
#include "ui/base/ui_base_types.h"
#include "ui/linux/linux_ui.h"
#include "ui/linux/nav_button_provider.h"
#include "ui/linux/window_button_order_observer.h"
@@ -39,6 +40,11 @@ class ClientFrameViewLinux : public FramelessView,
gfx::Insets GetInputInsets() const;
gfx::Rect GetWindowContentBounds() const;
SkRRect GetRoundedWindowContentBounds() const;
// Returns which edges of the frame are tiled.
const ui::WindowTiledEdges& tiled_edges() const { return tiled_edges_; }
void set_tiled_edges(ui::WindowTiledEdges tiled_edges) {
tiled_edges_ = tiled_edges;
}
protected:
// ui::NativeThemeObserver:
@@ -137,6 +143,8 @@ class ClientFrameViewLinux : public FramelessView,
window_button_order_observer_{this};
base::CallbackListSubscription paint_as_active_changed_subscription_;
ui::WindowTiledEdges tiled_edges_;
};
} // namespace electron