| 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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 UpdateCachedAttributeValuesIfNeeded(); | 820 UpdateCachedAttributeValuesIfNeeded(); |
| 821 return cached_has_inherited_presentational_role_; | 821 return cached_has_inherited_presentational_role_; |
| 822 } | 822 } |
| 823 | 823 |
| 824 bool AXObjectImpl::IsPresentationalChild() const { | 824 bool AXObjectImpl::IsPresentationalChild() const { |
| 825 UpdateCachedAttributeValuesIfNeeded(); | 825 UpdateCachedAttributeValuesIfNeeded(); |
| 826 return cached_is_presentational_child_; | 826 return cached_is_presentational_child_; |
| 827 } | 827 } |
| 828 | 828 |
| 829 bool AXObjectImpl::CanReceiveAccessibilityFocus() const { | 829 bool AXObjectImpl::CanReceiveAccessibilityFocus() const { |
| 830 const Node* node = this->GetNode(); | 830 const Element* elem = GetElement(); |
| 831 if (!node) | |
| 832 return false; | |
| 833 | |
| 834 const Element* elem = ToElement(node); | |
| 835 if (!elem) | 831 if (!elem) |
| 836 return false; | 832 return false; |
| 837 | 833 |
| 838 // Focusable, and not forwarding the focus somewhere else | 834 // Focusable, and not forwarding the focus somewhere else |
| 839 if (elem->IsFocusable() && !elem->FastHasAttribute(aria_activedescendantAttr)) | 835 if (elem->IsFocusable() && !elem->FastHasAttribute(aria_activedescendantAttr)) |
| 840 return true; | 836 return true; |
| 841 | 837 |
| 842 // aria-activedescendant focus | 838 // aria-activedescendant focus |
| 843 return elem->FastHasAttribute(idAttr) && AncestorExposesActiveDescendant(); | 839 return elem->FastHasAttribute(idAttr) && AncestorExposesActiveDescendant(); |
| 844 } | 840 } |
| (...skipping 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2135 } | 2131 } |
| 2136 | 2132 |
| 2137 DEFINE_TRACE(AXObjectImpl) { | 2133 DEFINE_TRACE(AXObjectImpl) { |
| 2138 visitor->Trace(children_); | 2134 visitor->Trace(children_); |
| 2139 visitor->Trace(parent_); | 2135 visitor->Trace(parent_); |
| 2140 visitor->Trace(cached_live_region_root_); | 2136 visitor->Trace(cached_live_region_root_); |
| 2141 visitor->Trace(ax_object_cache_); | 2137 visitor->Trace(ax_object_cache_); |
| 2142 } | 2138 } |
| 2143 | 2139 |
| 2144 } // namespace blink | 2140 } // namespace blink |
| OLD | NEW |