Compare commits

...

2 Commits

Author SHA1 Message Date
Jacobo Aragunde Pérez 6459917c0a Fix index out of bounds with dialog accept_types description (fixes #3779) 2024-09-16 09:08:22 +00:00
Nik Pavlov b90f0048da Account for overlay host Widget in CefWidget::GetForWidget (fixes #3784) 2024-09-16 09:05:42 +00:00
2 changed files with 6 additions and 1 deletions

View File

@ -515,7 +515,9 @@ CefFileDialogManager::MaybeRunDelegate(
ext_str += FilePathTypeToString16(FILE_PATH_LITERAL(".") + ext);
}
accept_extensions.push_back(ext_str);
accept_descriptions.push_back(descriptions[i]);
if (descriptions.size() == extensions.size()) {
accept_descriptions.push_back(descriptions[i]);
}
}
}

View File

@ -42,6 +42,9 @@ CefWidget* CefWidget::GetForWidget(views::Widget* widget) {
if (auto window = view_util::GetWindowFor(widget)) {
if (auto* window_view =
static_cast<CefWindowImpl*>(window.get())->cef_window_view()) {
if (auto widget_view = view_util::GetHostView(widget)) {
widget = widget_view->GetWidget();
}
if (window_view->IsChromeStyle()) {
return static_cast<ChromeBrowserFrame*>(widget);
}