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

Side by Side Diff: Source/core/accessibility/AXNodeObject.cpp

Issue 67473002: Have ElementTraversal / NodeTraversal's next() methods take a reference (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 7 years, 1 month 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 | « Source/bindings/v8/V8GCController.cpp ('k') | Source/core/accessibility/AXObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 String AXNodeObject::accessibilityDescriptionForElements(Vector<Element*> &eleme nts) const 93 String AXNodeObject::accessibilityDescriptionForElements(Vector<Element*> &eleme nts) const
94 { 94 {
95 StringBuilder builder; 95 StringBuilder builder;
96 unsigned size = elements.size(); 96 unsigned size = elements.size();
97 for (unsigned i = 0; i < size; ++i) { 97 for (unsigned i = 0; i < size; ++i) {
98 Element* idElement = elements[i]; 98 Element* idElement = elements[i];
99 99
100 builder.append(accessibleNameForNode(idElement)); 100 builder.append(accessibleNameForNode(idElement));
101 for (Node* n = idElement->firstChild(); n; n = NodeTraversal::next(n, id Element)) 101 for (Node* n = idElement->firstChild(); n; n = NodeTraversal::next(*n, i dElement))
102 builder.append(accessibleNameForNode(n)); 102 builder.append(accessibleNameForNode(n));
103 103
104 if (i != size - 1) 104 if (i != size - 1)
105 builder.append(' '); 105 builder.append(' ');
106 } 106 }
107 return builder.toString(); 107 return builder.toString();
108 } 108 }
109 109
110 void AXNodeObject::alterSliderValue(bool increase) 110 void AXNodeObject::alterSliderValue(bool increase)
111 { 111 {
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 useTextUnderElement = true; 1804 useTextUnderElement = true;
1805 1805
1806 if (useTextUnderElement) { 1806 if (useTextUnderElement) {
1807 String text = textUnderElement(); 1807 String text = textUnderElement();
1808 if (!text.isEmpty()) 1808 if (!text.isEmpty())
1809 textOrder.append(AccessibilityText(text, ChildrenText)); 1809 textOrder.append(AccessibilityText(text, ChildrenText));
1810 } 1810 }
1811 } 1811 }
1812 1812
1813 } // namespace WebCore 1813 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8GCController.cpp ('k') | Source/core/accessibility/AXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698