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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 return 0; | 958 return 0; |
959 | 959 |
960 if (m_renderer->node() && !m_renderer->node()->isElementNode()) | 960 if (m_renderer->node() && !m_renderer->node()->isElementNode()) |
961 return 0; | 961 return 0; |
962 Element* element = toElement(m_renderer->node()); | 962 Element* element = toElement(m_renderer->node()); |
963 | 963 |
964 const AtomicString& activeDescendantAttrStr = element->getAttribute(aria_act
ivedescendantAttr); | 964 const AtomicString& activeDescendantAttrStr = element->getAttribute(aria_act
ivedescendantAttr); |
965 if (activeDescendantAttrStr.isNull() || activeDescendantAttrStr.isEmpty()) | 965 if (activeDescendantAttrStr.isNull() || activeDescendantAttrStr.isEmpty()) |
966 return 0; | 966 return 0; |
967 | 967 |
968 Element* target = element->treeScope().getElementById(activeDescendantAttrSt
r); | 968 Element* target = element->treeScope()->getElementById(activeDescendantAttrS
tr); |
969 if (!target) | 969 if (!target) |
970 return 0; | 970 return 0; |
971 | 971 |
972 AccessibilityObject* obj = axObjectCache()->getOrCreate(target); | 972 AccessibilityObject* obj = axObjectCache()->getOrCreate(target); |
973 if (obj && obj->isAccessibilityRenderObject()) | 973 if (obj && obj->isAccessibilityRenderObject()) |
974 // an activedescendant is only useful if it has a renderer, because that's w
hat's needed to post the notification | 974 // an activedescendant is only useful if it has a renderer, because that's w
hat's needed to post the notification |
975 return obj; | 975 return obj; |
976 return 0; | 976 return 0; |
977 } | 977 } |
978 | 978 |
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2375 if (label && label->renderer()) { | 2375 if (label && label->renderer()) { |
2376 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); | 2376 LayoutRect labelRect = axObjectCache()->getOrCreate(label)->elementR
ect(); |
2377 result.unite(labelRect); | 2377 result.unite(labelRect); |
2378 } | 2378 } |
2379 } | 2379 } |
2380 | 2380 |
2381 return result; | 2381 return result; |
2382 } | 2382 } |
2383 | 2383 |
2384 } // namespace WebCore | 2384 } // namespace WebCore |
OLD | NEW |