Make all nsBidiPresUtils methods static. Bug 624798, r=roc

This commit is contained in:
Simon Montagu
2011-04-13 12:23:49 +03:00
parent b0d7a6f909
commit d03542b94f
16 changed files with 550 additions and 712 deletions

View File

@@ -1408,15 +1408,6 @@ public:
return PL_DHASH_NEXT;
}
static PLDHashOperator LiveShellBidiSizeEnumerator(PresShellPtrKey *aEntry,
void *userArg)
{
PresShell *aShell = static_cast<PresShell*>(aEntry->GetKey());
PRUint32 *val = (PRUint32*)userArg;
*val += aShell->mPresContext->GetBidiMemoryUsed();
return PL_DHASH_NEXT;
}
static PRUint32
EstimateShellsMemory(nsTHashtable<PresShellPtrKey>::Enumerator aEnumerator)
{
@@ -1430,10 +1421,6 @@ public:
return EstimateShellsMemory(LiveShellSizeEnumerator);
}
static PRInt64 SizeOfBidiMemoryReporter(void *) {
return EstimateShellsMemory(LiveShellBidiSizeEnumerator);
}
protected:
void QueryIsActive();
nsresult UpdateImageLockingState();
@@ -1649,12 +1636,6 @@ NS_MEMORY_REPORTER_IMPLEMENT(LayoutPresShell,
PresShell::SizeOfLayoutMemoryReporter,
nsnull)
NS_MEMORY_REPORTER_IMPLEMENT(LayoutBidi,
"layout/bidi",
"Memory in use by layout Bidi processor.",
PresShell::SizeOfBidiMemoryReporter,
nsnull)
PresShell::PresShell()
{
mSelection = nsnull;
@@ -1682,7 +1663,6 @@ PresShell::PresShell()
static bool registeredReporter = false;
if (!registeredReporter) {
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(LayoutPresShell));
NS_RegisterMemoryReporter(new NS_MEMORY_REPORTER_NAME(LayoutBidi));
registeredReporter = true;
}