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

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

Issue 2301833005: Get rid of AX_LINE_BREAKS attribute to improve performance. (Closed)
Patch Set: Re-worded comment. 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 #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 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 break; 685 break;
686 case AX_ATTR_DESCRIBEDBY_IDS: 686 case AX_ATTR_DESCRIBEDBY_IDS:
687 result += " describedby_ids=" + IntVectorToString(values); 687 result += " describedby_ids=" + IntVectorToString(values);
688 break; 688 break;
689 case AX_ATTR_FLOWTO_IDS: 689 case AX_ATTR_FLOWTO_IDS:
690 result += " flowto_ids=" + IntVectorToString(values); 690 result += " flowto_ids=" + IntVectorToString(values);
691 break; 691 break;
692 case AX_ATTR_LABELLEDBY_IDS: 692 case AX_ATTR_LABELLEDBY_IDS:
693 result += " labelledby_ids=" + IntVectorToString(values); 693 result += " labelledby_ids=" + IntVectorToString(values);
694 break; 694 break;
695 case AX_ATTR_LINE_BREAKS:
696 result += " line_breaks=" + IntVectorToString(values);
697 break;
698 case AX_ATTR_MARKER_TYPES: { 695 case AX_ATTR_MARKER_TYPES: {
699 std::string types_str; 696 std::string types_str;
700 for (size_t i = 0; i < values.size(); ++i) { 697 for (size_t i = 0; i < values.size(); ++i) {
701 auto type = static_cast<AXMarkerType>(values[i]); 698 auto type = static_cast<AXMarkerType>(values[i]);
702 if (type == AX_MARKER_TYPE_NONE) 699 if (type == AX_MARKER_TYPE_NONE)
703 continue; 700 continue;
704 701
705 if (i > 0) 702 if (i > 0)
706 types_str += ','; 703 types_str += ',';
707 704
(...skipping 20 matching lines...) Expand all
728 break; 725 break;
729 case AX_ATTR_CELL_IDS: 726 case AX_ATTR_CELL_IDS:
730 result += " cell_ids=" + IntVectorToString(values); 727 result += " cell_ids=" + IntVectorToString(values);
731 break; 728 break;
732 case AX_ATTR_UNIQUE_CELL_IDS: 729 case AX_ATTR_UNIQUE_CELL_IDS:
733 result += " unique_cell_ids=" + IntVectorToString(values); 730 result += " unique_cell_ids=" + IntVectorToString(values);
734 break; 731 break;
735 case AX_ATTR_CHARACTER_OFFSETS: 732 case AX_ATTR_CHARACTER_OFFSETS:
736 result += " character_offsets=" + IntVectorToString(values); 733 result += " character_offsets=" + IntVectorToString(values);
737 break; 734 break;
735 case AX_ATTR_CACHED_LINE_STARTS:
736 result += " cached_line_start_offsets=" + IntVectorToString(values);
737 break;
738 case AX_ATTR_WORD_STARTS: 738 case AX_ATTR_WORD_STARTS:
739 result += " word_starts=" + IntVectorToString(values); 739 result += " word_starts=" + IntVectorToString(values);
740 break; 740 break;
741 case AX_ATTR_WORD_ENDS: 741 case AX_ATTR_WORD_ENDS:
742 result += " word_ends=" + IntVectorToString(values); 742 result += " word_ends=" + IntVectorToString(values);
743 break; 743 break;
744 case AX_INT_LIST_ATTRIBUTE_NONE: 744 case AX_INT_LIST_ATTRIBUTE_NONE:
745 break; 745 break;
746 } 746 }
747 } 747 }
748 748
749 if (!child_ids.empty()) 749 if (!child_ids.empty())
750 result += " child_ids=" + IntVectorToString(child_ids); 750 result += " child_ids=" + IntVectorToString(child_ids);
751 751
752 return result; 752 return result;
753 } 753 }
754 754
755 } // namespace ui 755 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698