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

Unified Diff: Source/modules/accessibility/AXListBox.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/AXListBox.h ('k') | Source/modules/accessibility/AXListBoxOption.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXListBox.cpp
diff --git a/Source/modules/accessibility/AXListBox.cpp b/Source/modules/accessibility/AXListBox.cpp
index 6c13c63b5f82f37e59a184b14eba5d1154540833..1035ed616ebc1e5058b71728937cf407069fc598 100644
--- a/Source/modules/accessibility/AXListBox.cpp
+++ b/Source/modules/accessibility/AXListBox.cpp
@@ -39,7 +39,7 @@ namespace blink {
using namespace HTMLNames;
-AXListBox::AXListBox(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
+AXListBox::AXListBox(LayoutObject* layoutObject, AXObjectCacheImpl& axObjectCache)
: AXLayoutObject(layoutObject, axObjectCache)
, m_activeIndex(-1)
{
@@ -50,7 +50,7 @@ AXListBox::~AXListBox()
{
}
-PassRefPtr<AXListBox> AXListBox::create(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
+PassRefPtr<AXListBox> AXListBox::create(LayoutObject* layoutObject, AXObjectCacheImpl& axObjectCache)
{
return adoptRef(new AXListBox(layoutObject, axObjectCache));
}
@@ -72,7 +72,7 @@ AXObject* AXListBox::activeDescendant() const
int activeIndex = select->activeSelectionEndListIndex();
if (activeIndex >= 0 && activeIndex < static_cast<int>(select->length())) {
HTMLOptionElement* option = select->item(m_activeIndex);
- return axObjectCache()->get(option);
+ return axObjectCache().get(option);
}
return nullptr;
@@ -94,9 +94,9 @@ void AXListBox::activeIndexChanged()
if (m_activeIndex >= 0 && m_activeIndex < static_cast<int>(select->length())) {
HTMLOptionElement* option = select->item(m_activeIndex);
- axObjectCache()->postNotification(option, AXObjectCacheImpl::AXFocusedUIElementChanged);
+ axObjectCache().postNotification(option, AXObjectCacheImpl::AXFocusedUIElementChanged);
} else {
- axObjectCache()->postNotification(this, AXObjectCacheImpl::AXFocusedUIElementChanged);
+ axObjectCache().postNotification(this, AXObjectCacheImpl::AXFocusedUIElementChanged);
}
}
« no previous file with comments | « Source/modules/accessibility/AXListBox.h ('k') | Source/modules/accessibility/AXListBoxOption.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698