Convert ax_enums.idl to mojom.
The accessibility enums were used in over 300 files and many
of those uses depended on details of the bindings generated
from the IDL file. To keep this as much of a pure refactoring
as possible, this change does the following:
* Implements Parse and ToString functions in ax_enum_util
that match the behavior of the IDL bindings.
* Explicitly adds a kNone and kLast item to every enum, to
support code that iterates over enums.
Bug: 650275
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I6610169991ea1209629dab9a8c4c2c1f03c4116f
Reviewed-on: https://chromium-review.googlesource.com/877417
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531997}
diff --git a/docs/accessibility/overview.md b/docs/accessibility/overview.md
index 8faef5c..36e4b14d 100644
--- a/docs/accessibility/overview.md
+++ b/docs/accessibility/overview.md
@@ -294,17 +294,17 @@
```
struct AXNodeData {
int32_t id;
- AXRole role;
+ ax::mojom::Role role;
...
- std::vector<std::pair<AXStringAttribute, std::string>> string_attributes;
- std::vector<std::pair<AXIntAttribute, int32_t>> int_attributes;
+ std::vector<std::pair<ax::mojom::StringAttribute, std::string>> string_attributes;
+ std::vector<std::pair<ax::mojom::IntAttribute, int32_t>> int_attributes;
...
}
```
So if a text field has a placeholder attribute, we can store
that by adding an entry to `string_attributes` with an attribute
-of ui::AX_ATTR_PLACEHOLDER and the placeholder string as the value.
+of ax::mojom::StringAttribute::kPlaceholder and the placeholder string as the value.
### Incremental tree updates