void FramePropertyTable::DeleteAll() { mLastFrame = nullptr; mLastEntry = nullptr; for (auto iter = mEntries.Iter(); !iter.Done(); iter.Next()) { DeleteAllForEntry(iter.Get()); } mEntries.Clear(); }
void FramePropertyTable::DeleteAllFor(nsIFrame* aFrame) { NS_ASSERTION(aFrame, "Null frame?"); Entry* entry = mEntries.GetEntry(aFrame); if (!entry) return; if (mLastFrame == aFrame) { // Flush cache. We assume DeleteAllForEntry will be called before // a frame is destroyed. mLastFrame = nullptr; mLastEntry = nullptr; } DeleteAllForEntry(entry); mEntries.RawRemoveEntry(entry); }
/* static */ PLDHashOperator FramePropertyTable::DeleteEnumerator(Entry* aEntry, void* aArg) { DeleteAllForEntry(aEntry); return PL_DHASH_REMOVE; }