Bug 1174631 (part 4) - Replace nsFrameManager's uses of PL_DHashTableEnumerate() with PLDHashTable::Iterator. r=dholbert.

This commit is contained in:
Nicholas Nethercote 2015-06-16 21:09:39 -07:00
parent a8d539dc34
commit dfd3d90f90

View File

@ -203,19 +203,13 @@ nsFrameManager::UnregisterPlaceholderFrame(nsPlaceholderFrame* aPlaceholderFrame
aPlaceholderFrame->GetOutOfFlowFrame());
}
static PLDHashOperator
UnregisterPlaceholders(PLDHashTable* table, PLDHashEntryHdr* hdr,
uint32_t number, void* arg)
{
PlaceholderMapEntry* entry = static_cast<PlaceholderMapEntry*>(hdr);
entry->placeholderFrame->SetOutOfFlowFrame(nullptr);
return PL_DHASH_NEXT;
}
void
nsFrameManager::ClearPlaceholderFrameMap()
{
PL_DHashTableEnumerate(&mPlaceholderMap, UnregisterPlaceholders, nullptr);
for (auto iter = mPlaceholderMap.Iter(); !iter.Done(); iter.Next()) {
auto entry = static_cast<PlaceholderMapEntry*>(iter.Get());
entry->placeholderFrame->SetOutOfFlowFrame(nullptr);
}
mPlaceholderMap.Clear();
}