Skip to content
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

Chromium: Make password saving option independent from autofill option in Privacy settings #1738

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haanhvu
Copy link
Collaborator

@haanhvu haanhvu commented Jan 30, 2025

Chromium: Make password saving option independent from autofill option in Privacy settings

Currently in Privacy settings in Chromium backend, the password saving option depends on the autofill option. If autofill is disabled, password saving doesn't work whether enabled or not. This is because Chromium doesn't provide an autofill option but provides a login selection dialog that asks users whether to autofill the saved password in each login. This commit makes password saving option independent from autofill option. The autofill option now only affects whether to show login selection dialog or not.

Fixes #1707

…n in Privacy settings

Currently in Privacy settings in Chromium backend, the password saving option depends on the autofill option. If autofill is disabled, password saving doesn't work whether enabled or not. This is because Chromium doesn't provide an autofill option but provides a login selection dialog that asks users whether to autofill the saved password or not. This commit makes password saving option independent from autofill option. The autofill option now only affects whether to show login selection dialog or not.

Fixes Igalia#1707
for (int i = 0; i < forms.length; i++) {
options[i] = new WAutocomplete.LoginSelectOption(fromPasswordForm(forms[i]));
}
if (showLoginSelectDialog) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can leave most of the code unchanged and the change more compact if you invert the condition

if (!showLoginSelectionDialog)
 return false;

for (int i = 0; i < username.length; i++) {
options[i] = new WAutocomplete.LoginSelectOption(fromUsername(i, username[i]));
}
if (showLoginSelectDialog) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

// Instead, it provides a login selection dialog that let users decide whether to autofill the saved password or not.
// We'll only show this dialog if users enable autofill.
showLoginSelectDialog = SettingsStore.getInstance(context).isAutoFillEnabled();
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct. For Gecko it'll return true unconditionally even if autofill is disabled.

@svillar svillar added the chromium Issues related to the new Chromium backend label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chromium Issues related to the new Chromium backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabling 'auto-fill' causes that the 'save-password' dialog is not launched anymore
2 participants