bug 103925 (2nd patch) - flag pixel rounding errors in display reflow debugging. sr=attinasi, r=bernd

This commit is contained in:
karnaze%netscape.com 2001-11-14 13:40:03 +00:00
parent ce78ef8589
commit 436e1ac49e
78 changed files with 198 additions and 104 deletions

View File

@ -1159,7 +1159,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsComboboxControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aStatus = NS_FRAME_COMPLETE;

View File

@ -281,7 +281,7 @@ nsFieldSetFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFieldSetFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// Initialize OUT parameter
aStatus = NS_FRAME_COMPLETE;

View File

@ -354,7 +354,7 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFileControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aStatus = NS_FRAME_COMPLETE;

View File

@ -542,7 +542,7 @@ nsFormControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFormControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (!mDidInit) {
mPresContext = aPresContext;

View File

@ -542,7 +542,7 @@ nsGfxButtonControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsGfxButtonControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// The mFormFrame is set in the initial reflow within nsHTMLButtonControlFrame
nsresult rv = NS_OK;

View File

@ -642,7 +642,7 @@ nsGfxCheckboxControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsGfxCheckboxControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
nsresult rv = nsFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
COMPARE_QUIRK_SIZE("nsGfxCheckboxControlFrame", 13, 13)

View File

@ -417,7 +417,7 @@ nsGfxRadioControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsGfxRadioControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
nsresult rv = nsNativeFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);

View File

@ -508,7 +508,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsHTMLButtonControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (!mFormFrame && (eReflowReason_Initial == aReflowState.reason)) {
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);

View File

