Skip to content
Commit 5044830e authored by Eva's avatar Eva Committed by Chromium LUCI CQ
Browse files

[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: default avatarVidhan Jain <vidhanj@google.com>
Reviewed-by: default avatarMatthias Körber <koerber@google.com>
Reviewed-by: default avatarChristoph Schwering <schwering@google.com>
Cr-Commit-Position: refs/heads/main@{#919285}
parent 1645591d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment