mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 10:45:42 +00:00
show reflow targets in reflow logs bug 218961 r/sr=bzbarsky
This commit is contained in:
parent
ba4cab3073
commit
167fbf7a95
@ -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);
|
||||
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);
|
||||
|
@ -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);
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user