From 40272b5bc5890fc897011f81ee4e6f86e2f7ece9 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 22 Feb 2024 17:24:43 -0500 Subject: [PATCH] Update to Chromium version 122.0.6261.69 --- CHROMIUM_BUILD_COMPATIBILITY.txt | 2 +- patch/patches/chrome_browser.patch | 6 +-- .../chrome_browser_dialogs_widget.patch | 54 +++++++++++-------- patch/patches/chrome_browser_profiles.patch | 4 +- patch/patches/content_2015.patch | 4 +- patch/patches/light_mode_3534.patch | 10 ++-- 6 files changed, 44 insertions(+), 36 deletions(-) diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 428593368..bd9db48ac 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,6 +7,6 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'refs/tags/122.0.6261.29', + 'chromium_checkout': 'refs/tags/122.0.6261.69', 'depot_tools_checkout': '10bd39fd47' } diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 1c88f6d66..f29d48b3b 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index 0e613a31e6a42..93762ff8b7adb 100644 +index 0811d62fd215d..78d10d7f1e658 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni") @@ -10,7 +10,7 @@ index 0e613a31e6a42..93762ff8b7adb 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") -@@ -2025,6 +2026,7 @@ static_library("browser") { +@@ -2029,6 +2030,7 @@ static_library("browser") { "//build/config/chromebox_for_meetings:buildflags", "//build/config/compiler:compiler_buildflags", "//cc", @@ -18,7 +18,7 @@ index 0e613a31e6a42..93762ff8b7adb 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2679,6 +2681,10 @@ static_library("browser") { +@@ -2683,6 +2685,10 @@ static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_dialogs_widget.patch b/patch/patches/chrome_browser_dialogs_widget.patch index d1c2ff707..19cf456b7 100644 --- a/patch/patches/chrome_browser_dialogs_widget.patch +++ b/patch/patches/chrome_browser_dialogs_widget.patch @@ -12,7 +12,7 @@ index b169371e4d42f..509e4bda85b47 100644 // on the screen, we can't actually attach to it. parent_window = nullptr; diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc -index 3daf40d463e32..2d84ad7a43c96 100644 +index 7eda0c852bb51..744452bf6c00c 100644 --- components/constrained_window/constrained_window_views.cc +++ components/constrained_window/constrained_window_views.cc @@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget, @@ -41,37 +41,45 @@ index 3daf40d463e32..2d84ad7a43c96 100644 return; } -@@ -123,36 +132,22 @@ void UpdateModalDialogPosition(views::Widget* widget, +@@ -123,44 +132,22 @@ void UpdateModalDialogPosition(views::Widget* widget, position.set_y(position.y() - widget->non_client_view()->frame_view()->GetInsets().top()); - gfx::Rect dialog_bounds(position, size); - if (widget->is_top_level() && SupportsGlobalScreenCoordinates()) { -- const gfx::Rect initial_dialog_bounds = +- gfx::Rect dialog_screen_bounds = - dialog_bounds + - host_widget->GetClientAreaBoundsInScreen().OffsetFromOrigin(); -- const gfx::Rect initial_host_bounds = -- host_widget->GetWindowBoundsInScreen(); +- const gfx::Rect host_screen_bounds = host_widget->GetWindowBoundsInScreen(); - - // TODO(crbug.com/1341530): The requested dialog bounds should never fall - // outside the bounds of the transient parent. -- DCHECK(initial_dialog_bounds.Intersects(initial_host_bounds)); +- DCHECK(dialog_screen_bounds.Intersects(host_screen_bounds)); - -- // We should not show a window-modal dialog for a window that exists outside -- // the bounds of the screen. This risks the modal window becoming -- // effectively deadlocked as controls to dismiss the dialog may become -- // inaccessible. -- // It is also insufficient to reposition only the dialog but not the host -- // window as many systems will clip child dialogs to their transient -- // parents. Further, if the window-constrained dialog is visually -- // disassociated with its parent window it may be difficult to discern which -- // window the dialog is modal to. -- host_widget->SetBoundsConstrained(initial_host_bounds); -- const gfx::Rect adjusted_host_bounds = -- host_widget->GetClientAreaBoundsInScreen(); -- dialog_bounds += adjusted_host_bounds.OffsetFromOrigin(); -- dialog_bounds.AdjustToFit(adjusted_host_bounds); +- // Adjust the dialog bound to ensure it remains visible on the display. +- const gfx::Rect display_work_area = +- display::Screen::GetScreen() +- ->GetDisplayNearestView(dialog_host->GetHostView()) +- .work_area(); +- if (!display_work_area.Contains(dialog_screen_bounds)) { +- dialog_screen_bounds.AdjustToFit(display_work_area); +- } +- +- // For platforms that clip transient children to the viewport we must +- // maximize its bounds on the display whilst keeping it within the host +- // bounds to avoid viewport clipping. +- // In the case that the host window bounds do not have sufficient overlap +- // with the display, and the dialog cannot be shown in its entirety, this is +- // a recoverable state as users are still able to reposition the host window +- // back onto the display. +- if (PlatformClipsChildrenToViewport() && +- !host_screen_bounds.Contains(dialog_screen_bounds)) { +- dialog_screen_bounds.AdjustToFit(host_screen_bounds); +- } +- +- // Readjust the position of the dialog. +- dialog_bounds.set_origin(dialog_screen_bounds.origin()); + position += host_widget->GetClientAreaBoundsInScreen().OffsetFromOrigin(); + // If the dialog extends partially off any display, clamp its position to + // be fully visible within that display. If the dialog doesn't intersect @@ -91,7 +99,7 @@ index 3daf40d463e32..2d84ad7a43c96 100644 } } // namespace -@@ -234,7 +229,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, +@@ -242,7 +229,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, views::Widget* widget = views::DialogDelegate::CreateDialogWidget( dialog, nullptr, @@ -101,7 +109,7 @@ index 3daf40d463e32..2d84ad7a43c96 100644 widget->SetNativeWindowProperty( views::kWidgetIdentifierKey, const_cast(kConstrainedWindowWidgetIdentifier)); -@@ -256,8 +252,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, +@@ -264,8 +252,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, gfx::NativeView parent_view = parent ? CurrentClient()->GetDialogHostView(parent) : nullptr; @@ -116,7 +124,7 @@ index 3daf40d463e32..2d84ad7a43c96 100644 widget->SetNativeWindowProperty( views::kWidgetIdentifierKey, const_cast(kConstrainedWindowWidgetIdentifier)); -@@ -273,8 +274,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, +@@ -281,8 +274,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, if (!requires_positioning) return widget; diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index c6f350629..6ddbcbbfd 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -84,10 +84,10 @@ index 4bf4b36f01890..b8a966db377db 100644 // Returns whether the user has signed in this profile to an account. diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc -index c70593cc14b9d..df5ba6a9432da 100644 +index 2053d5f674454..a5b4acf5f764a 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc -@@ -1020,7 +1020,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, +@@ -1023,7 +1023,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, otr_profiles_[otr_profile_id] = std::move(otr_profile); diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 5802e3bfc..348fc12e5 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -12,10 +12,10 @@ index b7430b7d7027f..721144dde86d8 100644 version.Set("V8-Version", V8_VERSION_STRING); std::string host = info.GetHeaderValue("host"); diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index 5da07b9eff248..72fc63ba456c5 100644 +index ce2f6dd6cf971..f97e9f4b1acb3 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -751,6 +751,22 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() { +@@ -757,6 +757,22 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() { : nullptr, &loader_factory); diff --git a/patch/patches/light_mode_3534.patch b/patch/patches/light_mode_3534.patch index f6f6fc6f7..f5a4e5097 100644 --- a/patch/patches/light_mode_3534.patch +++ b/patch/patches/light_mode_3534.patch @@ -32,7 +32,7 @@ index 6b9d2c180c904..3570ef071ba07 100644 return (dark_mode_support.allow_dark_mode_for_app || dark_mode_support.set_preferred_app_mode) && diff --git ui/native_theme/native_theme_mac.mm ui/native_theme/native_theme_mac.mm -index be2f769afe2d1..51bcf353b8797 100644 +index b9feac1c87c51..f424127723c1a 100644 --- ui/native_theme/native_theme_mac.mm +++ ui/native_theme/native_theme_mac.mm @@ -50,6 +50,13 @@ bool InvertedColors() { @@ -49,7 +49,7 @@ index be2f769afe2d1..51bcf353b8797 100644 } // namespace // Helper object to respond to light mode/dark mode changeovers. -@@ -594,11 +601,15 @@ void NativeThemeMac::PaintSelectedMenuItem( +@@ -577,11 +584,15 @@ void NativeThemeMac::PaintSelectedMenuItem( void NativeThemeMac::InitializeDarkModeStateAndObserver() { __block auto theme = this; @@ -68,10 +68,10 @@ index be2f769afe2d1..51bcf353b8797 100644 theme->NotifyOnNativeThemeUpdated(); }]; diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc -index 6af4df92820d5..c2ae96510d011 100644 +index 50647269ec84f..c947bd2717d04 100644 --- ui/native_theme/native_theme_win.cc +++ ui/native_theme/native_theme_win.cc -@@ -653,14 +653,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const { +@@ -662,14 +662,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const { // Windows high contrast modes are entirely different themes, // so let them take priority over dark mode. // ...unless --force-dark-mode was specified in which case caveat emptor. @@ -91,7 +91,7 @@ index 6af4df92820d5..c2ae96510d011 100644 return NativeTheme::CalculatePreferredColorScheme(); // According to the spec, the preferred color scheme for web content is 'dark' -@@ -1651,8 +1654,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() { +@@ -1660,8 +1663,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() { } void NativeThemeWin::UpdateDarkModeStatus() {