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

Side by Side Diff: content/browser/accessibility/browser_accessibility_win.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/accessibility/browser_accessibility_win.h" 5 #include "content/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include <UIAutomationClient.h> 7 #include <UIAutomationClient.h>
8 #include <UIAutomationCoreApi.h> 8 #include <UIAutomationCoreApi.h>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after
3349 if (HasState(ui::AX_STATE_PROTECTED)) 3349 if (HasState(ui::AX_STATE_PROTECTED))
3350 ia_state_ |= STATE_SYSTEM_PROTECTED; 3350 ia_state_ |= STATE_SYSTEM_PROTECTED;
3351 if (HasState(ui::AX_STATE_REQUIRED)) 3351 if (HasState(ui::AX_STATE_REQUIRED))
3352 ia2_state_ |= IA2_STATE_REQUIRED; 3352 ia2_state_ |= IA2_STATE_REQUIRED;
3353 if (HasState(ui::AX_STATE_SELECTABLE)) 3353 if (HasState(ui::AX_STATE_SELECTABLE))
3354 ia_state_ |= STATE_SYSTEM_SELECTABLE; 3354 ia_state_ |= STATE_SYSTEM_SELECTABLE;
3355 if (HasState(ui::AX_STATE_SELECTED)) 3355 if (HasState(ui::AX_STATE_SELECTED))
3356 ia_state_ |= STATE_SYSTEM_SELECTED; 3356 ia_state_ |= STATE_SYSTEM_SELECTED;
3357 if (HasState(ui::AX_STATE_VISITED)) 3357 if (HasState(ui::AX_STATE_VISITED))
3358 ia_state_ |= STATE_SYSTEM_TRAVERSED; 3358 ia_state_ |= STATE_SYSTEM_TRAVERSED;
3359 if (!HasState(ui::AX_STATE_ENABLED)) 3359 if (HasState(ui::AX_STATE_DISABLED))
3360 ia_state_ |= STATE_SYSTEM_UNAVAILABLE; 3360 ia_state_ |= STATE_SYSTEM_UNAVAILABLE;
3361 if (HasState(ui::AX_STATE_VERTICAL)) 3361 if (HasState(ui::AX_STATE_VERTICAL))
3362 ia2_state_ |= IA2_STATE_VERTICAL; 3362 ia2_state_ |= IA2_STATE_VERTICAL;
3363 if (HasState(ui::AX_STATE_HORIZONTAL)) 3363 if (HasState(ui::AX_STATE_HORIZONTAL))
3364 ia2_state_ |= IA2_STATE_HORIZONTAL; 3364 ia2_state_ |= IA2_STATE_HORIZONTAL;
3365 if (HasState(ui::AX_STATE_VISITED)) 3365 if (HasState(ui::AX_STATE_VISITED))
3366 ia_state_ |= STATE_SYSTEM_TRAVERSED; 3366 ia_state_ |= STATE_SYSTEM_TRAVERSED;
3367 3367
3368 // WebKit marks everything as readonly unless it's editable text, so if it's 3368 // WebKit marks everything as readonly unless it's editable text, so if it's
3369 // not readonly, mark it as editable now. The final computation of the 3369 // not readonly, mark it as editable now. The final computation of the
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3834 // The role should always be set. 3834 // The role should always be set.
3835 DCHECK(!role_name_.empty() || ia_role_); 3835 DCHECK(!role_name_.empty() || ia_role_);
3836 3836
3837 // If we didn't explicitly set the IAccessible2 role, make it the same 3837 // If we didn't explicitly set the IAccessible2 role, make it the same
3838 // as the MSAA role. 3838 // as the MSAA role.
3839 if (!ia2_role_) 3839 if (!ia2_role_)
3840 ia2_role_ = ia_role_; 3840 ia2_role_ = ia_role_;
3841 } 3841 }
3842 3842
3843 } // namespace content 3843 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698