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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 } | 414 } |
415 | 415 |
416 bool AXObjectImpl::AOMPropertyOrARIAAttributeIsFalse( | 416 bool AXObjectImpl::AOMPropertyOrARIAAttributeIsFalse( |
417 AOMBooleanProperty property) const { | 417 AOMBooleanProperty property) const { |
418 bool result; | 418 bool result; |
419 if (HasAOMPropertyOrARIAAttribute(property, result)) | 419 if (HasAOMPropertyOrARIAAttribute(property, result)) |
420 return !result; | 420 return !result; |
421 return false; | 421 return false; |
422 } | 422 } |
423 | 423 |
| 424 bool AXObjectImpl::HasAOMPropertyOrARIAAttribute(AOMUIntProperty property, |
| 425 uint32_t& result) const { |
| 426 Element* element = this->GetElement(); |
| 427 if (!element) |
| 428 return false; |
| 429 |
| 430 bool is_null = true; |
| 431 result = |
| 432 AccessibleNode::GetPropertyOrARIAAttribute(element, property, is_null); |
| 433 return !is_null; |
| 434 } |
| 435 |
| 436 bool AXObjectImpl::HasAOMPropertyOrARIAAttribute(AOMIntProperty property, |
| 437 int32_t& result) const { |
| 438 Element* element = this->GetElement(); |
| 439 if (!element) |
| 440 return false; |
| 441 |
| 442 bool is_null = true; |
| 443 result = |
| 444 AccessibleNode::GetPropertyOrARIAAttribute(element, property, is_null); |
| 445 return !is_null; |
| 446 } |
| 447 |
| 448 bool AXObjectImpl::HasAOMPropertyOrARIAAttribute(AOMFloatProperty property, |
| 449 float& result) const { |
| 450 Element* element = this->GetElement(); |
| 451 if (!element) |
| 452 return false; |
| 453 |
| 454 bool is_null = true; |
| 455 result = |
| 456 AccessibleNode::GetPropertyOrARIAAttribute(element, property, is_null); |
| 457 return !is_null; |
| 458 } |
| 459 |
424 bool AXObjectImpl::IsARIATextControl() const { | 460 bool AXObjectImpl::IsARIATextControl() const { |
425 return AriaRoleAttribute() == kTextFieldRole || | 461 return AriaRoleAttribute() == kTextFieldRole || |
426 AriaRoleAttribute() == kSearchBoxRole || | 462 AriaRoleAttribute() == kSearchBoxRole || |
427 AriaRoleAttribute() == kComboBoxRole; | 463 AriaRoleAttribute() == kComboBoxRole; |
428 } | 464 } |
429 | 465 |
430 bool AXObjectImpl::IsButton() const { | 466 bool AXObjectImpl::IsButton() const { |
431 AccessibilityRole role = RoleValue(); | 467 AccessibilityRole role = RoleValue(); |
432 | 468 |
433 return role == kButtonRole || role == kPopUpButtonRole || | 469 return role == kButtonRole || role == kPopUpButtonRole || |
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2022 } | 2058 } |
2023 | 2059 |
2024 DEFINE_TRACE(AXObjectImpl) { | 2060 DEFINE_TRACE(AXObjectImpl) { |
2025 visitor->Trace(children_); | 2061 visitor->Trace(children_); |
2026 visitor->Trace(parent_); | 2062 visitor->Trace(parent_); |
2027 visitor->Trace(cached_live_region_root_); | 2063 visitor->Trace(cached_live_region_root_); |
2028 visitor->Trace(ax_object_cache_); | 2064 visitor->Trace(ax_object_cache_); |
2029 } | 2065 } |
2030 | 2066 |
2031 } // namespace blink | 2067 } // namespace blink |
OLD | NEW |