[Autofill Assistant] Simplify ElementFinder.
This CL is a pure refactoring that aims to simplify ElementFinder by removing the current_match_arrays_ field. Instead, ElementFinder now stores all current matches in current_matches_. If a filter returns more than one match in a JS array, then this array will be directly resolved and the elements it contains will be added to current_matches_. This should make it easier to make ElementFinder return multiple elements matching a selector in the same order than they have in the document. See [1] for more background on why we would need that. [1] https://docs.google.com/document/d/167LaI_WQNr31wBuO3DNlCPD2sx3If2GOHpPsT4atXIk/ Change-Id: I859183d48e0ed85de111c6d7bf0a497363c4e230 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2510331 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@{#824046}
Showing
Please register or sign in to comment