0

[Autofill] Put submission-detection fix behind a feature.

Bug: 1275772
Change-Id: Ie36bd6a5707d243c116b5c8a45acdf129ac7b589
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3314767
Commit-Queue: Christoph Schwering <schwering@google.com>
Commit-Queue: Dominic Battré <battre@chromium.org>
Auto-Submit: Christoph Schwering <schwering@google.com>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/main@{#948233}
This commit is contained in:
Christoph Schwering
2021-12-03 23:50:53 +00:00
committed by Chromium LUCI CQ
parent 2cf918537f
commit f201c80a46
3 changed files with 13 additions and 3 deletions
components/autofill

@ -555,10 +555,11 @@ void AutofillAgent::FillOrPreviewForm(int32_t id,
bool filled_some_fields =
!form_util::FillOrPreviewForm(form, element_, action).empty();
if (!element_.Form().IsNull())
if (!element_.Form().IsNull()) {
UpdateLastInteractedForm(element_.Form());
else
} else {
formless_elements_were_autofilled_ |= filled_some_fields;
}
// TODO(crbug.com/1198811): Inform the BrowserAutofillManager about the
// fields that were actually filled. It's possible that the form has changed
@ -1274,7 +1275,9 @@ absl::optional<FormData> AutofillAgent::GetSubmittedForm() const {
} else if (provisionally_saved_form_.has_value()) {
return absl::make_optional(provisionally_saved_form_.value());
}
} else if (formless_elements_were_autofilled_ ||
} else if ((base::FeatureList::IsEnabled(
features::kAutofillRecordMetricsOfUnownedForms) &&
formless_elements_were_autofilled_) ||
(formless_elements_user_edited_.size() != 0 &&
!form_util::IsSomeControlElementVisible(
render_frame()->GetWebFrame(),

@ -331,6 +331,11 @@ const base::Feature kAutofillProfileImportFromUnfocusableFields{
const base::Feature kAutofillProfileServerValidation{
"AutofillProfileServerValidation", base::FEATURE_DISABLED_BY_DEFAULT};
// Controls if the heuristic field parsing utilizes shared labels.
// TODO(crbug/1275772): Remove if no negative consequences observed.
const base::Feature kAutofillRecordMetricsOfUnownedForms{
"AutofillRecordMetricsOfUnownedForms", base::FEATURE_DISABLED_BY_DEFAULT};
// Controls whether or not overall prediction are retrieved from the cache.
const base::Feature kAutofillRetrieveOverallPredictionsFromCache{
"AutofillRetrieveOverallPredictionsFromCache",

@ -128,6 +128,8 @@ extern const base::Feature kAutofillProfileImportFromUnfocusableFields;
COMPONENT_EXPORT(AUTOFILL)
extern const base::Feature kAutofillProfileServerValidation;
COMPONENT_EXPORT(AUTOFILL)
extern const base::Feature kAutofillRecordMetricsOfUnownedForms;
COMPONENT_EXPORT(AUTOFILL)
extern const base::Feature kAutofillRetrieveOverallPredictionsFromCache;
COMPONENT_EXPORT(AUTOFILL) extern const base::Feature kAutofillSaveAndFillVPA;
COMPONENT_EXPORT(AUTOFILL)