| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 } | 154 } |
| 155 | 155 |
| 156 return 0; | 156 return 0; |
| 157 } | 157 } |
| 158 | 158 |
| 159 AXObject* AXObjectCache::focusedUIElementForPage(const Page* page) | 159 AXObject* AXObjectCache::focusedUIElementForPage(const Page* page) |
| 160 { | 160 { |
| 161 if (!gAccessibilityEnabled) | 161 if (!gAccessibilityEnabled) |
| 162 return 0; | 162 return 0; |
| 163 | 163 |
| 164 // Cross-process accessibility is not yet implemented. |
| 165 if (!page->focusController().focusedOrMainFrame()->isLocalFrame()) |
| 166 return 0; |
| 167 |
| 164 // get the focused node in the page | 168 // get the focused node in the page |
| 165 Document* focusedDocument = page->focusController().focusedOrMainFrame()->do
cument(); | 169 Document* focusedDocument = toLocalFrame(page->focusController().focusedOrMa
inFrame())->document(); |
| 166 Node* focusedNode = focusedDocument->focusedElement(); | 170 Node* focusedNode = focusedDocument->focusedElement(); |
| 167 if (!focusedNode) | 171 if (!focusedNode) |
| 168 focusedNode = focusedDocument; | 172 focusedNode = focusedDocument; |
| 169 | 173 |
| 170 if (isHTMLAreaElement(*focusedNode)) | 174 if (isHTMLAreaElement(*focusedNode)) |
| 171 return focusedImageMapUIElement(toHTMLAreaElement(focusedNode)); | 175 return focusedImageMapUIElement(toHTMLAreaElement(focusedNode)); |
| 172 | 176 |
| 173 AXObject* obj = focusedNode->document().axObjectCache()->getOrCreate(focused
Node); | 177 AXObject* obj = focusedNode->document().axObjectCache()->getOrCreate(focused
Node); |
| 174 if (!obj) | 178 if (!obj) |
| 175 return 0; | 179 return 0; |
| (...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1063 { | 1067 { |
| 1064 postPlatformNotification(getOrCreate(scrollView), AXScrollPositionChanged); | 1068 postPlatformNotification(getOrCreate(scrollView), AXScrollPositionChanged); |
| 1065 } | 1069 } |
| 1066 | 1070 |
| 1067 void AXObjectCache::handleScrollPositionChanged(RenderObject* renderObject) | 1071 void AXObjectCache::handleScrollPositionChanged(RenderObject* renderObject) |
| 1068 { | 1072 { |
| 1069 postPlatformNotification(getOrCreate(renderObject), AXScrollPositionChanged)
; | 1073 postPlatformNotification(getOrCreate(renderObject), AXScrollPositionChanged)
; |
| 1070 } | 1074 } |
| 1071 | 1075 |
| 1072 } // namespace WebCore | 1076 } // namespace WebCore |
| OLD | NEW |