Skip to content

Commit 960a31e

Browse files
author
Maura Winstanley
committed
change name of addresses autofill to general
1 parent 2615d9f commit 960a31e

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

specs/Autofill.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Background
2-
The WebView2 team has been asked for an API to allow end developers to set the autofill preferences. We are exposing two of the autofill preferences that will allow enabling and disabling autofill for addresses and passwords. Addresses includes things like email addresses, shipping addresses, phone numbers, and names. Passwords includes things like usernames and passwords for login.
2+
The WebView2 team has been asked for an API to allow end developers to set the autofill preferences. We are exposing two of the autofill preferences that will allow enabling and disabling general and password autofill. General autofill includes things like email addresses, shipping addresses, phone numbers, and names. Password autofill includes things like usernames and passwords for login.
33

44
In this document we describe the updated API. We'd appreciate your feedback.
55

66

77
# Description
88

99
Autofilling has three components
10-
* Autostuffing - Filling the corresponding form fields automatically on page load.
11-
* Suggesting - When the user clicks on the form field, drop down suggestions of previously saved forms will be displayed.
12-
* Populating - When clicking on one of the suggestions, the form data will populate the respective fields.
10+
* Autostuffing - Filling the corresponding form fields automatically on page load
11+
* Suggesting - When the user clicks on the form field, drop down suggestions of previously saved forms will be displayed
12+
* Populating - When clicking on one of the suggestions, the form data will populate the respective fields
1313

1414

1515
# Examples
@@ -24,12 +24,12 @@ void SettingsComponent::TogglePasswordAutofill() {
2424
settings->put_IsPasswordAutofillEnabled(!enabled);
2525
}
2626

27-
void SettingsComponent::ToggleAddressAutofill() {
27+
void SettingsComponent::ToggleGeneralAutofill() {
2828
wil::com_ptr<ICoreWebView2Settings2_2> settings;
2929
webView->get_Settings(&settings);
3030
bool enabled;
31-
settings->get_IsAddressAutofillEnabled(&enabled)
32-
settings->put_IsAddressAutofillEnabled(!enabled);
31+
settings->get_IsGeneralAutofillEnabled(&enabled)
32+
settings->put_IsGeneralAutofillEnabled(!enabled);
3333
}
3434
```
3535

@@ -43,39 +43,39 @@ private void TogglePasswordAutofill(CoreWebView2 sender, CoreWebView2NavigationS
4343
settings.IsPasswordAutofillEnabled = !settings.IsPasswordAutofillEnabled;
4444
}
4545

46-
webView2Control.NavigationStarting += ToggleAddressAutofill;
46+
webView2Control.NavigationStarting += ToggleGeneralAutofill;
4747

48-
private void ToggleAddressAutofill(CoreWebView2 sender, CoreWebView2NavigationStartingEventArgs e)
48+
private void ToggleGeneralAutofill(CoreWebView2 sender, CoreWebView2NavigationStartingEventArgs e)
4949
{
5050
var settings = webView2Control.CoreWebView2.Settings;
51-
settings.IsAddressAutofillEnabled = !settings.IsAddressAutofillEnabled;
51+
settings.IsGeneralAutofillEnabled = !settings.IsGeneralAutofillEnabled;
5252
}
5353

5454
```
5555

5656

5757
# Remarks
58-
The behaviour of the two types of autofill preferences behaves differently when toggling between enable and disable.
59-
If address autofill is enabled:
60-
* Address data will be saved
61-
* Upon clicking on the form field, suggestions will appear
62-
* Clicking on one of the suggestions will populate the corresponding fields
58+
The two types of autofill preferences behave differently when toggling between enable and disable.
59+
If general autofill is enabled:
60+
* General data will be saved
61+
* Upon clicking on the form field, suggestions will appear.
62+
* Clicking on one of the suggestions will populate the corresponding fields.
6363

64-
If address autofill is disabled
65-
* No new address data will be saved
66-
* Upon clicking on the form field, suggestions will not appear
64+
If general autofill is disabled
65+
* No new general data will be saved.
66+
* Upon clicking on the form field, suggestions will not appear.
6767

6868
If password autofill is enabled
69-
* Password data will be autostuffed
70-
* Upon clicking on the form field, suggestions will appear
71-
* Clicking on one of the suggestions will populate the corresponding fields
72-
* Upon submitting the password data, a save password prompt will be displayed that will give the user the option to save or update the password data. If the user selects `Yes`, the new password data will be saved or updated depending on if they have previously entered password data while password autofill is enabled
69+
* Password data will be autostuffed.
70+
* Upon clicking on the form field, suggestions will appear.
71+
* Clicking on one of the suggestions will populate the corresponding fields.
72+
* Upon submitting the password data, a save password prompt will be displayed that will give the user the option to save or update the password data. If the user selects `Yes`, the new password data will be saved or updated depending on if they have previously entered password data while password autofill is enabled.
7373

7474
If password autofill is disabled
75-
* The password data will be autostuffed
76-
* Upon clicking on the form field, suggestions will appear
77-
* Clicking on one of the suggestions will populate the corresponding fields
78-
* Upon submitting the password data, no save password prompt will be displayed and no password information is saved or updated
75+
* The password data will be autostuffed.
76+
* Upon clicking on the form field, suggestions will appear.
77+
* Clicking on one of the suggestions will populate the corresponding fields.
78+
* Upon submitting the password data, no save password prompt will be displayed and no password information is saved or updated.
7979

8080

8181
# API Notes
@@ -94,11 +94,11 @@ interface ICoreWebView2Settings2_2 : ICoreWebView2Settings2 {
9494
// Set the IsPasswordAutofillEnabled property.
9595
[propput] HRESULT IsPasswordAutofillEnabled([in] BOOL isPasswordAutofillEnabled);
9696
97-
/// IsAddressAutofillEnabled controls whether autofill for addresses is enabled.
97+
/// IsGeneralAutofillEnabled controls whether general autofill is enabled.
9898
/// The default value is `TRUE`.
99-
[propget] HRESULT IsAddressAutofillEnabled([out, retval] BOOL* isAddressAutofillEnabled);
100-
/// Set the IsAddressAutofillEnabled property.
101-
[propput] HRESULT IsAddressAutofillEnabled([in] BOOL isAddressAutofillEnabled);
99+
[propget] HRESULT IsGeneralAutofillEnabled([out, retval] BOOL* isGeneralAutofillEnabled);
100+
/// Set the IsGeneralAutofillEnabled property.
101+
[propput] HRESULT IsGeneralAutofillEnabled([in] BOOL isGeneralAutofillEnabled);
102102
}
103103
```
104104
## .NET and WinRT
@@ -108,7 +108,7 @@ namespace Microsoft.Web.WebView2.Core
108108
public partial class CoreWebView2Settings
109109
{
110110
public bool IsPasswordAutofillEnabled { get; set; };
111-
public bool IsAddressAutofillEnabled {get; set; };
111+
public bool IsGeneralAutofillEnabled {get; set; };
112112
}
113113
}
114114

0 commit comments

Comments
 (0)