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; |