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

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

Issue 2969603002: Move two BrowserAccessibility role predicates to ax_role_properties. (Closed)
Patch Set: macos Created 3 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/one_shot_accessibility_tree_search.h" 5 #include "content/browser/accessibility/one_shot_accessibility_tree_search.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/i18n/case_conversion.h" 9 #include "base/i18n/case_conversion.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 247
248 bool AccessibilityComboboxPredicate( 248 bool AccessibilityComboboxPredicate(
249 BrowserAccessibility* start, BrowserAccessibility* node) { 249 BrowserAccessibility* start, BrowserAccessibility* node) {
250 return (node->GetRole() == ui::AX_ROLE_COMBO_BOX || 250 return (node->GetRole() == ui::AX_ROLE_COMBO_BOX ||
251 node->GetRole() == ui::AX_ROLE_POP_UP_BUTTON); 251 node->GetRole() == ui::AX_ROLE_POP_UP_BUTTON);
252 } 252 }
253 253
254 bool AccessibilityControlPredicate( 254 bool AccessibilityControlPredicate(
255 BrowserAccessibility* start, BrowserAccessibility* node) { 255 BrowserAccessibility* start, BrowserAccessibility* node) {
256 if (node->IsControl()) 256 if (ui::IsControl(node->GetRole()))
257 return true; 257 return true;
258 if (node->HasState(ui::AX_STATE_FOCUSABLE) && 258 if (node->HasState(ui::AX_STATE_FOCUSABLE) &&
259 node->GetRole() != ui::AX_ROLE_IFRAME && 259 node->GetRole() != ui::AX_ROLE_IFRAME &&
260 node->GetRole() != ui::AX_ROLE_IFRAME_PRESENTATIONAL && 260 node->GetRole() != ui::AX_ROLE_IFRAME_PRESENTATIONAL &&
261 node->GetRole() != ui::AX_ROLE_IMAGE_MAP_LINK && 261 node->GetRole() != ui::AX_ROLE_IMAGE_MAP_LINK &&
262 node->GetRole() != ui::AX_ROLE_LINK && 262 node->GetRole() != ui::AX_ROLE_LINK &&
263 node->GetRole() != ui::AX_ROLE_WEB_AREA && 263 node->GetRole() != ui::AX_ROLE_WEB_AREA &&
264 node->GetRole() != ui::AX_ROLE_ROOT_WEB_AREA) { 264 node->GetRole() != ui::AX_ROLE_ROOT_WEB_AREA) {
265 return true; 265 return true;
266 } 266 }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 } 449 }
450 450
451 bool AccessibilityVisitedLinkPredicate( 451 bool AccessibilityVisitedLinkPredicate(
452 BrowserAccessibility* start, BrowserAccessibility* node) { 452 BrowserAccessibility* start, BrowserAccessibility* node) {
453 return ((node->GetRole() == ui::AX_ROLE_LINK || 453 return ((node->GetRole() == ui::AX_ROLE_LINK ||
454 node->GetRole() == ui::AX_ROLE_IMAGE_MAP_LINK) && 454 node->GetRole() == ui::AX_ROLE_IMAGE_MAP_LINK) &&
455 node->HasState(ui::AX_STATE_VISITED)); 455 node->HasState(ui::AX_STATE_VISITED));
456 } 456 }
457 457
458 } // namespace content 458 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_cocoa.mm ('k') | ui/accessibility/ax_role_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698