예제 #1
0
void
FramePropertyTable::DeleteAll()
{
    mLastFrame = nullptr;
    mLastEntry = nullptr;

    for (auto iter = mEntries.Iter(); !iter.Done(); iter.Next()) {
        DeleteAllForEntry(iter.Get());
    }
    mEntries.Clear();
}
예제 #2
0
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);
}
예제 #3
0
/* static */ PLDHashOperator
FramePropertyTable::DeleteEnumerator(Entry* aEntry, void* aArg)
{
  DeleteAllForEntry(aEntry);
  return PL_DHASH_REMOVE;
}