| commit | 087b684a6ecec5e4e71bc8ea415ce16b35b5c68c | [log] [tgz] |
|---|---|---|
| author | Benjamin Beaudry <bebeaudr@microsoft.com> | Fri Feb 07 20:33:32 2020 |
| committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 07 20:33:32 2020 |
| tree | 4c89162b5baf98000b74d5865a5b3a2f111df13b | |
| parent | 56bcbbe34cba6adefd0f5e347ebbe01fd79bea4a [diff] |
Fix AXLayoutObject::IsEditable for selectors (e.g., ::before) For a specific range, AXPlatformNodeTextRangeProvider::GetAttributeValue returns the attribute value found in all of its subranges. For example, if we query the read-only attribute for a range composed of two subranges, we are going to query the read-only attribute of the two different subrange. If the value is true in both subranges, true will be returned. Otherwise, if the value is different, an unknown value will be returned. An issue exists with rich text fields. Because the rich text field accessible node can have children, it can have subranges. That means that, when we query the read-only attribute for a rich text field, we look for the read-only value of all of its children. It is thus extra important that the appropriate properties describing the editable state of the text field node are propagated to its children node. Working on this issue, I discovered that the editable properties are not propagated to its children that are selectors, like the ::before selector. It works fine for other children however. This CL fixes this issue by modifying the implementation of AXLayoutObject::GetNodeOrContainingBlockNode, called by AXLayoutObject::IsEditable and AXLayoutObject::IsRichlyEditable. I also took the liberty to fix a test I added in another CL related to the read-only attribute. The test in itself had no issue for the moment, but would have as soon as someone else would have modified it. The error message was not helpful and I spent some time investigating it. To avoid to waste someone else's time like I did, I fixed it. For more info, see the changes made to ax_platform_node_textrangeprovider_win_unittest.cc. In short: - We now pass down the editable properties all children of an editable node. - I added a dump test for this scenario. - I fixed a future issue that would have happened with a unit test. - I made FindNonAnonymousContainingBlock public and move the implementation accordingly. Bug: 1041305 Change-Id: I3ef0af27f0ef679eb27cf12ce5999c6c11fffccf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1996269 Commit-Queue: Benjamin Beaudry <benjamin.beaudry@microsoft.com> Reviewed-by: Koji Ishii <kojii@chromium.org> Reviewed-by: Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/master@{#739533}
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 .