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

Unified Diff: Source/modules/accessibility/AXTable.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/AXTable.h ('k') | Source/modules/accessibility/AXTableCell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/accessibility/AXTable.cpp
diff --git a/Source/modules/accessibility/AXTable.cpp b/Source/modules/accessibility/AXTable.cpp
index c7687a07e7714399b3784a303d770087c5b6abef..bbad9ccab57f3c9374d9d11a8cafefc5847dd080 100644
--- a/Source/modules/accessibility/AXTable.cpp
+++ b/Source/modules/accessibility/AXTable.cpp
@@ -48,7 +48,7 @@ namespace blink {
using namespace HTMLNames;
-AXTable::AXTable(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
+AXTable::AXTable(LayoutObject* layoutObject, AXObjectCacheImpl& axObjectCache)
: AXLayoutObject(layoutObject, axObjectCache)
, m_headerContainer(nullptr)
, m_isAXTable(true)
@@ -65,7 +65,7 @@ void AXTable::init()
m_isAXTable = isTableExposableThroughAccessibility();
}
-PassRefPtr<AXTable> AXTable::create(LayoutObject* layoutObject, AXObjectCacheImpl* axObjectCache)
+PassRefPtr<AXTable> AXTable::create(LayoutObject* layoutObject, AXObjectCacheImpl& axObjectCache)
{
return adoptRef(new AXTable(layoutObject, axObjectCache));
}
@@ -371,7 +371,7 @@ void AXTable::addChildren()
return;
LayoutTable* table = toLayoutTable(m_layoutObject);
- AXObjectCacheImpl* axCache = axObjectCache();
+ AXObjectCacheImpl& axCache = axObjectCache();
Node* tableNode = table->node();
if (!isHTMLTableElement(tableNode))
@@ -379,7 +379,7 @@ void AXTable::addChildren()
// Add caption
if (HTMLTableCaptionElement* caption = toHTMLTableElement(tableNode)->caption()) {
- AXObject* captionObject = axCache->getOrCreate(caption);
+ AXObject* captionObject = axCache.getOrCreate(caption);
if (captionObject && !captionObject->accessibilityIsIgnored())
m_children.append(captionObject);
}
@@ -401,7 +401,7 @@ void AXTable::addChildren()
if (!layoutRow)
continue;
- AXObject* rowObject = axCache->getOrCreate(layoutRow);
+ AXObject* rowObject = axCache.getOrCreate(layoutRow);
if (!rowObject || !rowObject->isTableRow())
continue;
@@ -424,7 +424,7 @@ void AXTable::addChildren()
// make the columns based on the number of columns in the first body
unsigned length = initialTableSection->numColumns();
for (unsigned i = 0; i < length; ++i) {
- AXTableColumn* column = toAXTableColumn(axCache->getOrCreate(ColumnRole));
+ AXTableColumn* column = toAXTableColumn(axCache.getOrCreate(ColumnRole));
column->setColumnIndex((int)i);
column->setParent(this);
m_columns.append(column);
@@ -442,7 +442,7 @@ AXObject* AXTable::headerContainer()
if (m_headerContainer)
return m_headerContainer.get();
- AXMockObject* tableHeader = toAXMockObject(axObjectCache()->getOrCreate(TableHeaderContainerRole));
+ AXMockObject* tableHeader = toAXMockObject(axObjectCache().getOrCreate(TableHeaderContainerRole));
tableHeader->setParent(this);
m_headerContainer = tableHeader;
« no previous file with comments | « Source/modules/accessibility/AXTable.h ('k') | Source/modules/accessibility/AXTableCell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698