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
|
@ -586,7 +586,7 @@ void WebContents::SetContentsBounds(content::WebContents* source,
|
|||
|
||||
void WebContents::CloseContents(content::WebContents* source) {
|
||||
Emit("close");
|
||||
#if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
HideAutofillPopup();
|
||||
#endif
|
||||
if (managed_web_contents())
|
||||
|
@ -1015,7 +1015,7 @@ void WebContents::DevToolsClosed() {
|
|||
Emit("devtools-closed");
|
||||
}
|
||||
|
||||
#if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
void WebContents::ShowAutofillPopup(content::RenderFrameHost* frame_host,
|
||||
const gfx::RectF& bounds,
|
||||
const std::vector<base::string16>& values,
|
||||
|
@ -1063,7 +1063,7 @@ bool WebContents::OnMessageReceived(const IPC::Message& message,
|
|||
FrameDispatchHelper::OnSetTemporaryZoomLevel)
|
||||
IPC_MESSAGE_FORWARD_DELAY_REPLY(AtomFrameHostMsg_GetZoomLevel, &helper,
|
||||
FrameDispatchHelper::OnGetZoomLevel)
|
||||
#if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
|
||||
#if defined(TOOLKIT_VIEWS)
|
||||
IPC_MESSAGE_HANDLER(AtomAutofillFrameHostMsg_ShowPopup, ShowAutofillPopup)
|
||||
IPC_MESSAGE_HANDLER(AtomAutofillFrameHostMsg_HidePopup, HideAutofillPopup)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue