Commit e419e933 authored by Alexey Kozyatinskiy's avatar Alexey Kozyatinskiy Committed by Commit Bot

[DevTools] merged AXPropertyName enums in protocol

We do not support enum splitted into parts in protocol.
It is preparation step before landing improved version of our code
generator which will generate only used types.

R=dgozman@chromium.org

Bug: chromium:778796
Change-Id: I2eceb334b81e59bdb8f4c6ce415f907b7207d0da
Reviewed-on: https://chromium-review.googlesource.com/775663
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517530}
parent f8fa76d6
...@@ -4872,7 +4872,7 @@ ...@@ -4872,7 +4872,7 @@
"id": "AXProperty", "id": "AXProperty",
"type": "object", "type": "object",
"properties": [ "properties": [
{ "name": "name", "type": "string", "description": "The name of this property." }, { "name": "name", "$ref": "AXPropertyName", "description": "The name of this property." },
{ "name": "value", "$ref": "AXValue", "description": "The value of this property." } { "name": "value", "$ref": "AXValue", "description": "The value of this property." }
] ]
}, },
...@@ -4888,34 +4888,10 @@ ...@@ -4888,34 +4888,10 @@
"description": "A single computed AX property." "description": "A single computed AX property."
}, },
{ {
"id": "AXGlobalStates", "id": "AXPropertyName",
"type": "string", "type": "string",
"enum": [ "busy", "disabled", "hidden", "hiddenRoot", "invalid", "keyshortcuts", "roledescription" ], "enum": [ "busy", "disabled", "hidden", "hiddenRoot", "invalid", "keyshortcuts", "roledescription", "live", "atomic", "relevant", "root", "autocomplete", "haspopup", "level", "multiselectable", "orientation", "multiline", "readonly", "required", "valuemin", "valuemax", "valuetext", "checked", "expanded", "modal", "pressed", "selected", "activedescendant", "controls", "describedby", "details", "errormessage", "flowto", "labelledby", "owns" ],
"description": "States which apply to every AX node." "description": "Values of AXProperty name: from 'busy' to 'roledescription' - states which apply to every AX node, from 'live' to 'root' - attributes which apply to nodes in live regions, from 'autocomplete' to 'valuetext' - attributes which apply to widgets, from 'checked' to 'selected' - states which apply to widgets, from 'activedescendant' to 'owns' - relationships between elements other than parent/child/sibling."
},
{
"id": "AXLiveRegionAttributes",
"type": "string",
"enum": [ "live", "atomic", "relevant", "root" ],
"description": "Attributes which apply to nodes in live regions."
},
{
"id": "AXWidgetAttributes",
"type": "string",
"enum": [ "autocomplete", "haspopup", "level", "multiselectable", "orientation", "multiline", "readonly", "required", "valuemin", "valuemax", "valuetext" ],
"description": "Attributes which apply to widgets."
},
{
"id": "AXWidgetStates",
"type": "string",
"enum": [ "checked", "expanded", "modal", "pressed", "selected" ],
"description": "States which apply to widgets."
},
{
"id": "AXRelationshipAttributes",
"type": "string",
"enum": [ "activedescendant", "controls", "describedby", "details", "errormessage", "flowto", "labelledby", "owns" ],
"description": "Relationships between elements other than parent/child/sibling."
}, },
{ {
"id": "AXNode", "id": "AXNode",
......
...@@ -87,22 +87,8 @@ Accessibility.AXNodeSubPane = class extends Accessibility.AccessibilitySubPane { ...@@ -87,22 +87,8 @@ Accessibility.AXNodeSubPane = class extends Accessibility.AccessibilitySubPane {
var roleProperty = /** @type {!Protocol.Accessibility.AXProperty} */ ({name: 'role', value: axNode.role()}); var roleProperty = /** @type {!Protocol.Accessibility.AXProperty} */ ({name: 'role', value: axNode.role()});
addProperty(roleProperty); addProperty(roleProperty);
for (var property of /** @type {!Array.<!Protocol.Accessibility.AXProperty>} */ (axNode.properties()))
var propertyMap = {}; addProperty(property);
var propertiesArray = /** @type {!Array.<!Protocol.Accessibility.AXProperty>} */ (axNode.properties());
for (var property of propertiesArray)
propertyMap[property.name] = property;
for (var propertySet
of [Protocol.Accessibility.AXWidgetAttributes, Protocol.Accessibility.AXWidgetStates,
Protocol.Accessibility.AXGlobalStates, Protocol.Accessibility.AXLiveRegionAttributes,
Protocol.Accessibility.AXRelationshipAttributes]) {
for (var propertyKey in propertySet) {
var property = propertySet[propertyKey];
if (property in propertyMap)
addProperty(propertyMap[property]);
}
}
} }
/** /**
......
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