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

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

Issue 1130733006: Adds color, font size, text direction and text styles to the accessibility tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation error. Created 5 years, 7 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 <set> 7 #include <set>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 result += " sort_direction=other"; 203 result += " sort_direction=other";
204 break; 204 break;
205 } 205 }
206 break; 206 break;
207 case AX_ATTR_TITLE_UI_ELEMENT: 207 case AX_ATTR_TITLE_UI_ELEMENT:
208 result += " title_elem=" + value; 208 result += " title_elem=" + value;
209 break; 209 break;
210 case AX_ATTR_ACTIVEDESCENDANT_ID: 210 case AX_ATTR_ACTIVEDESCENDANT_ID:
211 result += " activedescendant=" + value; 211 result += " activedescendant=" + value;
212 break; 212 break;
213 case AX_ATTR_COLOR_VALUE_RED:
214 result += " color_value_red=" + value;
215 break;
216 case AX_ATTR_COLOR_VALUE_GREEN:
217 result += " color_value_green=" + value;
218 break;
219 case AX_ATTR_COLOR_VALUE_BLUE:
220 result += " color_value_blue=" + value;
221 break;
222 case AX_ATTR_TREE_ID: 213 case AX_ATTR_TREE_ID:
223 result += " tree_id=" + value; 214 result += " tree_id=" + value;
224 break; 215 break;
225 case AX_ATTR_CHILD_TREE_ID: 216 case AX_ATTR_CHILD_TREE_ID:
226 result += " child_tree_id=" + value; 217 result += " child_tree_id=" + value;
227 break; 218 break;
219 case AX_ATTR_BACKGROUND_COLOR:
220 result += " background_color=" + value;
221 break;
222 case AX_ATTR_COLOR:
223 result += " color=" + value;
224 break;
228 case AX_ATTR_TEXT_DIRECTION: 225 case AX_ATTR_TEXT_DIRECTION:
229 switch (int_attributes[i].second) { 226 switch (int_attributes[i].second) {
230 case AX_TEXT_DIRECTION_LR: 227 case AX_TEXT_DIRECTION_LTR:
231 default: 228 result += " text_direction=ltr";
232 result += " text_direction=lr";
233 break; 229 break;
234 case AX_TEXT_DIRECTION_RL: 230 case AX_TEXT_DIRECTION_RTL:
235 result += " text_direction=rl"; 231 result += " text_direction=rtl";
236 break; 232 break;
237 case AX_TEXT_DIRECTION_TB: 233 case AX_TEXT_DIRECTION_TTB:
238 result += " text_direction=tb"; 234 result += " text_direction=ttb";
239 break; 235 break;
240 case AX_TEXT_DIRECTION_BT: 236 case AX_TEXT_DIRECTION_BTT:
241 result += " text_direction=bt"; 237 result += " text_direction=btt";
242 break; 238 break;
243 } 239 }
244 break; 240 break;
245 case AX_ATTR_SET_SIZE: 241 case AX_ATTR_SET_SIZE:
246 result += " setsize=" + value; 242 result += " setsize=" + value;
247 break; 243 break;
248 case AX_ATTR_POS_IN_SET: 244 case AX_ATTR_POS_IN_SET:
249 result += " posinset=" + value; 245 result += " posinset=" + value;
250 break; 246 break;
251 case AX_ATTR_INVALID_STATE: 247 case AX_ATTR_INVALID_STATE:
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 break; 356 break;
361 case AX_ATTR_VALUE_FOR_RANGE: 357 case AX_ATTR_VALUE_FOR_RANGE:
362 result += " value_for_range=" + value; 358 result += " value_for_range=" + value;
363 break; 359 break;
364 case AX_ATTR_MAX_VALUE_FOR_RANGE: 360 case AX_ATTR_MAX_VALUE_FOR_RANGE:
365 result += " max_value=" + value; 361 result += " max_value=" + value;
366 break; 362 break;
367 case AX_ATTR_MIN_VALUE_FOR_RANGE: 363 case AX_ATTR_MIN_VALUE_FOR_RANGE:
368 result += " min_value=" + value; 364 result += " min_value=" + value;
369 break; 365 break;
366 case AX_ATTR_FONT_SIZE:
367 result += " font_size=" + value;
368 break;
370 case AX_FLOAT_ATTRIBUTE_NONE: 369 case AX_FLOAT_ATTRIBUTE_NONE:
371 break; 370 break;
372 } 371 }
sgurun-gerrit only 2015/05/12 20:11:58 ../../ui/accessibility/ax_node_data.cc:130:13: err
373 } 372 }
374 373
375 for (size_t i = 0; i < bool_attributes.size(); ++i) { 374 for (size_t i = 0; i < bool_attributes.size(); ++i) {
376 std::string value = bool_attributes[i].second ? "true" : "false"; 375 std::string value = bool_attributes[i].second ? "true" : "false";
377 switch (bool_attributes[i].first) { 376 switch (bool_attributes[i].first) {
378 case AX_ATTR_DOC_LOADED: 377 case AX_ATTR_DOC_LOADED:
379 result += " doc_loaded=" + value; 378 result += " doc_loaded=" + value;
380 break; 379 break;
381 case AX_ATTR_BUTTON_MIXED: 380 case AX_ATTR_BUTTON_MIXED:
382 result += " mixed=" + value; 381 result += " mixed=" + value;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 } 459 }
461 } 460 }
462 461
463 if (!child_ids.empty()) 462 if (!child_ids.empty())
464 result += " child_ids=" + IntVectorToString(child_ids); 463 result += " child_ids=" + IntVectorToString(child_ids);
465 464
466 return result; 465 return result;
467 } 466 }
468 467
469 } // namespace ui 468 } // namespace ui
OLDNEW
« content/renderer/accessibility/blink_ax_enum_conversion.cc ('K') | « ui/accessibility/ax_enums.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698