| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 m_cachedIsDescendantOfDisabledNode(false), | 357 m_cachedIsDescendantOfDisabledNode(false), |
| 358 m_cachedHasInheritedPresentationalRole(false), | 358 m_cachedHasInheritedPresentationalRole(false), |
| 359 m_cachedIsPresentationalChild(false), | 359 m_cachedIsPresentationalChild(false), |
| 360 m_cachedAncestorExposesActiveDescendant(false), | 360 m_cachedAncestorExposesActiveDescendant(false), |
| 361 m_cachedLiveRegionRoot(nullptr), | 361 m_cachedLiveRegionRoot(nullptr), |
| 362 m_axObjectCache(&axObjectCache) { | 362 m_axObjectCache(&axObjectCache) { |
| 363 ++s_numberOfLiveAXObjects; | 363 ++s_numberOfLiveAXObjects; |
| 364 } | 364 } |
| 365 | 365 |
| 366 AXObject::~AXObject() { | 366 AXObject::~AXObject() { |
| 367 ASSERT(isDetached()); | 367 DCHECK(isDetached()); |
| 368 --s_numberOfLiveAXObjects; | 368 --s_numberOfLiveAXObjects; |
| 369 } | 369 } |
| 370 | 370 |
| 371 void AXObject::detach() { | 371 void AXObject::detach() { |
| 372 // Clear any children and call detachFromParent on them so that | 372 // Clear any children and call detachFromParent on them so that |
| 373 // no children are left with dangling pointers to their parent. | 373 // no children are left with dangling pointers to their parent. |
| 374 clearChildren(); | 374 clearChildren(); |
| 375 | 375 |
| 376 m_axObjectCache = nullptr; | 376 m_axObjectCache = nullptr; |
| 377 } | 377 } |
| (...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1665 ariaRole == ComboBoxRole || ariaRole == SliderRole; | 1665 ariaRole == ComboBoxRole || ariaRole == SliderRole; |
| 1666 } | 1666 } |
| 1667 | 1667 |
| 1668 bool AXObject::isARIAInput(AccessibilityRole ariaRole) { | 1668 bool AXObject::isARIAInput(AccessibilityRole ariaRole) { |
| 1669 return ariaRole == RadioButtonRole || ariaRole == CheckBoxRole || | 1669 return ariaRole == RadioButtonRole || ariaRole == CheckBoxRole || |
| 1670 ariaRole == TextFieldRole || ariaRole == SwitchRole || | 1670 ariaRole == TextFieldRole || ariaRole == SwitchRole || |
| 1671 ariaRole == SearchBoxRole; | 1671 ariaRole == SearchBoxRole; |
| 1672 } | 1672 } |
| 1673 | 1673 |
| 1674 AccessibilityRole AXObject::ariaRoleToWebCoreRole(const String& value) { | 1674 AccessibilityRole AXObject::ariaRoleToWebCoreRole(const String& value) { |
| 1675 ASSERT(!value.isEmpty()); | 1675 DCHECK(!value.isEmpty()); |
| 1676 | 1676 |
| 1677 static const ARIARoleMap* roleMap = createARIARoleMap(); | 1677 static const ARIARoleMap* roleMap = createARIARoleMap(); |
| 1678 | 1678 |
| 1679 Vector<String> roleVector; | 1679 Vector<String> roleVector; |
| 1680 value.split(' ', roleVector); | 1680 value.split(' ', roleVector); |
| 1681 AccessibilityRole role = UnknownRole; | 1681 AccessibilityRole role = UnknownRole; |
| 1682 for (const auto& child : roleVector) { | 1682 for (const auto& child : roleVector) { |
| 1683 role = roleMap->at(child); | 1683 role = roleMap->at(child); |
| 1684 if (role) | 1684 if (role) |
| 1685 return role; | 1685 return role; |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 } | 1792 } |
| 1793 | 1793 |
| 1794 DEFINE_TRACE(AXObject) { | 1794 DEFINE_TRACE(AXObject) { |
| 1795 visitor->trace(m_children); | 1795 visitor->trace(m_children); |
| 1796 visitor->trace(m_parent); | 1796 visitor->trace(m_parent); |
| 1797 visitor->trace(m_cachedLiveRegionRoot); | 1797 visitor->trace(m_cachedLiveRegionRoot); |
| 1798 visitor->trace(m_axObjectCache); | 1798 visitor->trace(m_axObjectCache); |
| 1799 } | 1799 } |
| 1800 | 1800 |
| 1801 } // namespace blink | 1801 } // namespace blink |
| OLD | NEW |