OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 return true; | 452 return true; |
453 | 453 |
454 return false; | 454 return false; |
455 } | 455 } |
456 | 456 |
457 bool AXLayoutObject::isSelected() const { | 457 bool AXLayoutObject::isSelected() const { |
458 if (!getLayoutObject() || !getNode()) | 458 if (!getLayoutObject() || !getNode()) |
459 return false; | 459 return false; |
460 | 460 |
461 const AtomicString& ariaSelected = getAttribute(aria_selectedAttr); | 461 const AtomicString& ariaSelected = getAttribute(aria_selectedAttr); |
462 if (equalIgnoringCase(ariaSelected, "true")) | 462 if (equalIgnoringASCIICase(ariaSelected, "true")) |
463 return true; | 463 return true; |
464 | 464 |
465 AXObject* focusedObject = axObjectCache().focusedObject(); | 465 AXObject* focusedObject = axObjectCache().focusedObject(); |
466 if (ariaRoleAttribute() == ListBoxOptionRole && focusedObject && | 466 if (ariaRoleAttribute() == ListBoxOptionRole && focusedObject && |
467 focusedObject->activeDescendant() == this) { | 467 focusedObject->activeDescendant() == this) { |
468 return true; | 468 return true; |
469 } | 469 } |
470 | 470 |
471 if (isTabItem() && isTabItemSelected()) | 471 if (isTabItem() && isTabItemSelected()) |
472 return true; | 472 return true; |
(...skipping 12 matching lines...) Expand all Loading... |
485 | 485 |
486 if (!m_layoutObject) { | 486 if (!m_layoutObject) { |
487 if (ignoredReasons) | 487 if (ignoredReasons) |
488 ignoredReasons->push_back(IgnoredReason(AXNotRendered)); | 488 ignoredReasons->push_back(IgnoredReason(AXNotRendered)); |
489 return IgnoreObject; | 489 return IgnoreObject; |
490 } | 490 } |
491 | 491 |
492 if (m_layoutObject->style()->visibility() != EVisibility::kVisible) { | 492 if (m_layoutObject->style()->visibility() != EVisibility::kVisible) { |
493 // aria-hidden is meant to override visibility as the determinant in AX | 493 // aria-hidden is meant to override visibility as the determinant in AX |
494 // hierarchy inclusion. | 494 // hierarchy inclusion. |
495 if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) | 495 if (equalIgnoringASCIICase(getAttribute(aria_hiddenAttr), "false")) |
496 return DefaultBehavior; | 496 return DefaultBehavior; |
497 | 497 |
498 if (ignoredReasons) | 498 if (ignoredReasons) |
499 ignoredReasons->push_back(IgnoredReason(AXNotVisible)); | 499 ignoredReasons->push_back(IgnoredReason(AXNotVisible)); |
500 return IgnoreObject; | 500 return IgnoreObject; |
501 } | 501 } |
502 | 502 |
503 return AXObject::defaultObjectInclusion(ignoredReasons); | 503 return AXObject::defaultObjectInclusion(ignoredReasons); |
504 } | 504 } |
505 | 505 |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 break; | 1289 break; |
1290 | 1290 |
1291 parent = parent->parentObjectIfExists(); | 1291 parent = parent->parentObjectIfExists(); |
1292 } | 1292 } |
1293 | 1293 |
1294 return parent; | 1294 return parent; |
1295 } | 1295 } |
1296 | 1296 |
1297 bool AXLayoutObject::supportsARIADragging() const { | 1297 bool AXLayoutObject::supportsARIADragging() const { |
1298 const AtomicString& grabbed = getAttribute(aria_grabbedAttr); | 1298 const AtomicString& grabbed = getAttribute(aria_grabbedAttr); |
1299 return equalIgnoringCase(grabbed, "true") || | 1299 return equalIgnoringASCIICase(grabbed, "true") || |
1300 equalIgnoringCase(grabbed, "false"); | 1300 equalIgnoringASCIICase(grabbed, "false"); |
1301 } | 1301 } |
1302 | 1302 |
1303 bool AXLayoutObject::supportsARIADropping() const { | 1303 bool AXLayoutObject::supportsARIADropping() const { |
1304 const AtomicString& dropEffect = getAttribute(aria_dropeffectAttr); | 1304 const AtomicString& dropEffect = getAttribute(aria_dropeffectAttr); |
1305 return !dropEffect.isEmpty(); | 1305 return !dropEffect.isEmpty(); |
1306 } | 1306 } |
1307 | 1307 |
1308 bool AXLayoutObject::supportsARIAFlowTo() const { | 1308 bool AXLayoutObject::supportsARIAFlowTo() const { |
1309 return !getAttribute(aria_flowtoAttr).isEmpty(); | 1309 return !getAttribute(aria_flowtoAttr).isEmpty(); |
1310 } | 1310 } |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2493 } else { | 2493 } else { |
2494 m_children.push_back(root); | 2494 m_children.push_back(root); |
2495 } | 2495 } |
2496 } | 2496 } |
2497 | 2497 |
2498 bool AXLayoutObject::elementAttributeValue( | 2498 bool AXLayoutObject::elementAttributeValue( |
2499 const QualifiedName& attributeName) const { | 2499 const QualifiedName& attributeName) const { |
2500 if (!m_layoutObject) | 2500 if (!m_layoutObject) |
2501 return false; | 2501 return false; |
2502 | 2502 |
2503 return equalIgnoringCase(getAttribute(attributeName), "true"); | 2503 return equalIgnoringASCIICase(getAttribute(attributeName), "true"); |
2504 } | 2504 } |
2505 | 2505 |
2506 } // namespace blink | 2506 } // namespace blink |
OLD | NEW |