-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix: enable autofill popups on mac #16308
< 8000 div class="gh-header-actions mt-0 mb-3 mb-md-2 ml-1 flex-md-order-1 flex-shrink-0 d-flex flex-items-center gap-1">New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f116517
feat: enable autofill popups on mac
brenca 83bd251
fix: make popup positioning better
brenca 774d126
fix: don't try to show popup when widget is closing or not visible
brenca cd93f86
fix: unify conditions
brenca 01c9011
refactor: use PopupViewCommon from chrome directly
brenca f946263
lint: mark constructor explicit
brenca a0f418c
fix: use a patch instead of dummy functions to make things compile on…
brenca be9f50d
chore: address review suggestions
brenca 8685356
Update atom/browser/ui/cocoa/views_delegate_mac.mm
nornagon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Heilig Benedek <benecene@gmail.com> | ||
Date: Wed, 30 Jan 2019 17:04:33 +0100 | ||
Subject: don't call into chrome internals for autofill popup size calculations | ||
|
||
The default GetWindowBounds calls into chrome internal functions to | ||
find out the size of the window - this can be overridden but even | ||
then some methods call into the original. Let's just return an empty | ||
gfx::Rect and do the actual job in the subclass. | ||
|
||
diff --git a/chrome/browser/ui/autofill/popup_view_common.cc b/chrome/browser/ui/autofill/popup_view_common.cc | ||
index 004e9cb86bee7c10f6a68cdf6ceb60bf39627e1d..c6da9a8f5c14615bf22192f540b6fd95fa1ccb0e 100644 | ||
--- a/chrome/browser/ui/autofill/popup_view_common.cc | ||
+++ b/chrome/browser/ui/autofill/popup_view_common.cc | ||
@@ -176,14 +176,14 @@ gfx::Rect PopupViewCommon::GetWindowBounds(gfx::NativeView container_view) { | ||
views::Widget::GetTopLevelWidgetForNativeView(container_view); | ||
if (widget) | ||
return widget->GetWindowBoundsInScreen(); | ||
- | ||
+#if 0 | ||
// If the widget is null, try to get these bounds from a browser window. This | ||
// is common on Mac when the window is drawn using Cocoa. | ||
gfx::NativeWindow window = platform_util::GetTopLevel(container_view); | ||
Browser* browser = chrome::FindBrowserWithWindow(window); | ||
if (browser) | ||
return browser->window()->GetBounds(); | ||
- | ||
+#endif | ||
// If the browser is null, simply return an empty rect. The most common reason | ||
// to end up here is that the NativeView has been destroyed externally, which | ||
// can happen at any time. This happens fairly commonly on Windows (e.g., at |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.