Skip to content

Commit

Permalink
Skip filling the trigger element if there's no value to fill
Browse files Browse the repository at this point in the history
Context given in
https://bugs.chromium.org/p/chromium/issues/detail?id=1500596#c1

(cherry picked from commit 44c7f68)

Bug: 1500596
Change-Id: I5ddb5d3be54d4345afd336122cc5e57c11a09a73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5019400
Auto-Submit: Jihad Hanna <jihadghanna@google.com>
Commit-Queue: Jihad Hanna <jihadghanna@google.com>
Reviewed-by: Dominic Battre <battre@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1222854}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5017948
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Commit-Queue: Prudhvikumar Bommana <pbommana@google.com>
Cr-Commit-Position: refs/branch-heads/6045@{#1306}
Cr-Branched-From: 905e8bd-refs/heads/main@{#1204232}
  • Loading branch information
jihadghanna authored and Chromium LUCI CQ committed Nov 11, 2023
1 parent 9ad0987 commit a1a750f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/autofill/content/renderer/form_autofill_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1108,15 +1108,15 @@ bool ShouldSkipFillField(const FormFieldData& field,
return true;
}

if (element == trigger_element) {
return false;
}

// Skip if there is no value to fill.
if (field.value.empty() || !field.is_autofilled) {
return true;
}

if (element == trigger_element) {
return false;
}

// Skip filling previously autofilled fields unless autofill is instructed to
// override it.
if (element.IsAutofilled() && !field.force_override) {
Expand Down

0 comments on commit a1a750f

Please sign in to comment.