Text fields should be focused before trying to retrieve their selection When a selection is made on an <input> or a <textarea> element via the DOM selection APIs, the APIs do not expose the selection visually if the text field is not focused. If a selection is made, while the field is not focused the selection is cached and made available when the field gets focus. This patch ensures that the same constraint is observed when using chrome.automation. The new AXSelection code is made to work as closely as possible to how the DOM selection API works, so this patch will make it easier to switch to the new code. For consistency in the same test file, also focuses the combo box before retrieving its active descendant. R=dtseng@chromium.org, dmazzoni@chromium.org Bug: 639340 Change-Id: I9813c7aa4af65991177bafd34f6606303fee2d1f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1536147 Commit-Queue: Nektarios Paisios <nektar@chromium.org> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#644981}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .