• Moe Ahmadi's avatar
    [AF] Do not discard form data after dynamic form submission · e93874be
    Moe Ahmadi authored
    Prior to this change form data were being discarded after a dynamic form
    submission. This was because the dynamically changed form was being added
    to the cache with its user entered/autofilled values. At the time of
    submission, form data were being discarded as they were thought to be the
    initial values of the fields at page load. This CL changes
    AutofillHandler::OnFormsSeen (which is called on dynamic form changes) to
    attempt to find a previously cached version of the form first. Prior to
    addition to the cache, form values are overridden by the cached values.
    This prevents those values from getting confused with the initial form
    values at the time of submission.
    
    Bug: 863954
    
    Change-Id: Iba4771ee87b9777e66a6b10b6b369379dc123a46
    Reviewed-on: https://chromium-review.googlesource.com/1137021
    Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
    Reviewed-by: default avatarSebastien Seguin-Gagnon <sebsg@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#577033}
    e93874be
autofill_uitest_util.h 962 Bytes