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

Unified Diff: third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp

Issue 1761633002: One accessibility tree per frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ChromeVox test traversing iframes Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
index 17a69f076ccaf0a43ba24a44c0ec3a57d3f20ae2..74a0b83c445e0b8538db0388755d446d7754f24e 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -157,25 +157,16 @@ AXObject* AXObjectCacheImpl::focusedObject()
if (!accessibilityEnabled())
return 0;
- // We don't have to return anything if the focused frame is not local;
- // the remote frame will have its own AXObjectCacheImpl and the focused
- // object will be sorted out by the browser process.
- Page* page = m_document->page();
- if (!page->focusController().focusedFrame())
- return 0;
-
- // Get the focused node in the page.
- Document* focusedDocument = page->focusController().focusedFrame()->document();
- Node* focusedNode = focusedDocument->focusedElement();
+ Node* focusedNode = m_document->focusedElement();
if (!focusedNode)
- focusedNode = focusedDocument;
+ focusedNode = m_document;
// If it's an image map, get the focused link within the image map.
if (isHTMLAreaElement(focusedNode))
return focusedImageMapUIElement(toHTMLAreaElement(focusedNode));
// See if there's a page popup, for example a calendar picker.
- Element* adjustedFocusedElement = focusedDocument->adjustedFocusedElement();
+ Element* adjustedFocusedElement = m_document->adjustedFocusedElement();
if (isHTMLInputElement(adjustedFocusedElement)) {
if (AXObject* axPopup = toHTMLInputElement(adjustedFocusedElement)->popupRootAXObject()) {
if (Element* focusedElementInPopup = axPopup->document()->focusedElement())

Powered by Google App Engine
This is Rietveld 408576698