[WebView/WebLayer Autofill] Trigger form submission on navigation
Renderer-side autofill sometimes sends the browser a notification that a form was *likely* submitted. WebView/WebLayer autofill currently handles this case as follows: - It records the fact that the event was received. - If a new form is seen by the renderer while the current form is still active in the browser, it considers the current form as having been submitted and informs the Android Autofill framework. This CL modifies this flow in order to support followup work that will reset the current form on navigation. The logic is now as follows: - When a navigation occurs, WV/WL Autofill's browser-side code checks whether (a) it has previously received a "form likely submitted" event from the renderer and (b) the current form has not subsequently been reset. If so, it considers the current form as having been submitted and informs the Android Autofill framework. Without this change, the followup work that resets the current form on navigation would break this flow entirely, as (naturally) a new form is seen by the renderer only *after* a navigation occurs. The practical impact of this change is that commit of a successful autofill session will occur sooner: on the navigation resulting from the successful submission rather than the next time that a form is seen (which can be arbitrarily later). This seems like a good thing. Bug: 1117563 Change-Id: I33dfa27b4bbf7e246e62273d3598eb0f30f1f722 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424144 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by:Michael Bai <michaelbai@chromium.org> Cr-Commit-Position: refs/heads/master@{#809710}
Showing
Please register or sign in to comment