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

Unified Diff: Source/modules/accessibility/AXSlider.cpp

Issue 1175533004: Refactor: Clear m_axObjectCache when AXObject detaches (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added ASSERT Created 5 years, 6 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/modules/accessibility/AXSlider.h ('k') | Source/modules/accessibility/AXSpinButton.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXSlider.cpp
diff --git a/Source/modules/accessibility/AXSlider.cpp b/Source/modules/accessibility/AXSlider.cpp
index a5dba4554488380f7a7c49974c1329f202d2da60..fe8da1d6a955113f1223f324849cf7181a16762c 100644
--- a/Source/modules/accessibility/AXSlider.cpp
+++ b/Source/modules/accessibility/AXSlider.cpp
@@ -39,12 +39,12 @@ namespace blink {
using namespace HTMLNames;
-AXSlider::AXSlider(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
+AXSlider::AXSlider(LayoutObject* layoutObject, AXObjectCacheImpl& axObjectCache)
: AXLayoutObject(layoutObject, axObjectCache)
{
}
-PassRefPtr<AXSlider> AXSlider::create(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
+PassRefPtr<AXSlider> AXSlider::create(LayoutObject* layoutObject, AXObjectCacheImpl& axObjectCache)
{
return adoptRef(new AXSlider(layoutObject, axObjectCache));
}
@@ -91,15 +91,15 @@ void AXSlider::addChildren()
m_haveChildren = true;
- AXObjectCacheImpl* cache = axObjectCache();
+ AXObjectCacheImpl& cache = axObjectCache();
- AXSliderThumb* thumb = static_cast<AXSliderThumb*>(cache->getOrCreate(SliderThumbRole));
+ AXSliderThumb* thumb = static_cast<AXSliderThumb*>(cache.getOrCreate(SliderThumbRole));
thumb->setParent(this);
// Before actually adding the value indicator to the hierarchy,
// allow the platform to make a final decision about it.
if (thumb->accessibilityIsIgnored())
- cache->remove(thumb->axObjectID());
+ cache.remove(thumb->axObjectID());
else
m_children.append(thumb);
}
@@ -117,7 +117,7 @@ AXObject* AXSlider::elementAccessibilityHitTest(const IntPoint& point) const
return m_children[0].get();
}
- return axObjectCache()->getOrCreate(m_layoutObject);
+ return axObjectCache().getOrCreate(m_layoutObject);
}
void AXSlider::setValue(const String& value)
@@ -138,12 +138,12 @@ HTMLInputElement* AXSlider::element() const
return toHTMLInputElement(m_layoutObject->node());
}
-AXSliderThumb::AXSliderThumb(AXObjectCacheImpl* axObjectCache)
+AXSliderThumb::AXSliderThumb(AXObjectCacheImpl& axObjectCache)
: AXMockObject(axObjectCache)
{
}
-PassRefPtr<AXSliderThumb> AXSliderThumb::create(AXObjectCacheImpl* axObjectCache)
+PassRefPtr<AXSliderThumb> AXSliderThumb::create(AXObjectCacheImpl& axObjectCache)
{
return adoptRef(new AXSliderThumb(axObjectCache));
}
« no previous file with comments | « Source/modules/accessibility/AXSlider.h ('k') | Source/modules/accessibility/AXSpinButton.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698