@ -312,7 +312,7 @@ nsImageControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsImageControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (!mFormFrame && (eReflowReason_Initial == aReflowState.reason)) {
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
// add ourself as an nsIFormControlFrame

View File

@ -332,7 +332,7 @@ NS_IMETHODIMP nsIsIndexFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsIsIndexFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// The Areaframe takes care of all our reflow
// (except for when style is used to change its size?)

View File

@ -111,7 +111,7 @@ nsLegendFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsLegendFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (eReflowReason_Initial == aReflowState.reason) {
mPresContext = aPresContext;
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);

View File

@ -604,7 +604,7 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsListControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
REFLOW_COUNTER_REQUEST();
aStatus = NS_FRAME_COMPLETE;

View File

@ -126,7 +126,7 @@ BRFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("BRFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
if (aMetrics.maxElementSize) {
aMetrics.maxElementSize->width = 0;
aMetrics.maxElementSize->height = 0;

View File

@ -597,7 +597,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsBlockFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
#ifdef DEBUG
if (gNoisyReflow) {
IndentBy(stdout, gNoiseIndent);

View File

@ -1333,7 +1333,7 @@ nsBulletFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsBulletFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
if (eReflowReason_Incremental == aReflowState.reason) {
nsIReflowCommand::ReflowType type;
aReflowState.reflowCommand->GetType(type);

View File

@ -209,7 +209,7 @@ nsFirstLetterFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aReflowStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFirstLetterFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aReflowStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aReflowStatus);
nsresult rv = NS_OK;
// Grab overflow list

View File

@ -4202,18 +4202,19 @@ nsFrame::VerifyDirtyBitSet(nsIFrame* aFrameList)
// Start Display Reflow
#ifdef DEBUG
DR_cookie::DR_cookie(nsIFrame* aFrame,
DR_cookie::DR_cookie(nsIPresContext* aPresContext,
nsIFrame* aFrame,
const nsHTMLReflowState& aReflowState,
nsHTMLReflowMetrics& aMetrics,
nsReflowStatus& aStatus)
:mFrame(aFrame), mReflowState(aReflowState), mMetrics(aMetrics), mStatus(aStatus)
:mPresContext(aPresContext), mFrame(aFrame), mReflowState(aReflowState), mMetrics(aMetrics), mStatus(aStatus)
{
mValue = nsFrame::DisplayReflowEnter(mFrame, mReflowState);
mValue = nsFrame::DisplayReflowEnter(aPresContext, mFrame, mReflowState);
}
DR_cookie::~DR_cookie()
{
nsFrame::DisplayReflowExit(mFrame, mMetrics, mStatus, mValue);
nsFrame::DisplayReflowExit(mPresContext, mFrame, mMetrics, mStatus, mValue);
}
struct DR_FrameTypeInfo;
@ -4259,6 +4260,7 @@ struct DR_State
PRInt32 mIndentStart;
PRBool mIndentUndisplayedFrames;
nsVoidArray mFrameTypeTable;
PRBool mDisplayPixelErrors;
// reflow specific state
nsVoidArray mFrameTreeLeaves;
@ -4341,7 +4343,8 @@ struct DR_FrameTreeNode
// DR_State implementation
DR_State::DR_State()
: mInited(PR_FALSE), mActive(PR_FALSE), mCount(0), mAssert(-1), mIndentStart(0), mIndentUndisplayedFrames(PR_FALSE)
: mInited(PR_FALSE), mActive(PR_FALSE), mCount(0), mAssert(-1), mIndentStart(0),
mIndentUndisplayedFrames(PR_FALSE), mDisplayPixelErrors(PR_FALSE)
{}
void DR_State::Init()
@ -4370,6 +4373,15 @@ void DR_State::Init()
else
printf("GECKO_DISPLAY_REFLOW_INDENT_UNDISPLAYED_FRAMES - invalid value = %s", env);
}
env = PR_GetEnv("GECKO_DISPLAY_REFLOW_FLAG_PIXEL_ERRORS");
if (env) {
if (GetNumber(env, num))
mDisplayPixelErrors = num;
else
printf("GECKO_DISPLAY_REFLOW_FLAG_PIXEL_ERRORS - invalid value = %s", env);
}
InitFrameTypeTable();
ParseRulesFile();
mInited = PR_TRUE;
@ -4711,7 +4723,19 @@ void DR_State::DeleteTreeNode(DR_FrameTreeNode& aNode)
delete &aNode;
}
void* nsFrame::DisplayReflowEnter(nsIFrame* aFrame,
static void
CheckPixelError(nscoord aSize,
float aPixelToTwips)
{
if (NS_UNCONSTRAINEDSIZE != aSize) {
if ((aSize % NSToCoordRound(aPixelToTwips)) > 0) {
printf("VALUE %d is not a whole pixel \n", aSize);
}
}
}
void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
nsIFrame* aFrame,
const nsHTMLReflowState& aReflowState)
{
if (!DR_state.mInited) DR_state.Init();
@ -4743,11 +4767,20 @@ void* nsFrame::DisplayReflowEnter(nsIFrame* aFrame,
printf("nif=%p ", inFlow);
}
printf("cnt=%d \n", DR_state.mCount);
if (DR_state.mDisplayPixelErrors) {
float p2t;
aPresContext->GetScaledPixelsToTwips(&p2t);
CheckPixelError(aReflowState.availableWidth, p2t);
CheckPixelError(aReflowState.availableHeight, p2t);
CheckPixelError(aReflowState.mComputedWidth, p2t);
CheckPixelError(aReflowState.mComputedHeight, p2t);
}
}
return treeNode;
}
void nsFrame::DisplayReflowExit(nsIFrame* aFrame,
void nsFrame::DisplayReflowExit(nsIPresContext* aPresContext,
nsIFrame* aFrame,
nsHTMLReflowMetrics& aMetrics,
nsReflowStatus aStatus,
void* aFrameTreeNode)
@ -4779,6 +4812,16 @@ void nsFrame::DisplayReflowExit(nsIFrame* aFrame,
printf("status=%d", aStatus);
}
printf("\n");
if (DR_state.mDisplayPixelErrors) {
float p2t;
aPresContext->GetScaledPixelsToTwips(&p2t);
CheckPixelError(aMetrics.width, p2t);
CheckPixelError(aMetrics.height, p2t);
if (aMetrics.maxElementSize)
CheckPixelError(aMetrics.maxElementSize->width, p2t);
if (aMetrics.mFlags & NS_REFLOW_CALC_MAX_WIDTH)
CheckPixelError(aMetrics.mMaximumWidth, p2t);
}
}
DR_state.DeleteTreeNode(*treeNode);
}

View File

@ -435,9 +435,11 @@ public:
nsresult MakeFrameName(const nsAString& aKind, nsAString& aResult) const;
// Display Reflow Debugging
static void* DisplayReflowEnter(nsIFrame* aFrame,
static void* DisplayReflowEnter(nsIPresContext* aPresContext,
nsIFrame* aFrame,
const nsHTMLReflowState& aReflowState);
static void DisplayReflowExit(nsIFrame* aFrame,
static void DisplayReflowExit(nsIPresContext* aPresContext,
nsIFrame* aFrame,
nsHTMLReflowMetrics& aMetrics,
PRUint32 aStatus,
void* aFrameTreeNode);
@ -495,16 +497,18 @@ protected:
NS_IMETHOD_(nsrefcnt) Release(void);
};
// Start Display Reflow Debuggin
// Start Display Reflow Debugging
#ifdef DEBUG
struct DR_cookie {
DR_cookie(nsIFrame* aFrame,
const nsHTMLReflowState& mReflowState,
DR_cookie(nsIPresContext* aPresContext,
nsIFrame* aFrame,
const nsHTMLReflowState& aReflowState,
nsHTMLReflowMetrics& aMetrics,
nsReflowStatus& aStatus);
~DR_cookie();
nsIPresContext* mPresContext;
nsIFrame* mFrame;
const nsHTMLReflowState& mReflowState;
nsHTMLReflowMetrics& mMetrics;
@ -512,12 +516,12 @@ protected:
void* mValue;
};
#define DISPLAY_REFLOW(dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status) \
DR_cookie dr_cookie(dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status);
#define DISPLAY_REFLOW(dr_pres_context, dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status) \
DR_cookie dr_cookie(dr_pres_context, dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status);
#else
#define DISPLAY_REFLOW(dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status)
#define DISPLAY_REFLOW(dr_pres_context, dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status)
#endif
// End Display Reflow Debugging

View File

@ -478,7 +478,7 @@ nsHTMLFrameOuterFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsHTMLFrameOuterFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
//printf("OuterFrame::Reflow %X (%d,%d) \n", this, aReflowState.availableWidth, aReflowState.availableHeight);
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
("enter nsHTMLFrameOuterFrame::Reflow: maxSize=%d,%d reason=%d",

View File

@ -1125,7 +1125,7 @@ nsHTMLFramesetFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));

View File

@ -740,7 +740,7 @@ nsGfxScrollFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsGfxScrollFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// if there is a max element request then set it to -1 so we can see if it gets set
if (aDesiredSize.maxElementSize)

View File

@ -901,7 +901,7 @@ nsImageFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsImageFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
("enter nsImageFrame::Reflow: availSize=%d,%d",
aReflowState.availableWidth, aReflowState.availableHeight));

View File

@ -328,7 +328,7 @@ nsInlineFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsInlineFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
if (nsnull == aReflowState.mLineLayout) {
return NS_ERROR_INVALID_ARG;
}

View File

@ -910,7 +910,7 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsObjectFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
nsresult rv = NS_OK;
// Get our desired size

View File

@ -151,7 +151,7 @@ NS_IMETHODIMP nsPageFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsPageFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aStatus = NS_FRAME_COMPLETE; // initialize out parameter
if (eReflowReason_Incremental == aReflowState.reason) {

View File

@ -65,7 +65,7 @@ nsPlaceholderFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsPlaceholderFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aDesiredSize.width = 0;
aDesiredSize.height = 0;
aDesiredSize.ascent = 0;

View File

@ -334,7 +334,7 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsSimplePageSequenceFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_FRAME_TRACE_REFLOW_IN("nsSimplePageSequenceFrame::Reflow");
aStatus = NS_FRAME_COMPLETE; // we're always complete

View File

@ -98,7 +98,7 @@ SpacerFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("SpacerFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
aStatus = NS_FRAME_COMPLETE;
// By default, we have no area

View File

@ -4945,7 +4945,7 @@ nsTextFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTextFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
#ifdef NOISY_REFLOW
ListTag(stdout);
printf(": BeginReflow: availableSize=%d,%d\n",

View File

@ -503,7 +503,7 @@ ViewportFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("ViewportFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_FRAME_TRACE_REFLOW_IN("ViewportFrame::Reflow");
NS_PRECONDITION(nsnull == aDesiredSize.maxElementSize, "unexpected request");

View File

@ -126,7 +126,7 @@ BRFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("BRFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
if (aMetrics.maxElementSize) {
aMetrics.maxElementSize->width = 0;
aMetrics.maxElementSize->height = 0;

View File

@ -597,7 +597,7 @@ nsBlockFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsBlockFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
#ifdef DEBUG
if (gNoisyReflow) {
IndentBy(stdout, gNoiseIndent);

View File

@ -1333,7 +1333,7 @@ nsBulletFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsBulletFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
if (eReflowReason_Incremental == aReflowState.reason) {
nsIReflowCommand::ReflowType type;
aReflowState.reflowCommand->GetType(type);

View File

@ -209,7 +209,7 @@ nsFirstLetterFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aReflowStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFirstLetterFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aReflowStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aReflowStatus);
nsresult rv = NS_OK;
// Grab overflow list

View File

@ -4202,18 +4202,19 @@ nsFrame::VerifyDirtyBitSet(nsIFrame* aFrameList)
// Start Display Reflow
#ifdef DEBUG
DR_cookie::DR_cookie(nsIFrame* aFrame,
DR_cookie::DR_cookie(nsIPresContext* aPresContext,
nsIFrame* aFrame,
const nsHTMLReflowState& aReflowState,
nsHTMLReflowMetrics& aMetrics,
nsReflowStatus& aStatus)
:mFrame(aFrame), mReflowState(aReflowState), mMetrics(aMetrics), mStatus(aStatus)
:mPresContext(aPresContext), mFrame(aFrame), mReflowState(aReflowState), mMetrics(aMetrics), mStatus(aStatus)
{
mValue = nsFrame::DisplayReflowEnter(mFrame, mReflowState);
mValue = nsFrame::DisplayReflowEnter(aPresContext, mFrame, mReflowState);
}
DR_cookie::~DR_cookie()
{
nsFrame::DisplayReflowExit(mFrame, mMetrics, mStatus, mValue);
nsFrame::DisplayReflowExit(mPresContext, mFrame, mMetrics, mStatus, mValue);
}
struct DR_FrameTypeInfo;
@ -4259,6 +4260,7 @@ struct DR_State
PRInt32 mIndentStart;
PRBool mIndentUndisplayedFrames;
nsVoidArray mFrameTypeTable;
PRBool mDisplayPixelErrors;
// reflow specific state
nsVoidArray mFrameTreeLeaves;
@ -4341,7 +4343,8 @@ struct DR_FrameTreeNode
// DR_State implementation
DR_State::DR_State()
: mInited(PR_FALSE), mActive(PR_FALSE), mCount(0), mAssert(-1), mIndentStart(0), mIndentUndisplayedFrames(PR_FALSE)
: mInited(PR_FALSE), mActive(PR_FALSE), mCount(0), mAssert(-1), mIndentStart(0),
mIndentUndisplayedFrames(PR_FALSE), mDisplayPixelErrors(PR_FALSE)
{}
void DR_State::Init()
@ -4370,6 +4373,15 @@ void DR_State::Init()
else
printf("GECKO_DISPLAY_REFLOW_INDENT_UNDISPLAYED_FRAMES - invalid value = %s", env);
}
env = PR_GetEnv("GECKO_DISPLAY_REFLOW_FLAG_PIXEL_ERRORS");
if (env) {
if (GetNumber(env, num))
mDisplayPixelErrors = num;
else
printf("GECKO_DISPLAY_REFLOW_FLAG_PIXEL_ERRORS - invalid value = %s", env);
}
InitFrameTypeTable();
ParseRulesFile();
mInited = PR_TRUE;
@ -4711,7 +4723,19 @@ void DR_State::DeleteTreeNode(DR_FrameTreeNode& aNode)
delete &aNode;
}
void* nsFrame::DisplayReflowEnter(nsIFrame* aFrame,
static void
CheckPixelError(nscoord aSize,
float aPixelToTwips)
{
if (NS_UNCONSTRAINEDSIZE != aSize) {
if ((aSize % NSToCoordRound(aPixelToTwips)) > 0) {
printf("VALUE %d is not a whole pixel \n", aSize);
}
}
}
void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
nsIFrame* aFrame,
const nsHTMLReflowState& aReflowState)
{
if (!DR_state.mInited) DR_state.Init();
@ -4743,11 +4767,20 @@ void* nsFrame::DisplayReflowEnter(nsIFrame* aFrame,
printf("nif=%p ", inFlow);
}
printf("cnt=%d \n", DR_state.mCount);
if (DR_state.mDisplayPixelErrors) {
float p2t;
aPresContext->GetScaledPixelsToTwips(&p2t);
CheckPixelError(aReflowState.availableWidth, p2t);
CheckPixelError(aReflowState.availableHeight, p2t);
CheckPixelError(aReflowState.mComputedWidth, p2t);
CheckPixelError(aReflowState.mComputedHeight, p2t);
}
}
return treeNode;
}
void nsFrame::DisplayReflowExit(nsIFrame* aFrame,
void nsFrame::DisplayReflowExit(nsIPresContext* aPresContext,
nsIFrame* aFrame,
nsHTMLReflowMetrics& aMetrics,
nsReflowStatus aStatus,
void* aFrameTreeNode)
@ -4779,6 +4812,16 @@ void nsFrame::DisplayReflowExit(nsIFrame* aFrame,
printf("status=%d", aStatus);
}
printf("\n");
if (DR_state.mDisplayPixelErrors) {
float p2t;
aPresContext->GetScaledPixelsToTwips(&p2t);
CheckPixelError(aMetrics.width, p2t);
CheckPixelError(aMetrics.height, p2t);
if (aMetrics.maxElementSize)
CheckPixelError(aMetrics.maxElementSize->width, p2t);
if (aMetrics.mFlags & NS_REFLOW_CALC_MAX_WIDTH)
CheckPixelError(aMetrics.mMaximumWidth, p2t);
}
}
DR_state.DeleteTreeNode(*treeNode);
}

View File

@ -435,9 +435,11 @@ public:
nsresult MakeFrameName(const nsAString& aKind, nsAString& aResult) const;
// Display Reflow Debugging
static void* DisplayReflowEnter(nsIFrame* aFrame,
static void* DisplayReflowEnter(nsIPresContext* aPresContext,
nsIFrame* aFrame,
const nsHTMLReflowState& aReflowState);
static void DisplayReflowExit(nsIFrame* aFrame,
static void DisplayReflowExit(nsIPresContext* aPresContext,
nsIFrame* aFrame,
nsHTMLReflowMetrics& aMetrics,
PRUint32 aStatus,
void* aFrameTreeNode);
@ -495,16 +497,18 @@ protected:
NS_IMETHOD_(nsrefcnt) Release(void);
};
// Start Display Reflow Debuggin
// Start Display Reflow Debugging
#ifdef DEBUG
struct DR_cookie {
DR_cookie(nsIFrame* aFrame,
const nsHTMLReflowState& mReflowState,
DR_cookie(nsIPresContext* aPresContext,
nsIFrame* aFrame,
const nsHTMLReflowState& aReflowState,
nsHTMLReflowMetrics& aMetrics,
nsReflowStatus& aStatus);
~DR_cookie();
nsIPresContext* mPresContext;
nsIFrame* mFrame;
const nsHTMLReflowState& mReflowState;
nsHTMLReflowMetrics& mMetrics;
@ -512,12 +516,12 @@ protected:
void* mValue;
};
#define DISPLAY_REFLOW(dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status) \
DR_cookie dr_cookie(dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status);
#define DISPLAY_REFLOW(dr_pres_context, dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status) \
DR_cookie dr_cookie(dr_pres_context, dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status);
#else
#define DISPLAY_REFLOW(dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status)
#define DISPLAY_REFLOW(dr_pres_context, dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status)
#endif
// End Display Reflow Debugging

View File

@ -740,7 +740,7 @@ nsGfxScrollFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsGfxScrollFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// if there is a max element request then set it to -1 so we can see if it gets set
if (aDesiredSize.maxElementSize)

View File

@ -192,7 +192,7 @@ HRuleFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("HRuleFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_PRECONDITION(mState & NS_FRAME_IN_REFLOW, "frame is not in reflow");
// bug 18754: In compat mode, we treat HR's as inline elements

View File

@ -901,7 +901,7 @@ nsImageFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsImageFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
("enter nsImageFrame::Reflow: availSize=%d,%d",
aReflowState.availableWidth, aReflowState.availableHeight));

View File

@ -328,7 +328,7 @@ nsInlineFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsInlineFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
if (nsnull == aReflowState.mLineLayout) {
return NS_ERROR_INVALID_ARG;
}

View File

@ -910,7 +910,7 @@ nsObjectFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsObjectFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
nsresult rv = NS_OK;
// Get our desired size

View File

@ -151,7 +151,7 @@ NS_IMETHODIMP nsPageFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsPageFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aStatus = NS_FRAME_COMPLETE; // initialize out parameter
if (eReflowReason_Incremental == aReflowState.reason) {

View File

@ -65,7 +65,7 @@ nsPlaceholderFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsPlaceholderFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aDesiredSize.width = 0;
aDesiredSize.height = 0;
aDesiredSize.ascent = 0;

View File

@ -646,7 +646,7 @@ nsScrollFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsScrollFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS,
("enter nsScrollFrame::Reflow: maxSize=%d,%d",
aReflowState.availableWidth,

View File

@ -334,7 +334,7 @@ nsSimplePageSequenceFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsSimplePageSequenceFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_FRAME_TRACE_REFLOW_IN("nsSimplePageSequenceFrame::Reflow");
aStatus = NS_FRAME_COMPLETE; // we're always complete

View File

@ -98,7 +98,7 @@ SpacerFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("SpacerFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
aStatus = NS_FRAME_COMPLETE;
// By default, we have no area

View File

@ -4945,7 +4945,7 @@ nsTextFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTextFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aMetrics, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aMetrics, aStatus);
#ifdef NOISY_REFLOW
ListTag(stdout);
printf(": BeginReflow: availableSize=%d,%d\n",

View File

@ -503,7 +503,7 @@ ViewportFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("ViewportFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_FRAME_TRACE_REFLOW_IN("ViewportFrame::Reflow");
NS_PRECONDITION(nsnull == aDesiredSize.maxElementSize, "unexpected request");

View File

@ -478,7 +478,7 @@ nsHTMLFrameOuterFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsHTMLFrameOuterFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
//printf("OuterFrame::Reflow %X (%d,%d) \n", this, aReflowState.availableWidth, aReflowState.availableHeight);
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
("enter nsHTMLFrameOuterFrame::Reflow: maxSize=%d,%d reason=%d",

View File

@ -1125,7 +1125,7 @@ nsHTMLFramesetFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
nsCOMPtr<nsIPresShell> shell;
aPresContext->GetShell(getter_AddRefs(shell));

View File

@ -1159,7 +1159,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsComboboxControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aStatus = NS_FRAME_COMPLETE;

View File

@ -281,7 +281,7 @@ nsFieldSetFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFieldSetFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// Initialize OUT parameter
aStatus = NS_FRAME_COMPLETE;

View File

@ -354,7 +354,7 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFileControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aStatus = NS_FRAME_COMPLETE;

View File

@ -542,7 +542,7 @@ nsFormControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsFormControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (!mDidInit) {
mPresContext = aPresContext;

View File

@ -542,7 +542,7 @@ nsGfxButtonControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsGfxButtonControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// The mFormFrame is set in the initial reflow within nsHTMLButtonControlFrame
nsresult rv = NS_OK;

View File

@ -642,7 +642,7 @@ nsGfxCheckboxControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsGfxCheckboxControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
nsresult rv = nsFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
COMPARE_QUIRK_SIZE("nsGfxCheckboxControlFrame", 13, 13)

View File

@ -417,7 +417,7 @@ nsGfxRadioControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsGfxRadioControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
nsresult rv = nsNativeFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);

View File

@ -2290,7 +2290,7 @@ nsGfxTextControlFrame2::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsGfxTextControlFrame2", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
SetInitialValue();

View File

@ -508,7 +508,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsHTMLButtonControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (!mFormFrame && (eReflowReason_Initial == aReflowState.reason)) {
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);

View File

@ -312,7 +312,7 @@ nsImageControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsImageControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (!mFormFrame && (eReflowReason_Initial == aReflowState.reason)) {
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
// add ourself as an nsIFormControlFrame

View File

@ -332,7 +332,7 @@ NS_IMETHODIMP nsIsIndexFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsIsIndexFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
// The Areaframe takes care of all our reflow
// (except for when style is used to change its size?)

View File

@ -113,7 +113,7 @@ nsLabelFrame::Reflow(nsIPresContext* aPresContext,
const nsHTMLReflowState& aReflowState,
nsReflowStatus& aStatus)
{
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (eReflowReason_Initial == aReflowState.reason)
nsFormControlFrame::RegUnRegAccessKey(aPresContext,
NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);

View File

@ -111,7 +111,7 @@ nsLegendFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsLegendFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
if (eReflowReason_Initial == aReflowState.reason) {
mPresContext = aPresContext;
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);

View File

@ -604,7 +604,7 @@ nsListControlFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsListControlFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
REFLOW_COUNTER_REQUEST();
aStatus = NS_FRAME_COMPLETE;

View File

@ -697,7 +697,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableCellFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aReflowState);
#endif

View File

@ -173,7 +173,7 @@ NS_METHOD nsTableColFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableColFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aDesiredSize.width=0;
aDesiredSize.height=0;
if (nsnull!=aDesiredSize.maxElementSize)

View File

@ -487,7 +487,7 @@ NS_METHOD nsTableColGroupFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableColGroupFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_ASSERTION(nsnull!=mContent, "bad state -- null content for frame");
nsresult rv=NS_OK;
// for every content child that (is a column thingy and does not already have a frame)

View File

@ -1856,7 +1856,7 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aReflowState);
#endif

View File

@ -1489,7 +1489,7 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableOuterFrame", aOuterRS.reason);
DISPLAY_REFLOW(this, aOuterRS, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aOuterRS, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aOuterRS);
#endif

View File

@ -1362,7 +1362,7 @@ nsTableRowFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableRowFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aReflowState);
#endif

View File

@ -1095,7 +1095,7 @@ nsTableRowGroupFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableRowGroupFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aReflowState);
#endif

View File

@ -697,7 +697,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableCellFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aReflowState);
#endif

View File

@ -173,7 +173,7 @@ NS_METHOD nsTableColFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableColFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
aDesiredSize.width=0;
aDesiredSize.height=0;
if (nsnull!=aDesiredSize.maxElementSize)

View File

@ -487,7 +487,7 @@ NS_METHOD nsTableColGroupFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableColGroupFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
NS_ASSERTION(nsnull!=mContent, "bad state -- null content for frame");
nsresult rv=NS_OK;
// for every content child that (is a column thingy and does not already have a frame)

View File

@ -1856,7 +1856,7 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aReflowState);
#endif

View File

@ -1489,7 +1489,7 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableOuterFrame", aOuterRS.reason);
DISPLAY_REFLOW(this, aOuterRS, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aOuterRS, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aOuterRS);
#endif

View File

@ -1362,7 +1362,7 @@ nsTableRowFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableRowFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aReflowState);
#endif

View File

@ -1095,7 +1095,7 @@ nsTableRowGroupFrame::Reflow(nsIPresContext* aPresContext,
nsReflowStatus& aStatus)
{
DO_GLOBAL_REFLOW_COUNT("nsTableRowGroupFrame", aReflowState.reason);
DISPLAY_REFLOW(this, aReflowState, aDesiredSize, aStatus);
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
#if defined DEBUG_TABLE_REFLOW_TIMING
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aReflowState);
#endif