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

Unified Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 179163004: Have Document::topDocument() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/core/accessibility/AXObjectCache.h ('k') | Source/core/accessibility/AXRenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXObjectCache.cpp
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp
index 65ef398c7245e339769886dc160ff4c1bc5140fe..ad6a5cdba943a72401a977b6a54667d11e3049b3 100644
--- a/Source/core/accessibility/AXObjectCache.cpp
+++ b/Source/core/accessibility/AXObjectCache.cpp
@@ -107,10 +107,10 @@ void AXComputedObjectAttributeCache::clear()
bool AXObjectCache::gAccessibilityEnabled = false;
bool AXObjectCache::gInlineTextBoxAccessibility = false;
-AXObjectCache::AXObjectCache(const Document* doc)
- : m_notificationPostTimer(this, &AXObjectCache::notificationPostTimerFired)
+AXObjectCache::AXObjectCache(Document& document)
+ : m_document(document)
+ , m_notificationPostTimer(this, &AXObjectCache::notificationPostTimerFired)
{
- m_document = const_cast<Document*>(doc);
adamk 2014/02/26 17:30:52 Ha! Thanks for getting rid of this const_cast
m_computedObjectAttributeCache = AXComputedObjectAttributeCache::create();
}
@@ -447,7 +447,7 @@ AXObject* AXObjectCache::rootObject()
if (!gAccessibilityEnabled)
return 0;
- return getOrCreate(m_document->view());
+ return getOrCreate(m_document.view());
}
AXObject* AXObjectCache::getOrCreate(AccessibilityRole role)
« no previous file with comments | « Source/core/accessibility/AXObjectCache.h ('k') | Source/core/accessibility/AXRenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698