Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 235553006: Move Document pointer from Frame to LocalFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/frame/Frame.h » ('j') | Source/core/frame/LocalFrame.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/frame/Frame.h » ('j') | Source/core/frame/LocalFrame.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698