Update to Chromium version 123.0.6312.0 (#1262506)

- MacOS ARM64 Official builds are currently failing due to
  https://issues.chromium.org/issues/326898585
This commit is contained in:
Marshall Greenblatt
2024-02-22 13:36:15 -05:00
parent 2c5dd120c7
commit d4cf19db29
100 changed files with 837 additions and 799 deletions

View File

@ -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<void*>(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<void*>(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;
@ -127,19 +135,19 @@ index 3daf40d463e32..2d84ad7a43c96 100644
DCHECK_EQ(parent_view, host->GetHostView());
ModalDialogHostObserver* dialog_host_observer =
diff --git components/constrained_window/native_web_contents_modal_dialog_manager_views.cc components/constrained_window/native_web_contents_modal_dialog_manager_views.cc
index b986b7fa98c73..1000f529acc82 100644
index 2b495a8ab092c..01a28aca853d0 100644
--- components/constrained_window/native_web_contents_modal_dialog_manager_views.cc
+++ components/constrained_window/native_web_contents_modal_dialog_manager_views.cc
@@ -188,9 +188,20 @@ void NativeWebContentsModalDialogManagerViews::HostChanged(
@@ -190,9 +190,20 @@ void NativeWebContentsModalDialogManagerViews::HostChanged(
if (host_) {
host_->AddObserver(this);
- for (auto* widget : observed_widgets_) {
- for (views::Widget* widget : observed_widgets_) {
- views::Widget::ReparentNativeView(widget->GetNativeView(),
- host_->GetHostView());
+ // |host_view| will be nullptr with CEF windowless rendering.
+ if (auto host_view = host_->GetHostView()) {
+ for (auto* widget : observed_widgets_) {
+ for (views::Widget* widget : observed_widgets_) {
+#if defined(USE_AURA)
+ auto widget_view = widget->GetNativeView();
+ // Don't reparent between different root windows. Doing so causes
@ -170,7 +178,7 @@ index 51ed6bcf6b540..c6e1161140655 100644
virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0;
// Returns whether a dialog currently about to be shown should be activated.
diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc
index ed132b017f10e..590ab9760c36a 100644
index 992dbc606ab78..2361727757696 100644
--- ui/views/window/dialog_delegate.cc
+++ ui/views/window/dialog_delegate.cc
@@ -60,10 +60,12 @@ DialogDelegate::DialogDelegate() {
@ -239,7 +247,7 @@ index ed132b017f10e..590ab9760c36a 100644
// Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child
// widgets to prevent top-level window behavior (independent movement, etc).
diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h
index d0bd746875ed9..1643e6d841108 100644
index 6a2aace29d60d..d6d6292c10487 100644
--- ui/views/window/dialog_delegate.h
+++ ui/views/window/dialog_delegate.h
@@ -96,13 +96,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {