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

Side by Side Diff: content/renderer/accessibility/blink_ax_enum_conversion.cc

Issue 780553002: Switch content/ to use AX_STATE_DISABLE instead of AX_STATE_ENABLED. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 if (o.canSetSelectedAttribute()) 64 if (o.canSetSelectedAttribute())
65 state |= (1 << ui::AX_STATE_SELECTABLE); 65 state |= (1 << ui::AX_STATE_SELECTABLE);
66 66
67 if (o.isSelected()) 67 if (o.isSelected())
68 state |= (1 << ui::AX_STATE_SELECTED); 68 state |= (1 << ui::AX_STATE_SELECTED);
69 69
70 if (o.isVisited()) 70 if (o.isVisited())
71 state |= (1 << ui::AX_STATE_VISITED); 71 state |= (1 << ui::AX_STATE_VISITED);
72 72
73 if (o.isEnabled()) 73 if (!o.isEnabled())
74 state |= (1 << ui::AX_STATE_ENABLED); 74 state |= (1 << ui::AX_STATE_DISABLED);
75 75
76 if (o.orientation() == blink::WebAXOrientationVertical) 76 if (o.orientation() == blink::WebAXOrientationVertical)
77 state |= (1 << ui::AX_STATE_VERTICAL); 77 state |= (1 << ui::AX_STATE_VERTICAL);
78 else if (o.orientation() == blink::WebAXOrientationHorizontal) 78 else if (o.orientation() == blink::WebAXOrientationHorizontal)
79 state |= (1 << ui::AX_STATE_HORIZONTAL); 79 state |= (1 << ui::AX_STATE_HORIZONTAL);
80 80
81 if (o.isVisited()) 81 if (o.isVisited())
82 state |= (1 << ui::AX_STATE_VISITED); 82 state |= (1 << ui::AX_STATE_VISITED);
83 83
84 return state; 84 return state;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 case blink::WebAXTextDirectionBT: 388 case blink::WebAXTextDirectionBT:
389 return ui::AX_TEXT_DIRECTION_BT; 389 return ui::AX_TEXT_DIRECTION_BT;
390 default: 390 default:
391 NOTREACHED(); 391 NOTREACHED();
392 } 392 }
393 393
394 return ui::AX_TEXT_DIRECTION_NONE; 394 return ui::AX_TEXT_DIRECTION_NONE;
395 } 395 }
396 396
397 } // namespace content 397 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698