Chromium Code Reviews| 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) |