| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 { | 153 { |
| 154 if (!gAccessibilityEnabled) | 154 if (!gAccessibilityEnabled) |
| 155 return 0; | 155 return 0; |
| 156 | 156 |
| 157 // get the focused node in the page | 157 // get the focused node in the page |
| 158 Document* focusedDocument = page->focusController()->focusedOrMainFrame()->d
ocument(); | 158 Document* focusedDocument = page->focusController()->focusedOrMainFrame()->d
ocument(); |
| 159 Node* focusedNode = focusedDocument->focusedNode(); | 159 Node* focusedNode = focusedDocument->focusedNode(); |
| 160 if (!focusedNode) | 160 if (!focusedNode) |
| 161 focusedNode = focusedDocument; | 161 focusedNode = focusedDocument; |
| 162 | 162 |
| 163 if (focusedNode->hasTagName(areaTag)) | 163 if (isHTMLAreaElement(focusedNode)) |
| 164 return focusedImageMapUIElement(static_cast<HTMLAreaElement*>(focusedNod
e)); | 164 return focusedImageMapUIElement(toHTMLAreaElement(focusedNode)); |
| 165 | 165 |
| 166 AccessibilityObject* obj = focusedNode->document()->axObjectCache()->getOrCr
eate(focusedNode); | 166 AccessibilityObject* obj = focusedNode->document()->axObjectCache()->getOrCr
eate(focusedNode); |
| 167 if (!obj) | 167 if (!obj) |
| 168 return 0; | 168 return 0; |
| 169 | 169 |
| 170 if (obj->shouldFocusActiveDescendant()) { | 170 if (obj->shouldFocusActiveDescendant()) { |
| 171 if (AccessibilityObject* descendant = obj->activeDescendant()) | 171 if (AccessibilityObject* descendant = obj->activeDescendant()) |
| 172 obj = descendant; | 172 obj = descendant; |
| 173 } | 173 } |
| 174 | 174 |
| 175 // the HTML element, for example, is focusable but has an AX object that is
ignored | 175 // the HTML element, for example, is focusable but has an AX object that is
ignored |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) | 1021 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) |
| 1022 { | 1022 { |
| 1023 // The anchor node may not be accessible. Post the notification for the | 1023 // The anchor node may not be accessible. Post the notification for the |
| 1024 // first accessible object. | 1024 // first accessible object. |
| 1025 postPlatformNotification(AccessibilityObject::firstAccessibleObjectFromNode(
anchorNode), AXScrolledToAnchor); | 1025 postPlatformNotification(AccessibilityObject::firstAccessibleObjectFromNode(
anchorNode), AXScrolledToAnchor); |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 } // namespace WebCore | 1028 } // namespace WebCore |
| 1029 | 1029 |
| 1030 #endif // HAVE(ACCESSIBILITY) | 1030 #endif // HAVE(ACCESSIBILITY) |
| OLD | NEW |