show reflow targets in reflow logs bug 218961 r/sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@150561 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bmlk%gmx.de
2003-12-20 12:04:31 +00:00
parent 01ce2c23bd
commit 478029c599
2 changed files with 46 additions and 2 deletions

View File

@@ -45,6 +45,7 @@
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsStyleContext.h"
#include "nsReflowPath.h"
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsIPresContext.h"
@@ -5408,7 +5409,28 @@ static void DisplayReflowEnterPrint(nsIPresContext* aPresContext,
DR_state->PrettyUC(aReflowState.availableWidth, width);
DR_state->PrettyUC(aReflowState.availableHeight, height);
printf("r=%d a=%s,%s ", aReflowState.reason, width, height);
if (aReflowState.path && aReflowState.path->mReflowCommand) {
nsReflowType type;
aReflowState.path->mReflowCommand->GetType(type);
char *incr_reason;
switch(type) {
case eReflowType_ContentChanged:
incr_reason = "incr. (Content)";
break;
case eReflowType_StyleChanged:
incr_reason = "incr. (Style)";
break;
case eReflowType_ReflowDirty:
incr_reason = "incr. (Dirty)";
break;
default:
incr_reason = "incr. (Unknown)";
}
printf("r=%d %s a=%s,%s ", aReflowState.reason, incr_reason, width, height);
}
else {
printf("r=%d a=%s,%s ", aReflowState.reason, width, height);
}
DR_state->PrettyUC(aReflowState.mComputedWidth, width);
DR_state->PrettyUC(aReflowState.mComputedHeight, height);

View File

@@ -45,6 +45,7 @@
#include "nsString.h"
#include "nsReadableUtils.h"
#include "nsStyleContext.h"
#include "nsReflowPath.h"
#include "nsIView.h"
#include "nsIViewManager.h"
#include "nsIPresContext.h"
@@ -5408,7 +5409,28 @@ static void DisplayReflowEnterPrint(nsIPresContext* aPresContext,
DR_state->PrettyUC(aReflowState.availableWidth, width);
DR_state->PrettyUC(aReflowState.availableHeight, height);
printf("r=%d a=%s,%s ", aReflowState.reason, width, height);
if (aReflowState.path && aReflowState.path->mReflowCommand) {
nsReflowType type;
aReflowState.path->mReflowCommand->GetType(type);
char *incr_reason;
switch(type) {
case eReflowType_ContentChanged:
incr_reason = "incr. (Content)";
break;
case eReflowType_StyleChanged:
incr_reason = "incr. (Style)";
break;
case eReflowType_ReflowDirty:
incr_reason = "incr. (Dirty)";
break;
default:
incr_reason = "incr. (Unknown)";
}
printf("r=%d %s a=%s,%s ", aReflowState.reason, incr_reason, width, height);
}
else {
printf("r=%d a=%s,%s ", aReflowState.reason, width, height);
}
DR_state->PrettyUC(aReflowState.mComputedWidth, width);
DR_state->PrettyUC(aReflowState.mComputedHeight, height);