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

Unified Diff: Source/modules/accessibility/AXMenuList.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/AXMenuList.h ('k') | Source/modules/accessibility/AXMenuListOption.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXMenuList.cpp
diff --git a/Source/modules/accessibility/AXMenuList.cpp b/Source/modules/accessibility/AXMenuList.cpp
index fa80d6b4a1759780766c479905488a7208f8a3bd..44034b050f7866cbdb1c2b962ffdb24c59a128dc 100644
--- a/Source/modules/accessibility/AXMenuList.cpp
+++ b/Source/modules/accessibility/AXMenuList.cpp
@@ -32,12 +32,12 @@
namespace blink {
-AXMenuList::AXMenuList(LayoutMenuList* layoutObject, AXObjectCacheImpl* axObjectCache)
+AXMenuList::AXMenuList(LayoutMenuList* layoutObject, AXObjectCacheImpl& axObjectCache)
: AXLayoutObject(layoutObject, axObjectCache)
{
}
-PassRefPtr<AXMenuList> AXMenuList::create(LayoutMenuList* layoutObject, AXObjectCacheImpl* axObjectCache)
+PassRefPtr<AXMenuList> AXMenuList::create(LayoutMenuList* layoutObject, AXObjectCacheImpl& axObjectCache)
{
return adoptRef(new AXMenuList(layoutObject, axObjectCache));
}
@@ -80,15 +80,15 @@ void AXMenuList::addChildren()
{
m_haveChildren = true;
- AXObjectCacheImpl* cache = axObjectCache();
+ AXObjectCacheImpl& cache = axObjectCache();
- AXObject* list = cache->getOrCreate(MenuListPopupRole);
+ AXObject* list = cache.getOrCreate(MenuListPopupRole);
if (!list)
return;
toAXMockObject(list)->setParent(this);
if (list->accessibilityIsIgnored()) {
- cache->remove(list->axObjectID());
+ cache.remove(list->axObjectID());
return;
}
@@ -136,7 +136,7 @@ void AXMenuList::didUpdateActiveOption(int optionIndex)
}
}
- axObjectCache()->postNotification(this, AXObjectCacheImpl::AXMenuListValueChanged);
+ axObjectCache().postNotification(this, AXObjectCacheImpl::AXMenuListValueChanged);
}
void AXMenuList::didShowPopup()
@@ -157,7 +157,7 @@ void AXMenuList::didHidePopup()
popup->didHide();
if (node() && node()->focused())
- axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIElementChanged);
+ axObjectCache().postNotification(this, AXObjectCacheImpl::AXFocusedUIElementChanged);
}
} // namespace blink
« no previous file with comments | « Source/modules/accessibility/AXMenuList.h ('k') | Source/modules/accessibility/AXMenuListOption.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698