| Index: Source/WebCore/page/FrameView.cpp
|
| ===================================================================
|
| --- Source/WebCore/page/FrameView.cpp (revision 146890)
|
| +++ Source/WebCore/page/FrameView.cpp (working copy)
|
| @@ -302,8 +302,8 @@
|
|
|
| void FrameView::removeFromAXObjectCache()
|
| {
|
| - if (AXObjectCache* cache = axObjectCache())
|
| - cache->remove(this);
|
| + if (AXObjectCache::accessibilityEnabled() && axObjectCache())
|
| + axObjectCache()->remove(this);
|
| }
|
|
|
| void FrameView::clearFrame()
|
| @@ -1305,8 +1305,8 @@
|
| m_layoutCount++;
|
|
|
| #if PLATFORM(MAC) || PLATFORM(CHROMIUM)
|
| - if (AXObjectCache* cache = root->document()->existingAXObjectCache())
|
| - cache->postNotification(root, AXObjectCache::AXLayoutComplete, true);
|
| + if (AXObjectCache::accessibilityEnabled())
|
| + root->document()->axObjectCache()->postNotification(root, AXObjectCache::AXLayoutComplete, true);
|
| #endif
|
| #if ENABLE(DASHBOARD_SUPPORT) || ENABLE(DRAGGABLE_REGION)
|
| updateAnnotatedRegions();
|
| @@ -2504,8 +2504,8 @@
|
| // Align to the top and to the closest side (this matches other browsers).
|
| anchorNode->renderer()->scrollRectToVisible(rect, ScrollAlignment::alignToEdgeIfNeeded, ScrollAlignment::alignTopAlways);
|
|
|
| - if (AXObjectCache* cache = m_frame->document()->existingAXObjectCache())
|
| - cache->handleScrolledToAnchor(anchorNode.get());
|
| + if (AXObjectCache::accessibilityEnabled())
|
| + m_frame->document()->axObjectCache()->handleScrolledToAnchor(anchorNode.get());
|
|
|
| // scrollRectToVisible can call into setScrollPosition(), which resets m_maintainScrollPositionAnchor.
|
| m_maintainScrollPositionAnchor = anchorNode;
|
| @@ -3972,8 +3972,8 @@
|
|
|
| AXObjectCache* FrameView::axObjectCache() const
|
| {
|
| - if (frame() && frame()->document())
|
| - return frame()->document()->existingAXObjectCache();
|
| + if (frame() && frame()->document() && frame()->document()->axObjectCacheExists())
|
| + return frame()->document()->axObjectCache();
|
| return 0;
|
| }
|
|
|
|
|