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

Side by Side Diff: ui/accessibility/ax_node.h

Issue 2437473003: Fixed line start offsets. (Closed)
Patch Set: Fixed tests and nits. Created 4 years, 2 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 unified diff | Download patch
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 #ifndef UI_ACCESSIBILITY_AX_NODE_H_ 5 #ifndef UI_ACCESSIBILITY_AX_NODE_H_
6 #define UI_ACCESSIBILITY_AX_NODE_H_ 6 #define UI_ACCESSIBILITY_AX_NODE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 bool IsDescendantOf(AXNode* ancestor); 70 bool IsDescendantOf(AXNode* ancestor);
71 71
72 // Gets the text offsets where new lines start either from the node's data or 72 // Gets the text offsets where new lines start either from the node's data or
73 // by computing them and caching the result. 73 // by computing them and caching the result.
74 std::vector<int> GetOrComputeLineStartOffsets(); 74 std::vector<int> GetOrComputeLineStartOffsets();
75 75
76 private: 76 private:
77 // Computes the text offset where each line starts by traversing all child 77 // Computes the text offset where each line starts by traversing all child
78 // leaf nodes. 78 // leaf nodes.
79 void ComputeLineStartOffsets(std::vector<int>* line_offsets, 79 void ComputeLineStartOffsets(std::vector<int>* line_offsets,
80 int* end_offset) const; 80 int* start_offset) const;
81 81
82 int index_in_parent_; 82 int index_in_parent_;
83 AXNode* parent_; 83 AXNode* parent_;
84 std::vector<AXNode*> children_; 84 std::vector<AXNode*> children_;
85 AXNodeData data_; 85 AXNodeData data_;
86 }; 86 };
87 87
88 } // namespace ui 88 } // namespace ui
89 89
90 #endif // UI_ACCESSIBILITY_AX_NODE_H_ 90 #endif // UI_ACCESSIBILITY_AX_NODE_H_
OLDNEW
« no previous file with comments | « content/browser/accessibility/accessibility_tree_formatter_blink.cc ('k') | ui/accessibility/ax_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698