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

Unified Diff: Source/WebCore/page/FrameView.cpp

Issue 12703031: Revert 146726 "AXObjectCache gets recreated during document tear..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 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
« no previous file with comments | « Source/WebCore/page/Frame.cpp ('k') | Source/WebCore/platform/ScrollView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/WebCore/page/Frame.cpp ('k') | Source/WebCore/platform/ScrollView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698