commit | 9a635ea028a8ab28dd1e05536188fec76e2f1072 | [log] [tgz] |
---|---|---|
author | Nektarios Paisios <nektar@chromium.org> | Mon Jun 17 19:49:01 2019 |
committer | Nektarios Paisios <nektar@chromium.org> | Mon Jun 17 19:49:01 2019 |
tree | 5e246999deab887dc3e2c913e23f52fe84f3927b | |
parent | 1bcb622eb21b876b3a27352fece49e1d58cebfd1 [diff] |
Introduces a workaround for a hung that occurs when using autofill with accessibility When Chromium automatically places an autofill suggestion in a text field, the value attribute of the text field does not update immediately. Even though the value update should have been sent to the renderer, the accessibility tree on the browser doesn't update as soon as the autofill suggestion has been committed. As a result, on Windows and Linux ATK, the text field's hypertext is empty, because it is retrieved directly from the text field's value. However, the user-agent shadow DOM inside the text field contains a static text object with the autofill suggestion that has just been committed, whose hypertext is not empty. When computing a parent equivalent position from an AXPosition after the static text object that represents the autofill suggestion, a position that is in the text field is correctly returned. However, that position's text offset now holds a seemingly invalid value, because according to the hypertext of the text field, the field should contain no text. This breaks all the comparison operators in AXPosition, because the above results in an infinit loop in the CompareTo method. The proper fix is to update the hypertext of the text field in AXPlatformNodeBase to include the text of any autofill suggestion, (committed or uncommitted). Alternatively the value attribute should be updated as soon as an autofill suggestion is committed. However, both of this fixes are risky for M75. A workaround has been introduced that tries to detect invalid text offsets in AXPosition::CreateParentPosition, and return a position at the start of the text node instead. R=aleventhal@chromium.org, frpoole@microsoft.com (cherry picked from commit d4b62c604f890e756a1cd71b2f3ec1816f1753d2) Bug: 973722 Change-Id: I3786ee0cf9f0e9d83efc15c14702f242a8ba7851 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1661548 Auto-Submit: Nektarios Paisios <nektar@chromium.org> Commit-Queue: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#669506} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662710 Reviewed-by: Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/branch-heads/3770@{#1028} Cr-Branched-From: a9eee1c7c727ef42a15d86e9fa7b77ff0e63840a-refs/heads/master@{#652427}
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 .