mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-30 10:12:59 +00:00
Fixed compilation bustage by using nsIFrameDebug to invoke list and regression data methods
This commit is contained in:
parent
bdbafdc824
commit
597ef271e8
@ -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