commit | 8a86ffb76b5534b79f0a03c47b10bf52b9ea75c0 | [log] [tgz] |
---|---|---|
author | Nektarios Paisios <nektar@chromium.org> | Tue Jun 11 23:07:57 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Jun 11 23:07:57 2019 |
tree | a13af981fa6dbdb09eaa32254caf4827e2161bae | |
parent | f9a1af480847b2126341da0173ce1a7e0e370d19 [diff] |
Returns optional values from any AXNode related API that might fail and drops the use of int32_t from countable arguments 1. Certain APIs exposed by AXPlatformNodeDelegate, AXPlatformNode and automation might fail. For example, asking for the number of rows when not inside a table object, or asking for the PosInSet of an object that is not part of a set. 2. Certain APIs do not conform to our C++ Style Guide by exposing int32_t arguments and thereby infect the whole codebase that uses them. This patch uses base::Optional as the return type of any API that might fail and removes the use of int32_t from any API arguments that refer to something countable, e.g. a row_index or a set_size. Intentionally, we don't remove the use of int32_t for representing AXNode IDs, because node IDs should be treated as an opaque data type and no numeric calculations should be performed on them. This patch has uncovered some bugs in the IAccessible2 table implementation, which have been fixed. Specifically, if a row or column argument is out of range, E_INVALIDARG should be returned from get_columnExtents, get_rowExtents, get_rowDescription and get_columnDescription, instead of S_FALSE. Also, get_rowDescription and get_columnDescription should return the header cell if called on a header cell. R=dtseng@chromium.org, aleventhal@chromium.org Change-Id: I58d4ca2bec8b245795b8e8bea2e7261786acdb35 Bug: 953443 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600942 Commit-Queue: Nektarios Paisios <nektar@chromium.org> Reviewed-by: Nektarios Paisios <nektar@chromium.org> Reviewed-by: Aaron Leventhal <aleventhal@chromium.org> Reviewed-by: David Tseng <dtseng@chromium.org> Reviewed-by: Kevin Babbitt <kbabbitt@microsoft.com> Cr-Commit-Position: refs/heads/master@{#668198}
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 .