summaryrefslogtreecommitdiffstats
path: root/content/common/accessibility_messages.h
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-20 23:41:51 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-20 23:41:51 +0000
commiteecf89f0653aea95e400be885ffe98689c2d4c4e (patch)
tree67f70bb69f9b3a0d914a9513d381177f29475046 /content/common/accessibility_messages.h
parent4587873229fd72441369dad26e131959385c92ec (diff)
downloadchromium_src-eecf89f0653aea95e400be885ffe98689c2d4c4e.zip
chromium_src-eecf89f0653aea95e400be885ffe98689c2d4c4e.tar.gz
chromium_src-eecf89f0653aea95e400be885ffe98689c2d4c4e.tar.bz2
Make AccessibilityNodeData more compact.
The only goal of this tedious changelist is less memory usage when storing the accessible tree. The major changes are: * Make almost everything a "sparse" attribute. For example, not every element has a name or value, so make them optional attributes rather than string fields that always take up memory. * Use UTF-8 std::strings instead of string16s. * Use vectors of pairs rather than maps. If there is any slowdown after this change, we can speed up lookup in vectors by sorting the attributes and doing a binary search. There are also opportunities to do more referencing and less string copying. When reviewing, look at the changes to the header files first and make sure you understand them. Everything else is just a consequence of those changes. BUG=96700 Review URL: https://chromiumcodereview.appspot.com/21269002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218572 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/accessibility_messages.h')
-rw-r--r--content/common/accessibility_messages.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/content/common/accessibility_messages.h b/content/common/accessibility_messages.h
index cd75a8c..116c24b 100644
--- a/content/common/accessibility_messages.h
+++ b/content/common/accessibility_messages.h
@@ -26,14 +26,13 @@ IPC_ENUM_TRAITS(AccessibilityNotification)
IPC_ENUM_TRAITS(content::AccessibilityNodeData::BoolAttribute)
IPC_ENUM_TRAITS(content::AccessibilityNodeData::FloatAttribute)
IPC_ENUM_TRAITS(content::AccessibilityNodeData::IntAttribute)
+IPC_ENUM_TRAITS(content::AccessibilityNodeData::IntListAttribute)
IPC_ENUM_TRAITS(content::AccessibilityNodeData::Role)
IPC_ENUM_TRAITS(content::AccessibilityNodeData::State)
IPC_ENUM_TRAITS(content::AccessibilityNodeData::StringAttribute)
IPC_STRUCT_TRAITS_BEGIN(content::AccessibilityNodeData)
IPC_STRUCT_TRAITS_MEMBER(id)
- IPC_STRUCT_TRAITS_MEMBER(name)
- IPC_STRUCT_TRAITS_MEMBER(value)
IPC_STRUCT_TRAITS_MEMBER(role)
IPC_STRUCT_TRAITS_MEMBER(state)
IPC_STRUCT_TRAITS_MEMBER(location)
@@ -41,12 +40,9 @@ IPC_STRUCT_TRAITS_BEGIN(content::AccessibilityNodeData)
IPC_STRUCT_TRAITS_MEMBER(int_attributes)
IPC_STRUCT_TRAITS_MEMBER(float_attributes)
IPC_STRUCT_TRAITS_MEMBER(bool_attributes)
- IPC_STRUCT_TRAITS_MEMBER(child_ids)
- IPC_STRUCT_TRAITS_MEMBER(indirect_child_ids)
+ IPC_STRUCT_TRAITS_MEMBER(intlist_attributes)
IPC_STRUCT_TRAITS_MEMBER(html_attributes)
- IPC_STRUCT_TRAITS_MEMBER(line_breaks)
- IPC_STRUCT_TRAITS_MEMBER(cell_ids)
- IPC_STRUCT_TRAITS_MEMBER(unique_cell_ids)
+ IPC_STRUCT_TRAITS_MEMBER(child_ids)
IPC_STRUCT_TRAITS_END()
IPC_STRUCT_BEGIN(AccessibilityHostMsg_NotificationParams)