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

Side by Side Diff: Source/modules/accessibility/AXObject.cpp

Issue 1056763002: Reland: Made content editables report the caret and text selection by treating them as text controls (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Merged with master. Created 5 years, 8 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
« no previous file with comments | « Source/modules/accessibility/AXObject.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 446
447 bool AXObject::isPasswordFieldAndShouldHideValue() const 447 bool AXObject::isPasswordFieldAndShouldHideValue() const
448 { 448 {
449 Settings* settings = document()->settings(); 449 Settings* settings = document()->settings();
450 if (!settings || settings->accessibilityPasswordValuesEnabled()) 450 if (!settings || settings->accessibilityPasswordValuesEnabled())
451 return false; 451 return false;
452 452
453 return isPasswordField(); 453 return isPasswordField();
454 } 454 }
455 455
456 bool AXObject::isTextControl() const
457 {
458 switch (roleValue()) {
459 case TextFieldRole:
460 case ComboBoxRole:
461 case SearchBoxRole:
462 return true;
463 default:
464 return false;
465 }
466 }
467
468 bool AXObject::isClickable() const 456 bool AXObject::isClickable() const
469 { 457 {
470 switch (roleValue()) { 458 switch (roleValue()) {
471 case ButtonRole: 459 case ButtonRole:
472 case CheckBoxRole: 460 case CheckBoxRole:
473 case ColorWellRole: 461 case ColorWellRole:
474 case ComboBoxRole: 462 case ComboBoxRole:
475 case ImageMapLinkRole: 463 case ImageMapLinkRole:
476 case LinkRole: 464 case LinkRole:
477 case ListBoxOptionRole: 465 case ListBoxOptionRole:
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 } 1287 }
1300 1288
1301 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) 1289 const AtomicString& AXObject::internalRoleName(AccessibilityRole role)
1302 { 1290 {
1303 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo leNameVector(); 1291 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo leNameVector();
1304 1292
1305 return internalRoleNameVector->at(role); 1293 return internalRoleNameVector->at(role);
1306 } 1294 }
1307 1295
1308 } // namespace blink 1296 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698