Update to Chromium version 118.0.5993.0 (#1192594)

This commit is contained in:
Marshall Greenblatt
2023-09-15 15:51:43 -04:00
parent 4df2933516
commit 27c6a4eabc
92 changed files with 571 additions and 527 deletions

View File

@ -12,10 +12,10 @@ 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 dc648ad1ae595..70698ed848990 100644
index 819da6b0bff94..b25a48fb2516b 100644
--- components/constrained_window/constrained_window_views.cc
+++ components/constrained_window/constrained_window_views.cc
@@ -101,15 +101,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
@@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
if (widget->HasCapture())
return;
@ -41,32 +41,32 @@ index dc648ad1ae595..70698ed848990 100644
return;
}
@@ -215,7 +224,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,
@@ -219,7 +228,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,
return views::DialogDelegate::CreateDialogWidget(
views::Widget* widget = views::DialogDelegate::CreateDialogWidget(
dialog, nullptr,
- manager->delegate()->GetWebContentsModalDialogHost()->GetHostView());
+ manager->delegate()->GetWebContentsModalDialogHost()->GetHostView(),
+ manager->delegate()->GetWebContentsModalDialogHost()->GetHostWidget());
}
views::Widget* CreateBrowserModalDialogViews(
@@ -232,8 +242,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
+ manager->delegate()->GetWebContentsModalDialogHost()->GetAcceleratedWidget());
widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -241,8 +251,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
gfx::NativeView parent_view =
parent ? CurrentClient()->GetDialogHostView(parent) : nullptr;
+ // Use with CEF windowless rendering.
+ gfx::AcceleratedWidget parent_widget =
+ parent ? gfx::kNullAcceleratedWidget :
+ CurrentClient()->GetModalDialogHost(parent)->GetHostWidget();
+ CurrentClient()->GetModalDialogHost(parent)->GetAcceleratedWidget();
views::Widget* widget =
- views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view);
+ views::DialogDelegate::CreateDialogWidget(dialog, nullptr, parent_view,
+ parent_widget);
bool requires_positioning = dialog->use_custom_frame();
@@ -246,8 +261,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -258,8 +273,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
if (!requires_positioning)
return widget;
@ -114,16 +114,16 @@ index 51ed6bcf6b540..9ae4737e0737e 100644
virtual gfx::NativeView GetHostView() const = 0;
+ // Returns the widget against which the dialog is positioned and parented.
+ // Used with CEF windowless rendering.
+ virtual gfx::AcceleratedWidget GetHostWidget() const {
+ virtual gfx::AcceleratedWidget GetAcceleratedWidget() const {
+ return gfx::kNullAcceleratedWidget; }
// Gets the position for the dialog in coordinates relative to the host view.
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 cd6fa368d3960..3a1f64fd295c7 100644
index 5a69839dd683d..b217b537eba4c 100644
--- ui/views/window/dialog_delegate.cc
+++ ui/views/window/dialog_delegate.cc
@@ -64,10 +64,12 @@ DialogDelegate::DialogDelegate() {
@@ -59,10 +59,12 @@ DialogDelegate::DialogDelegate() {
// static
Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
gfx::NativeWindow context,
@ -138,7 +138,7 @@ index cd6fa368d3960..3a1f64fd295c7 100644
widget->Init(std::move(params));
return widget;
}
@@ -76,17 +78,19 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
@@ -71,17 +73,19 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate,
Widget* DialogDelegate::CreateDialogWidget(
std::unique_ptr<WidgetDelegate> delegate,
gfx::NativeWindow context,
@ -162,7 +162,7 @@ index cd6fa368d3960..3a1f64fd295c7 100644
#else
return true;
#endif
@@ -97,14 +101,15 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
@@ -92,14 +96,15 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
WidgetDelegate* delegate,
gfx::NativeWindow context,
gfx::NativeView parent,
@ -180,7 +180,7 @@ index cd6fa368d3960..3a1f64fd295c7 100644
if (!dialog || dialog->use_custom_frame()) {
params.opacity = Widget::InitParams::WindowOpacity::kTranslucent;
@@ -117,6 +122,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
@@ -112,6 +117,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams(
}
params.context = context;
params.parent = parent;
@ -189,10 +189,10 @@ index cd6fa368d3960..3a1f64fd295c7 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 4d64cf4f40af7..1d77b1c152253 100644
index 083874eb3f0bc..2ccacfca7d413 100644
--- ui/views/window/dialog_delegate.h
+++ ui/views/window/dialog_delegate.h
@@ -97,13 +97,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
@@ -96,13 +96,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
// your use case.
static Widget* CreateDialogWidget(std::unique_ptr<WidgetDelegate> delegate,
gfx::NativeWindow context,
@ -214,7 +214,7 @@ index 4d64cf4f40af7..1d77b1c152253 100644
// Returns the dialog widget InitParams for a given |context| or |parent|.
// If |bounds| is not empty, used to initially place the dialog, otherwise
@@ -111,7 +116,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
@@ -110,7 +115,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {
static Widget::InitParams GetDialogWidgetInitParams(WidgetDelegate* delegate,
gfx::NativeWindow context,
gfx::NativeView parent,