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

Side by Side Diff: chrome/browser/browser_accessibility_win.cc

Issue 3435019: Store lower cased tag names withing webaccessibility. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/browser_accessibility_win.h" 5 #include "chrome/browser/browser_accessibility_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.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 "chrome/browser/browser_accessibility_manager_win.h" 10 #include "chrome/browser/browser_accessibility_manager_win.h"
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 role_ = ROLE_SYSTEM_TEXT; 1167 role_ = ROLE_SYSTEM_TEXT;
1168 ia2_state_ |= IA2_STATE_SINGLE_LINE; 1168 ia2_state_ |= IA2_STATE_SINGLE_LINE;
1169 ia2_state_ |= IA2_STATE_EDITABLE; 1169 ia2_state_ |= IA2_STATE_EDITABLE;
1170 break; 1170 break;
1171 case WebAccessibility::ROLE_GRID: 1171 case WebAccessibility::ROLE_GRID:
1172 role_ = ROLE_SYSTEM_TABLE; 1172 role_ = ROLE_SYSTEM_TABLE;
1173 break; 1173 break;
1174 case WebAccessibility::ROLE_GROUP: 1174 case WebAccessibility::ROLE_GROUP:
1175 GetAttribute(WebAccessibility::ATTR_HTML_TAG, &role_name_); 1175 GetAttribute(WebAccessibility::ATTR_HTML_TAG, &role_name_);
1176 if (role_name_.empty()) 1176 if (role_name_.empty())
1177 role_name_ = L"DIV"; 1177 role_name_ = L"div";
1178 ia2_role_ = IA2_ROLE_SECTION; 1178 ia2_role_ = IA2_ROLE_SECTION;
1179 break; 1179 break;
1180 case WebAccessibility::ROLE_HEADING: 1180 case WebAccessibility::ROLE_HEADING:
1181 GetAttribute(WebAccessibility::ATTR_HTML_TAG, &role_name_); 1181 GetAttribute(WebAccessibility::ATTR_HTML_TAG, &role_name_);
1182 ia2_role_ = IA2_ROLE_HEADING; 1182 ia2_role_ = IA2_ROLE_HEADING;
1183 break; 1183 break;
1184 case WebAccessibility::ROLE_IMAGE: 1184 case WebAccessibility::ROLE_IMAGE:
1185 role_ = ROLE_SYSTEM_GRAPHIC; 1185 role_ = ROLE_SYSTEM_GRAPHIC;
1186 break; 1186 break;
1187 case WebAccessibility::ROLE_IMAGE_MAP: 1187 case WebAccessibility::ROLE_IMAGE_MAP:
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1358 } 1358 }
1359 1359
1360 // The role should always be set. 1360 // The role should always be set.
1361 DCHECK(!role_name_.empty() || role_); 1361 DCHECK(!role_name_.empty() || role_);
1362 1362
1363 // If we didn't explicitly set the IAccessible2 role, make it the same 1363 // If we didn't explicitly set the IAccessible2 role, make it the same
1364 // as the MSAA role. 1364 // as the MSAA role.
1365 if (!ia2_role_) 1365 if (!ia2_role_)
1366 ia2_role_ = role_; 1366 ia2_role_ = role_;
1367 } 1367 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698