[Autofill Assistant] Make ElementFinder matches ordered.
This CL refactors ElementFinder so that the elements it matches have the same order than in the document. This is done with 2 changes: 1) Elements matched by the css_selector filter are now added in the same order than the parent element that was used to query the selector. 2) The results of the background tasks are now added in current_matches_ in the same order than the parent element that was used as the root of the background task. I will add relevant browser tests once we can easily check multiple matching elements (i.e. either via a new pick_at filter or getting the outerHTML of multiple elements). Change-Id: If1f7098d3467461a39a3b34773f1e02db0a73069 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517577 Commit-Queue: Jordan Demeulenaere <jdemeulenaere@chromium.org> Reviewed-by:Sandro Maggi <sandromaggi@google.com> Reviewed-by:
Stephane Zermatten <szermatt@chromium.org> Cr-Commit-Position: refs/heads/master@{#824789}
Loading
Please register or sign in to comment