зеркало из https://github.com/mozilla/pjs.git
Removed PutCachedData(etc) API from nsIPresShell
This commit is contained in:
Родитель
b9f60d4d2e
Коммит
31261d92a4
|
@ -85,16 +85,6 @@ public:
|
|||
|
||||
virtual void ProcessReflowCommands() = 0;
|
||||
|
||||
/**
|
||||
* Place some cached data into the shell's cache. The key for
|
||||
* the cache is the given frame.
|
||||
*/
|
||||
virtual void PutCachedData(nsIFrame* aKeyFrame, void* aData) = 0;
|
||||
|
||||
virtual void* GetCachedData(nsIFrame* aKeyFrame) = 0;
|
||||
|
||||
virtual void* RemoveCachedData(nsIFrame* aKeyFrame) = 0;
|
||||
|
||||
// XXX events
|
||||
// XXX selection
|
||||
};
|
||||
|
|
|
@ -85,16 +85,6 @@ public:
|
|||
|
||||
virtual void ProcessReflowCommands() = 0;
|
||||
|
||||
/**
|
||||
* Place some cached data into the shell's cache. The key for
|
||||
* the cache is the given frame.
|
||||
*/
|
||||
virtual void PutCachedData(nsIFrame* aKeyFrame, void* aData) = 0;
|
||||
|
||||
virtual void* GetCachedData(nsIFrame* aKeyFrame) = 0;
|
||||
|
||||
virtual void* RemoveCachedData(nsIFrame* aKeyFrame) = 0;
|
||||
|
||||
// XXX events
|
||||
// XXX selection
|
||||
};
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#undef NOISY
|
||||
|
||||
#if 0
|
||||
static PLHashNumber
|
||||
HashKey(nsIFrame* key)
|
||||
{
|
||||
|
@ -124,6 +125,7 @@ FrameHashTable::Remove(nsIFrame* aKey)
|
|||
}
|
||||
return oldValue;
|
||||
}
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
@ -190,16 +192,12 @@ public:
|
|||
virtual nsIFrame* FindFrameWithContent(nsIContent* aContent);
|
||||
virtual void AppendReflowCommand(nsIReflowCommand* aReflowCommand);
|
||||
virtual void ProcessReflowCommands();
|
||||
virtual void PutCachedData(nsIFrame* aKeyFrame, void* aData);
|
||||
virtual void* GetCachedData(nsIFrame* aKeyFrame);
|
||||
virtual void* RemoveCachedData(nsIFrame* aKeyFrame);
|
||||
|
||||
protected:
|
||||
~PresShell();
|
||||
|
||||
void InitFrameVerifyTreeLogModuleInfo();
|
||||
|
||||
FrameHashTable* mCache;
|
||||
nsIDocument* mDocument;
|
||||
nsIPresContext* mPresContext;
|
||||
nsIStyleSet* mStyleSet;
|
||||
|
@ -259,8 +257,6 @@ PresShell::QueryInterface(const nsIID& aIID, void** aInstancePtr)
|
|||
|
||||
PresShell::~PresShell()
|
||||
{
|
||||
delete mCache;
|
||||
|
||||
if (nsnull != mDocument) {
|
||||
mDocument->DeleteShell(this);
|
||||
NS_RELEASE(mDocument);
|
||||
|
@ -294,8 +290,6 @@ PresShell::Init(nsIDocument* aDocument,
|
|||
return NS_ERROR_ALREADY_INITIALIZED;
|
||||
}
|
||||
|
||||
mCache = new FrameHashTable();
|
||||
|
||||
mDocument = aDocument;
|
||||
NS_ADDREF(aDocument);
|
||||
mViewManager = aViewManager;
|
||||
|
@ -743,25 +737,6 @@ PresShell::FindFrameWithContent(nsIContent* aContent)
|
|||
return ::FindFrameWithContent(mRootFrame, aContent);
|
||||
}
|
||||
|
||||
void
|
||||
PresShell::PutCachedData(nsIFrame* aKeyFrame, void* aData)
|
||||
{
|
||||
void* oldData = mCache->Put(aKeyFrame, aData);
|
||||
NS_ASSERTION(nsnull == oldData, "bad cached data usage");
|
||||
}
|
||||
|
||||
void*
|
||||
PresShell::GetCachedData(nsIFrame* aKeyFrame)
|
||||
{
|
||||
return mCache->Get(aKeyFrame);
|
||||
}
|
||||
|
||||
void*
|
||||
PresShell::RemoveCachedData(nsIFrame* aKeyFrame)
|
||||
{
|
||||
return mCache->Remove(aKeyFrame);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
NS_LAYOUT nsresult
|
||||
|
|
Загрузка…
Ссылка в новой задаче