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

Side by Side Diff: content/renderer/accessibility/blink_ax_enum_conversion.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/renderer/accessibility/blink_ax_enum_conversion.h" 5 #include "content/renderer/accessibility/blink_ax_enum_conversion.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 if (o.isReadOnly()) 61 if (o.isReadOnly())
62 state |= (1 << ui::AX_STATE_READ_ONLY); 62 state |= (1 << ui::AX_STATE_READ_ONLY);
63 63
64 if (o.isRequired()) 64 if (o.isRequired())
65 state |= (1 << ui::AX_STATE_REQUIRED); 65 state |= (1 << ui::AX_STATE_REQUIRED);
66 66
67 if (o.canSetSelectedAttribute()) 67 if (o.canSetSelectedAttribute())
68 state |= (1 << ui::AX_STATE_SELECTABLE); 68 state |= (1 << ui::AX_STATE_SELECTABLE);
69 69
70 if (o.isEditable())
71 state |= (1 << ui::AX_STATE_EDITABLE);
72
73 if (o.isEnabled())
74 state |= (1 << ui::AX_STATE_ENABLED);
75
70 if (o.isSelected()) 76 if (o.isSelected())
71 state |= (1 << ui::AX_STATE_SELECTED); 77 state |= (1 << ui::AX_STATE_SELECTED);
72 78
79 if (o.isRichlyEditable())
80 state |= (1 << ui::AX_STATE_RICHLY_EDITABLE);
81
73 if (o.isVisited()) 82 if (o.isVisited())
74 state |= (1 << ui::AX_STATE_VISITED); 83 state |= (1 << ui::AX_STATE_VISITED);
75 84
76 if (o.isEnabled())
77 state |= (1 << ui::AX_STATE_ENABLED);
78
79 if (o.orientation() == blink::WebAXOrientationVertical) 85 if (o.orientation() == blink::WebAXOrientationVertical)
80 state |= (1 << ui::AX_STATE_VERTICAL); 86 state |= (1 << ui::AX_STATE_VERTICAL);
81 else if (o.orientation() == blink::WebAXOrientationHorizontal) 87 else if (o.orientation() == blink::WebAXOrientationHorizontal)
82 state |= (1 << ui::AX_STATE_HORIZONTAL); 88 state |= (1 << ui::AX_STATE_HORIZONTAL);
83 89
84 if (o.isVisited()) 90 if (o.isVisited())
85 state |= (1 << ui::AX_STATE_VISITED); 91 state |= (1 << ui::AX_STATE_VISITED);
86 92
87 return state; 93 return state;
88 } 94 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 case blink::WebAXSortDirectionOther: 466 case blink::WebAXSortDirectionOther:
461 return ui::AX_SORT_DIRECTION_OTHER; 467 return ui::AX_SORT_DIRECTION_OTHER;
462 default: 468 default:
463 NOTREACHED(); 469 NOTREACHED();
464 } 470 }
465 471
466 return ui::AX_SORT_DIRECTION_NONE; 472 return ui::AX_SORT_DIRECTION_NONE;
467 } 473 }
468 474
469 } // Namespace content. 475 } // Namespace content.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698