| 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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 } | 1931 } |
| 1896 | 1932 |
| 1897 DEFINE_TRACE(AXObjectImpl) { | 1933 DEFINE_TRACE(AXObjectImpl) { |
| 1898 visitor->Trace(children_); | 1934 visitor->Trace(children_); |
| 1899 visitor->Trace(parent_); | 1935 visitor->Trace(parent_); |
| 1900 visitor->Trace(cached_live_region_root_); | 1936 visitor->Trace(cached_live_region_root_); |
| 1901 visitor->Trace(ax_object_cache_); | 1937 visitor->Trace(ax_object_cache_); |
| 1902 } | 1938 } |
| 1903 | 1939 |
| 1904 } // namespace blink | 1940 } // namespace blink |
| OLD | NEW |