[Autofill] Iterate through cached fields in HasPasswordField()
To find password fields, HasPasswordField() currently iterates through the whole DOM, which is expensive and accounts for ~15% of Autofill's full DOM traversals according to preliminary testing. In this change we modify this function to iterate through the fields of the forms and the unowned fields, both of which are cached in the Document. Bug: 1201875 Change-Id: If986ab96c708d02532091f77911ca1066d3df6db Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3141871 Commit-Queue: Eva Herencsárová <evih@google.com> Reviewed-by:Vidhan Jain <vidhanj@google.com> Reviewed-by:
Matthias Körber <koerber@google.com> Reviewed-by:
Christoph Schwering <schwering@google.com> Cr-Commit-Position: refs/heads/main@{#919285}
Loading
Please register or sign in to comment