Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 6161049668c40d4b889dd4d3bdf6d0aebb1b9319..bd03b6b97be299a6a93826ba54cc9e0bbb651880 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2278,9 +2278,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 (!axObjectCacheOwner().renderView()) |
@@ -2291,7 +2288,8 @@ AXObjectCache* Document::existingAXObjectCache() const |
AXObjectCache* Document::axObjectCache() const |
{ |
- if (!AXObjectCache::accessibilityEnabled()) |
+ Settings* settings = this->settings(); |
+ if (!settings || !settings->accessibilityEnabled()) |
return 0; |
// The only document that actually has a AXObjectCache is the top-level |
@@ -2593,7 +2591,8 @@ void Document::implicitClose() |
m_loadEventProgress = LoadEventCompleted; |
- if (frame() && renderView() && AXObjectCache::accessibilityEnabled()) { |
+ Settings* settings = this->settings(); |
+ if (frame() && renderView() && settings && settings->accessibilityEnabled()) { |
abarth-chromium
2014/08/29 18:32:07
There's no need to null check settings here. If y
aboxhall
2014/08/29 20:35:16
Done.
|
// 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 |