Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: webkit/glue/webaccessibility.h

Issue 7745035: Add a big grab bag of missing web accessibility functionality... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_view.cc ('k') | webkit/glue/webaccessibility.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webaccessibility.h
===================================================================
--- webkit/glue/webaccessibility.h (revision 98956)
+++ webkit/glue/webaccessibility.h (working copy)
@@ -6,6 +6,7 @@
#define WEBKIT_GLUE_WEBACCESSIBILITY_H_
#include <map>
+#include <string>
#include <vector>
#include "base/string16.h"
@@ -131,6 +132,7 @@
// for example:
// int mask = (1 << STATE_CHECKED) | (1 << STATE_FOCUSED);
enum State {
+ STATE_BUSY,
STATE_CHECKED,
STATE_COLLAPSED,
STATE_EXPANDED,
@@ -146,13 +148,18 @@
STATE_PRESSED,
STATE_PROTECTED,
STATE_READONLY,
+ STATE_REQUIRED,
STATE_SELECTABLE,
STATE_SELECTED,
STATE_TRAVERSED,
- STATE_BUSY,
- STATE_UNAVAILABLE
+ STATE_UNAVAILABLE,
+ STATE_VERTICAL,
+ STATE_VISITED,
+ NUM_STATES
};
+ COMPILE_ASSERT(NUM_STATES <= 31, state_enum_not_too_large);
+
// Additional optional attributes that can be optionally attached to
// a node.
enum StringAttribute {
@@ -163,14 +170,19 @@
ATTR_DOC_DOCTYPE,
// Attributes that could apply to any node.
+ ATTR_ACCESS_KEY,
ATTR_ACTION,
+ ATTR_CONTAINER_LIVE_RELEVANT,
+ ATTR_CONTAINER_LIVE_STATUS,
ATTR_DESCRIPTION,
ATTR_DISPLAY,
ATTR_HELP,
ATTR_HTML_TAG,
+ ATTR_LIVE_RELEVANT,
+ ATTR_LIVE_STATUS,
+ ATTR_ROLE,
ATTR_SHORTCUT,
ATTR_URL,
- NUM_STRING_ATTRIBUTES
};
enum IntAttribute {
@@ -192,9 +204,34 @@
ATTR_TABLE_CELL_ROW_INDEX,
ATTR_TABLE_CELL_ROW_SPAN,
- NUM_INT_ATTRIBUTES
+ // Tree control attributes.
+ ATTR_HIERARCHICAL_LEVEL,
};
+ enum FloatAttribute {
+ // Document attributes.
+ ATTR_DOC_LOADING_PROGRESS,
+
+ // Range attributes.
+ ATTR_VALUE_FOR_RANGE,
+ ATTR_MIN_VALUE_FOR_RANGE,
+ ATTR_MAX_VALUE_FOR_RANGE,
+ };
+
+ enum BoolAttribute {
+ // Document attributes.
+ ATTR_DOC_LOADED,
+
+ // True if a checkbox or radio button is in the "mixed" state.
+ ATTR_BUTTON_MIXED,
+
+ // Live region attributes.
+ ATTR_CONTAINER_LIVE_ATOMIC,
+ ATTR_CONTAINER_LIVE_BUSY,
+ ATTR_LIVE_ATOMIC,
+ ATTR_LIVE_BUSY,
+ };
+
// Empty constructor, for serialization.
WebAccessibility();
@@ -207,6 +244,10 @@
~WebAccessibility();
+#ifndef NDEBUG
+ std::string DebugString(bool recursive);
+#endif
+
private:
// Initialize an already-created struct, same as the constructor above.
void Init(const WebKit::WebAccessibilityObject& src,
@@ -231,11 +272,21 @@
gfx::Rect location;
std::map<StringAttribute, string16> string_attributes;
std::map<IntAttribute, int32> int_attributes;
+ std::map<FloatAttribute, float> float_attributes;
+ std::map<BoolAttribute, bool> bool_attributes;
std::vector<WebAccessibility> children;
std::vector<int32> indirect_child_ids;
std::vector<std::pair<string16, string16> > html_attributes;
std::vector<int32> line_breaks;
- std::vector<int32> cell_ids; // For a table, the cell ids in row-major order.
+
+ // For a table, the cell ids in row-major order, with duplicate entries
+ // when there's a rowspan or colspan, and with -1 for missing cells.
+ // There are always exactly rows * columns entries.
+ std::vector<int32> cell_ids;
+
+ // For a table, the unique cell ids in row-major order of their first
+ // occurrence.
+ std::vector<int32> unique_cell_ids;
};
} // namespace webkit_glue
« no previous file with comments | « content/renderer/render_view.cc ('k') | webkit/glue/webaccessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698