mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 126.0.6478.17
This commit is contained in:
@ -12,16 +12,15 @@ 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 a2ca2f52148fd..7689d43ec9e0b 100644
|
||||
index 0ffc333329d4d..91b7567c123ac 100644
|
||||
--- components/constrained_window/constrained_window_views.cc
|
||||
+++ components/constrained_window/constrained_window_views.cc
|
||||
@@ -101,9 +101,18 @@ class WidgetModalDialogHostObserverViews : public views::WidgetObserver,
|
||||
@@ -101,10 +101,17 @@ class WidgetModalDialogHostObserverViews : public views::WidgetObserver,
|
||||
gfx::Rect GetModalDialogBounds(views::Widget* widget,
|
||||
web_modal::ModalDialogHost* dialog_host,
|
||||
const gfx::Size& size) {
|
||||
- views::Widget* const host_widget =
|
||||
- views::Widget::GetWidgetForNativeView(dialog_host->GetHostView());
|
||||
- CHECK(host_widget);
|
||||
+ // |host_view| will be nullptr with CEF windowless rendering.
|
||||
+ auto host_view = dialog_host->GetHostView();
|
||||
+ views::Widget* host_widget =
|
||||
@ -31,13 +30,13 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
|
||||
+ // size. This can happen on MacViews under the Cocoa browser where the window
|
||||
+ // modal dialogs are displayed as sheets, and their position is managed by a
|
||||
+ // ConstrainedWindowSheetController instance.
|
||||
+ if (!host_widget) {
|
||||
if (!host_widget) {
|
||||
- return gfx::Rect();
|
||||
+ return gfx::Rect(dialog_host->GetDialogPosition(size), size);
|
||||
+ }
|
||||
}
|
||||
|
||||
gfx::Point position = dialog_host->GetDialogPosition(size);
|
||||
// Align the first row of pixels inside the border. This is the apparent top
|
||||
@@ -111,43 +120,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget,
|
||||
@@ -113,43 +120,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget,
|
||||
position.set_y(position.y() -
|
||||
widget->non_client_view()->frame_view()->GetInsets().top());
|
||||
|
||||
@ -95,7 +94,7 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
|
||||
}
|
||||
|
||||
void UpdateModalDialogPosition(views::Widget* widget,
|
||||
@@ -158,15 +146,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
|
||||
@@ -160,15 +146,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
|
||||
return;
|
||||
}
|
||||
|
||||
@ -122,7 +121,7 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -282,8 +279,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -284,8 +279,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
|
||||
gfx::NativeView parent_view =
|
||||
parent ? CurrentClient()->GetDialogHostView(parent) : nullptr;
|
||||
@ -137,7 +136,7 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
|
||||
widget->SetNativeWindowProperty(
|
||||
views::kWidgetIdentifierKey,
|
||||
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
|
||||
@@ -299,8 +301,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -301,8 +301,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
if (!requires_positioning)
|
||||
return widget;
|
||||
|
||||
@ -147,7 +146,7 @@ index a2ca2f52148fd..7689d43ec9e0b 100644
|
||||
if (host) {
|
||||
DCHECK_EQ(parent_view, host->GetHostView());
|
||||
ModalDialogHostObserver* dialog_host_observer =
|
||||
@@ -313,10 +314,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
@@ -315,10 +314,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
|
||||
|
||||
views::Widget* ShowBrowserModal(std::unique_ptr<ui::DialogModel> dialog_model,
|
||||
gfx::NativeWindow parent) {
|
||||
|
Reference in New Issue
Block a user