[AF][IOS] Scan page for form changes when a field is focused

This CL fixes a regression caused by crrev.com/c/1012979. Previously,
AutofillAgent would scan the whole page on form activities due to the
possiblity of Autofill having been enabled after page load.
crrev.com/c/1012979 replaced that logic in favor of observing the Pref
directly. This has a side effect where previously hidden fields can go
unnoticed by AutofillManager. This CL fixes that regression by scanning the
page when a field is focused. All fields receive focuse before their value
is set by Autofill, therefore, AutofillManager can get notified of
previously hidden fields.

Bug: 855696
Change-Id: I175bf90e12d1ca356b746e6347943a295063c288
Reviewed-on: https://chromium-review.googlesource.com/1112493
Reviewed-by: Olivier Robin <olivierrobin@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570713}
1 file changed