Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index ad901ee9f0a31e05ae7cdc8c6c3551b5b8e5ab1d..42cc5b687803fefd5c522395e64c57d105bd755f 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2262,9 +2262,6 @@ void Document::clearAXObjectCache() |
AXObjectCache* Document::existingAXObjectCache() const |
{ |
- if (!AXObjectCache::accessibilityEnabled()) |
- return 0; |
- |
// If the renderer is gone then we are in the process of destruction. |
// This method will be called before m_frame = 0. |
if (!topDocument().renderView()) |
@@ -2275,7 +2272,7 @@ AXObjectCache* Document::existingAXObjectCache() const |
AXObjectCache* Document::axObjectCache() const |
{ |
- if (!AXObjectCache::accessibilityEnabled()) |
+ if (!settings() || !settings()->accessibilityEnabled()) |
abarth-chromium
2014/08/23 05:59:11
Please don't call settings() twice. It's not free
aboxhall
2014/08/27 15:26:33
Done.
|
return 0; |
// The only document that actually has a AXObjectCache is the top-level |
@@ -2577,7 +2574,7 @@ void Document::implicitClose() |
m_loadEventProgress = LoadEventCompleted; |
- if (frame() && renderView() && AXObjectCache::accessibilityEnabled()) { |
+ if (frame() && renderView() && settings() && settings()->accessibilityEnabled()) { |
// The AX cache may have been cleared at this point, but we need to make sure it contains an |
// AX object to send the notification to. getOrCreate will make sure that an valid AX object |
// exists in the cache (we ignore the return value because we don't need it here). This is |