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

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

Issue 1308153012: Uses isEditable and isRichlyEditable to determine which attributes to expose on Mac and how to repr… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 5 years, 3 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 257
258 result += "id=" + IntToString(id); 258 result += "id=" + IntToString(id);
259 result += " " + ui::ToString(role); 259 result += " " + ui::ToString(role);
260 260
261 if (state & (1 << AX_STATE_BUSY)) 261 if (state & (1 << AX_STATE_BUSY))
262 result += " BUSY"; 262 result += " BUSY";
263 if (state & (1 << AX_STATE_CHECKED)) 263 if (state & (1 << AX_STATE_CHECKED))
264 result += " CHECKED"; 264 result += " CHECKED";
265 if (state & (1 << AX_STATE_COLLAPSED)) 265 if (state & (1 << AX_STATE_COLLAPSED))
266 result += " COLLAPSED"; 266 result += " COLLAPSED";
267 if (state & (1 << AX_STATE_EDITABLE))
268 result += " EDITABLE";
267 if (state & (1 << AX_STATE_EXPANDED)) 269 if (state & (1 << AX_STATE_EXPANDED))
268 result += " EXPANDED"; 270 result += " EXPANDED";
269 if (state & (1 << AX_STATE_FOCUSABLE)) 271 if (state & (1 << AX_STATE_FOCUSABLE))
270 result += " FOCUSABLE"; 272 result += " FOCUSABLE";
271 if (state & (1 << AX_STATE_FOCUSED)) 273 if (state & (1 << AX_STATE_FOCUSED))
272 result += " FOCUSED"; 274 result += " FOCUSED";
273 if (state & (1 << AX_STATE_HASPOPUP)) 275 if (state & (1 << AX_STATE_HASPOPUP))
274 result += " HASPOPUP"; 276 result += " HASPOPUP";
275 if (state & (1 << AX_STATE_HOVERED)) 277 if (state & (1 << AX_STATE_HOVERED))
276 result += " HOVERED"; 278 result += " HOVERED";
277 if (state & (1 << AX_STATE_INDETERMINATE)) 279 if (state & (1 << AX_STATE_INDETERMINATE))
278 result += " INDETERMINATE"; 280 result += " INDETERMINATE";
279 if (state & (1 << AX_STATE_INVISIBLE)) 281 if (state & (1 << AX_STATE_INVISIBLE))
280 result += " INVISIBLE"; 282 result += " INVISIBLE";
281 if (state & (1 << AX_STATE_LINKED)) 283 if (state & (1 << AX_STATE_LINKED))
282 result += " LINKED"; 284 result += " LINKED";
283 if (state & (1 << AX_STATE_MULTISELECTABLE)) 285 if (state & (1 << AX_STATE_MULTISELECTABLE))
284 result += " MULTISELECTABLE"; 286 result += " MULTISELECTABLE";
285 if (state & (1 << AX_STATE_OFFSCREEN)) 287 if (state & (1 << AX_STATE_OFFSCREEN))
286 result += " OFFSCREEN"; 288 result += " OFFSCREEN";
287 if (state & (1 << AX_STATE_PRESSED)) 289 if (state & (1 << AX_STATE_PRESSED))
288 result += " PRESSED"; 290 result += " PRESSED";
289 if (state & (1 << AX_STATE_PROTECTED)) 291 if (state & (1 << AX_STATE_PROTECTED))
290 result += " PROTECTED"; 292 result += " PROTECTED";
291 if (state & (1 << AX_STATE_READ_ONLY)) 293 if (state & (1 << AX_STATE_READ_ONLY))
292 result += " READONLY"; 294 result += " READONLY";
293 if (state & (1 << AX_STATE_REQUIRED)) 295 if (state & (1 << AX_STATE_REQUIRED))
294 result += " REQUIRED"; 296 result += " REQUIRED";
297 if (state & (1 << AX_STATE_RICHLY_EDITABLE))
298 result += " RICHLY_EDITABLE";
295 if (state & (1 << AX_STATE_SELECTABLE)) 299 if (state & (1 << AX_STATE_SELECTABLE))
296 result += " SELECTABLE"; 300 result += " SELECTABLE";
297 if (state & (1 << AX_STATE_SELECTED)) 301 if (state & (1 << AX_STATE_SELECTED))
298 result += " SELECTED"; 302 result += " SELECTED";
299 if (state & (1 << AX_STATE_VERTICAL)) 303 if (state & (1 << AX_STATE_VERTICAL))
300 result += " VERTICAL"; 304 result += " VERTICAL";
301 if (state & (1 << AX_STATE_VISITED)) 305 if (state & (1 << AX_STATE_VISITED))
302 result += " VISITED"; 306 result += " VISITED";
303 307
304 result += " (" + IntToString(location.x()) + ", " + 308 result += " (" + IntToString(location.x()) + ", " +
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 bool AXNodeData::IsRoot() const { 676 bool AXNodeData::IsRoot() const {
673 return (role == AX_ROLE_ROOT_WEB_AREA || 677 return (role == AX_ROLE_ROOT_WEB_AREA ||
674 role == AX_ROLE_DESKTOP); 678 role == AX_ROLE_DESKTOP);
675 } 679 }
676 680
677 void AXNodeData::SetRoot() { 681 void AXNodeData::SetRoot() {
678 role = AX_ROLE_ROOT_WEB_AREA; 682 role = AX_ROLE_ROOT_WEB_AREA;
679 } 683 }
680 684
681 } // namespace ui 685 } // namespace ui
OLDNEW
« content/browser/accessibility/browser_accessibility_win.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