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

Side by Side Diff: ui/accessibility/ax_node_data.cc

Issue 2528103002: Views a11y: Add comment to explain usage of AXNodeData's |state| member. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/accessibility/ax_node_data.h" 5 #include "ui/accessibility/ax_node_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return std::find_if(vector.begin(), 53 return std::find_if(vector.begin(),
54 vector.end(), 54 vector.end(),
55 FirstIs<FirstType, SecondType>(first)); 55 FirstIs<FirstType, SecondType>(first));
56 } 56 }
57 57
58 } // namespace 58 } // namespace
59 59
60 AXNodeData::AXNodeData() 60 AXNodeData::AXNodeData()
61 : id(-1), 61 : id(-1),
62 role(AX_ROLE_UNKNOWN), 62 role(AX_ROLE_UNKNOWN),
63 // Turn on all flags to more easily catch bugs where no flags are set.
64 // This will be cleared back to a 0-state before use.
63 state(0xFFFFFFFF), 65 state(0xFFFFFFFF),
64 offset_container_id(-1) { 66 offset_container_id(-1) {
65 } 67 }
66 68
67 AXNodeData::~AXNodeData() { 69 AXNodeData::~AXNodeData() {
68 } 70 }
69 71
70 AXNodeData::AXNodeData(const AXNodeData& other) { 72 AXNodeData::AXNodeData(const AXNodeData& other) {
71 id = other.id; 73 id = other.id;
72 role = other.role; 74 role = other.role;
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 } 783 }
782 } 784 }
783 785
784 if (!child_ids.empty()) 786 if (!child_ids.empty())
785 result += " child_ids=" + IntVectorToString(child_ids); 787 result += " child_ids=" + IntVectorToString(child_ids);
786 788
787 return result; 789 return result;
788 } 790 }
789 791
790 } // namespace ui 792 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698