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

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

Issue 1589623002: Keep track of accessibility focus across windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 4 years, 11 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 314bcaa6d1c0290441f3137f5c37d3356bc3b655..0fcf606526db6b67d091ab9a2579e609bf1f625f 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -149,12 +149,13 @@ AXObject* AXObjectCacheImpl::focusedImageMapUIElement(HTMLAreaElement* areaEleme
return 0;
}
-AXObject* AXObjectCacheImpl::focusedUIElementForPage(const Page* page)
+AXObject* AXObjectCacheImpl::focusedObject()
{
- if (!page->settings().accessibilityEnabled())
+ if (!accessibilityEnabled())
return 0;
// Cross-process accessibility is not yet implemented.
+ Page* page = m_document->page();
if (!page->focusController().focusedOrMainFrame()->isLocalFrame())
return 0;
@@ -1114,7 +1115,7 @@ void AXObjectCacheImpl::handleFocusedUIElementChanged(Node* oldFocusedNode, Node
if (!page)
return;
- AXObject* focusedObject = focusedUIElementForPage(page);
+ AXObject* focusedObject = this->focusedObject();
if (!focusedObject)
return;

Powered by Google App Engine
This is Rietveld 408576698