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

Side by Side Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 9838042: Expose correct semantics for HTML5 footer element on mac and windows platforms, as per https://bugs… (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Based off https://chromiumcodereview.appspot.com/9835038/ Created 8 years, 9 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 | Annotate | Revision Log
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 "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "base/win/enum_variant.h" 10 #include "base/win/enum_variant.h"
(...skipping 3041 matching lines...) Expand 10 before | Expand all | Expand 10 after
3052 case WebAccessibility::ROLE_WEB_AREA: 3052 case WebAccessibility::ROLE_WEB_AREA:
3053 ia_role_ = ROLE_SYSTEM_DOCUMENT; 3053 ia_role_ = ROLE_SYSTEM_DOCUMENT;
3054 ia_state_|= STATE_SYSTEM_READONLY; 3054 ia_state_|= STATE_SYSTEM_READONLY;
3055 ia_state_|= STATE_SYSTEM_FOCUSABLE; 3055 ia_state_|= STATE_SYSTEM_FOCUSABLE;
3056 break; 3056 break;
3057 case WebAccessibility::ROLE_EDITABLE_TEXT: 3057 case WebAccessibility::ROLE_EDITABLE_TEXT:
3058 ia_role_ = ROLE_SYSTEM_TEXT; 3058 ia_role_ = ROLE_SYSTEM_TEXT;
3059 ia2_state_ |= IA2_STATE_SINGLE_LINE; 3059 ia2_state_ |= IA2_STATE_SINGLE_LINE;
3060 ia2_state_ |= IA2_STATE_EDITABLE; 3060 ia2_state_ |= IA2_STATE_EDITABLE;
3061 break; 3061 break;
3062 case WebAccessibility::ROLE_FOOTER:
3063 ia_role_ = IA2_ROLE_FOOTER;
3064 ia_state_|= STATE_SYSTEM_READONLY;
3065 break;
3062 case WebAccessibility::ROLE_GRID: 3066 case WebAccessibility::ROLE_GRID:
3063 ia_role_ = ROLE_SYSTEM_TABLE; 3067 ia_role_ = ROLE_SYSTEM_TABLE;
3064 ia_state_|= STATE_SYSTEM_READONLY; 3068 ia_state_|= STATE_SYSTEM_READONLY;
3065 break; 3069 break;
3066 case WebAccessibility::ROLE_GROUP: { 3070 case WebAccessibility::ROLE_GROUP: {
3067 string16 aria_role; 3071 string16 aria_role;
3068 GetStringAttribute(WebAccessibility::ATTR_ROLE, &aria_role); 3072 GetStringAttribute(WebAccessibility::ATTR_ROLE, &aria_role);
3069 if (aria_role == L"group" || html_tag == L"fieldset") { 3073 if (aria_role == L"group" || html_tag == L"fieldset") {
3070 ia_role_ = ROLE_SYSTEM_GROUPING; 3074 ia_role_ = ROLE_SYSTEM_GROUPING;
3071 } else if (html_tag == L"li") { 3075 } else if (html_tag == L"li") {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
3322 } 3326 }
3323 3327
3324 // The role should always be set. 3328 // The role should always be set.
3325 DCHECK(!role_name_.empty() || ia_role_); 3329 DCHECK(!role_name_.empty() || ia_role_);
3326 3330
3327 // If we didn't explicitly set the IAccessible2 role, make it the same 3331 // If we didn't explicitly set the IAccessible2 role, make it the same
3328 // as the MSAA role. 3332 // as the MSAA role.
3329 if (!ia2_role_) 3333 if (!ia2_role_)
3330 ia2_role_ = ia_role_; 3334 ia2_role_ = ia_role_;
3331 } 3335 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698