Commit 2f4e2293 authored by patricialor's avatar patricialor Committed by Commit bot

Views a11y: Add comment to explain usage of AXNodeData's |state| member.

AXNodeData::state is a bitmask used for setting accessible state flags such as
ui::AX_STATE_DISABLED. It is initialised to 0xFFFFFF, which turns all flags on.
This is done in order to more easily catch bugs where no flags are set at all -
it must be cleared to 0x0 before use. Add a comment explaining this.

BUG=668569

Review-Url: https://codereview.chromium.org/2528103002
Cr-Commit-Position: refs/heads/master@{#435020}
parent 06198969
...@@ -60,6 +60,8 @@ typename std::vector<std::pair<FirstType, SecondType>>::const_iterator ...@@ -60,6 +60,8 @@ typename std::vector<std::pair<FirstType, SecondType>>::const_iterator
AXNodeData::AXNodeData() AXNodeData::AXNodeData()
: id(-1), : id(-1),
role(AX_ROLE_UNKNOWN), role(AX_ROLE_UNKNOWN),
// Turn on all flags to more easily catch bugs where no flags are set.
// This will be cleared back to a 0-state before use.
state(0xFFFFFFFF), state(0xFFFFFFFF),
offset_container_id(-1) { offset_container_id(-1) {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment