| Index: ui/accessibility/ax_node_data.cc
|
| diff --git a/ui/accessibility/ax_node_data.cc b/ui/accessibility/ax_node_data.cc
|
| index 82e35d6fab3a4ddc97dc39ce03e8611f63ad6664..0a339bdcec3edcb4dab941f7d6152aa6086359b7 100644
|
| --- a/ui/accessibility/ax_node_data.cc
|
| +++ b/ui/accessibility/ax_node_data.cc
|
| @@ -369,6 +369,21 @@ void AXNodeData::AddIntAttribute(
|
| int_attributes.push_back(std::make_pair(attribute, value));
|
| }
|
|
|
| +void AXNodeData::AddValidatedIntAttribute(AXValidatedIntAttribute attribute,
|
| + int value) {
|
| + switch (attribute) {
|
| + case ui::AX_ATTR_INDEX_IN_SET:
|
| + if (value < 0) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| + AddIntAttribute(ui::AX_ATTR_POS_IN_SET, value + 1);
|
| + break;
|
| + default:
|
| + NOTREACHED();
|
| + }
|
| +}
|
| +
|
| void AXNodeData::AddFloatAttribute(
|
| AXFloatAttribute attribute, float value) {
|
| float_attributes.push_back(std::make_pair(attribute, value));
|
|
|