OLD | NEW |
---|---|
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 Loading... | |
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 // If you call node->hasEditableStyle() since that will return true if an ancest or is editable. | |
dmazzoni
2015/04/10 21:23:24
Please fix this sentence while you're at it, it do
| |
457 // This only returns true if this is the element that actually has the contentEd itable attribute set. | |
458 bool AXObject::hasContentEditableAttributeSet() const | |
459 { | |
460 if (!hasAttribute(contenteditableAttr)) | |
461 return false; | |
462 const AtomicString& contentEditableValue = getAttribute(contenteditableAttr) ; | |
463 // Both "true" (case-insensitive) and the empty string count as true. | |
464 return contentEditableValue.isEmpty() || equalIgnoringCase(contentEditableVa lue, "true"); | |
465 } | |
466 | |
456 bool AXObject::isTextControl() const | 467 bool AXObject::isTextControl() const |
457 { | 468 { |
469 if (hasContentEditableAttributeSet()) | |
470 return true; | |
471 | |
458 switch (roleValue()) { | 472 switch (roleValue()) { |
459 case TextFieldRole: | 473 case TextFieldRole: |
460 case ComboBoxRole: | 474 case ComboBoxRole: |
461 case SearchBoxRole: | 475 case SearchBoxRole: |
462 return true; | 476 return true; |
463 default: | 477 default: |
464 return false; | 478 return false; |
465 } | 479 } |
466 } | 480 } |
467 | 481 |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1299 } | 1313 } |
1300 | 1314 |
1301 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) | 1315 const AtomicString& AXObject::internalRoleName(AccessibilityRole role) |
1302 { | 1316 { |
1303 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo leNameVector(); | 1317 static const Vector<AtomicString>* internalRoleNameVector = createInternalRo leNameVector(); |
1304 | 1318 |
1305 return internalRoleNameVector->at(role); | 1319 return internalRoleNameVector->at(role); |
1306 } | 1320 } |
1307 | 1321 |
1308 } // namespace blink | 1322 } // namespace blink |
OLD | NEW |