Fixed compilation bustage by using nsIFrameDebug to invoke list and regression data methods
git-svn-id: svn://10.0.0.236/trunk@52439 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
af506bd6c9
commit
824e50d549
@ -2656,6 +2656,7 @@ nsBrowserWindow::DoEditorTest(nsIWebShell *aWebShell, PRInt32 aCommandID)
|
||||
#ifdef NS_DEBUG
|
||||
#include "nsIContent.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIFrameDebug.h"
|
||||
#include "nsIStyleContext.h"
|
||||
#include "nsIStyleSet.h"
|
||||
|
||||
@ -2766,7 +2767,10 @@ DumpFramesRecurse(nsIWebShell* aWebShell, FILE* out, nsString *aFilterName)
|
||||
nsIPresContext* presContext;
|
||||
shell->GetPresContext(&presContext);
|
||||
|
||||
root->List(presContext, out, 0);
|
||||
nsIFrameDebug* fdbg;
|
||||
if (NS_SUCCEEDED(root->QueryInterface(nsIFrameDebug::GetIID(), (void**)&fdbg))) {
|
||||
fdbg->List(presContext, out, 0);
|
||||
}
|
||||
NS_IF_RELEASE(presContext);
|
||||
}
|
||||
NS_RELEASE(shell);
|
||||
@ -2916,8 +2920,11 @@ GatherFrameDataSizes(nsISizeOfHandler* aHandler, nsIFrame* aFrame)
|
||||
nsCOMPtr<nsIAtom> frameType;
|
||||
aFrame->GetFrameType(getter_AddRefs(frameType));
|
||||
PRUint32 frameDataSize;
|
||||
aFrame->SizeOf(aHandler, &frameDataSize);
|
||||
aHandler->AddSize(frameType, frameDataSize);
|
||||
nsIFrameDebug* fdbg;
|
||||
if (NS_SUCCEEDED(aFrame->QueryInterface(nsIFrameDebug::GetIID(), (void**) &fdbg))) {
|
||||
fdbg->SizeOf(aHandler, &frameDataSize);
|
||||
aHandler->AddSize(frameType, frameDataSize);
|
||||
}
|
||||
|
||||
// And all of its children
|
||||
PRInt32 listIndex = 0;
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsIViewManager.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIFrameDebug.h"
|
||||
#include "nsIURL.h"
|
||||
#include "nsNeckoUtil.h"
|
||||
#include "nsITimer.h"
|
||||
@ -289,7 +290,10 @@ nsWebCrawler::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
nsAutoString regressionFileName;
|
||||
FILE *fp = GetOutputFile(aURL, regressionFileName);
|
||||
if (fp) {
|
||||
root->DumpRegressionData(presContext, fp, 0);
|
||||
nsIFrameDebug* fdbg;
|
||||
if (NS_SUCCEEDED(root->QueryInterface(nsIFrameDebug::GetIID(), (void**) &fdbg))) {
|
||||
fdbg->DumpRegressionData(presContext, fp, 0);
|
||||
}
|
||||
fclose(fp);
|
||||
if (mRegressing) {
|
||||
PerformRegressionTest(regressionFileName);
|
||||
@ -306,8 +310,12 @@ nsWebCrawler::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
nsCRT::free(file);
|
||||
}
|
||||
}
|
||||
else
|
||||
root->DumpRegressionData(presContext, stdout, 0);
|
||||
else {
|
||||
nsIFrameDebug* fdbg;
|
||||
if (NS_SUCCEEDED(root->QueryInterface(nsIFrameDebug::GetIID(), (void**) &fdbg))) {
|
||||
fdbg->DumpRegressionData(presContext, stdout, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user