[Autofill] Truncate filled credit card number part to intended length.
Currently, autofill::FillCreditCardNumberField() fills the complete rest of the credit card number from an offset calculated from the previous field's |max_length| attribute. The logic relies on the automatic truncation of the value. If the |max_length| value is changed in by JS in the meantime, autofill would fill the whole rest of the number and not only the intended portion. With this change, the value is already truncated by autofill. Change-Id: I7eef43d8abd83081e903bbdb0b12dc78846c9b4c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2190214 Auto-Submit: Matthias Körber <koerber@google.com> Commit-Queue: Dominic Battré <battre@chromium.org> Reviewed-by:Dominic Battré <battre@chromium.org> Reviewed-by:
Matthias Körber <koerber@google.com> Cr-Commit-Position: refs/heads/master@{#768765}
Showing
Please register or sign in to comment