This is the cherry pick merge for the M73 branch which was approved here: http://crbug.com/927204

[Autofill Assistant] Prompt only shows button if element exists

Before this patch, buttons were always displayed on prompt. That was
incomplete: it did not allow reproducing the behavior we currently have
between scripts where button appear as a result of DOM changes.

With this patch, prompt button reproduce the between-script behavior,
allowing buttons to be shown only conditionally.

Bug: 122825639
Change-Id: I53eee48156cac1f2e5f1b81dd86a48bb25566a0c
Reviewed-on: https://chromium-review.googlesource.com/c/1437084
Commit-Queue: Stephane Zermatten <szermatt@chromium.org>
Reviewed-by: Mathias Carlen <mcarlen@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#626943}(cherry picked from commit 97ac6fc29d0d6832c7329cdb103dfd74f4aee861)
Reviewed-on: https://chromium-review.googlesource.com/c/1448465
Reviewed-by: Stephane Zermatten <szermatt@chromium.org>
Cr-Commit-Position: refs/branch-heads/3683@{#109}
Cr-Branched-From: e51029943e0a38dd794b73caaf6373d5496ae783-refs/heads/master@{#625896}
3 files changed