fix: enable autofill popups on mac (#16308)
* feat: enable autofill popups on mac * fix: make popup positioning better * fix: don't try to show popup when widget is closing or not visible * fix: unify conditions * refactor: use PopupViewCommon from chrome directly * lint: mark constructor explicit * fix: use a patch instead of dummy functions to make things compile on Windows * chore: address review suggestions * Update atom/browser/ui/cocoa/views_delegate_mac.mm Co-Authored-By: brenca <benecene@gmail.com>
This commit is contained in:
parent
36ce3e9546
commit
ccc60a1f33
11 changed files with 97 additions and 142 deletions
|
@ -41,27 +41,6 @@ bool CommonWebContentsDelegate::HandleKeyboardEvent(
|
|||
return false;
|
||||
}
|
||||
|
||||
void CommonWebContentsDelegate::ShowAutofillPopup(
|
||||
content::RenderFrameHost* frame_host,
|
||||
content::RenderFrameHost* embedder_frame_host,
|
||||
bool offscreen,
|
||||
const gfx::RectF& bounds,
|
||||
const std::vector<base::string16>& values,
|
||||
const std::vector<base::string16>& labels) {
|
||||
if (!owner_window())
|
||||
return;
|
||||
|
||||
auto* window = static_cast<NativeWindowViews*>(owner_window());
|
||||
autofill_popup_->CreateView(frame_host, embedder_frame_host, offscreen,
|
||||
window->content_view(), bounds);
|
||||
autofill_popup_->SetItems(values, labels);
|
||||
}
|
||||
|
||||
void CommonWebContentsDelegate::HideAutofillPopup() {
|
||||
if (autofill_popup_)
|
||||
autofill_popup_->Hide();
|
||||
}
|
||||
|
||||
gfx::ImageSkia CommonWebContentsDelegate::GetDevToolsWindowIcon() {
|
||||
if (!owner_window())
|
||||
return gfx::ImageSkia();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue