From 65fe290a5b4ae8bb93aa56f93ecaf76ef11e1094 Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Wed, 14 Nov 2001 13:40:03 +0000 Subject: [PATCH] bug 103925 (2nd patch) - flag pixel rounding errors in display reflow debugging. sr=attinasi, r=bernd git-svn-id: svn://10.0.0.236/trunk@108053 18797224-902f-48f8-a5cc-f745e15eee43 --- .../layout/forms/nsComboboxControlFrame.cpp | 2 +- mozilla/layout/forms/nsFieldSetFrame.cpp | 2 +- mozilla/layout/forms/nsFileControlFrame.cpp | 2 +- mozilla/layout/forms/nsFormControlFrame.cpp | 2 +- .../layout/forms/nsGfxButtonControlFrame.cpp | 2 +- .../forms/nsGfxCheckboxControlFrame.cpp | 2 +- .../layout/forms/nsGfxRadioControlFrame.cpp | 2 +- .../layout/forms/nsHTMLButtonControlFrame.cpp | 2 +- mozilla/layout/forms/nsImageControlFrame.cpp | 2 +- mozilla/layout/forms/nsIsIndexFrame.cpp | 2 +- mozilla/layout/forms/nsLegendFrame.cpp | 2 +- mozilla/layout/forms/nsListControlFrame.cpp | 2 +- mozilla/layout/generic/nsBRFrame.cpp | 2 +- mozilla/layout/generic/nsBlockFrame.cpp | 2 +- mozilla/layout/generic/nsBulletFrame.cpp | 2 +- mozilla/layout/generic/nsFirstLetterFrame.cpp | 2 +- mozilla/layout/generic/nsFrame.cpp | 57 ++++++++++++++++--- mozilla/layout/generic/nsFrame.h | 20 ++++--- mozilla/layout/generic/nsFrameFrame.cpp | 2 +- mozilla/layout/generic/nsFrameSetFrame.cpp | 2 +- mozilla/layout/generic/nsGfxScrollFrame.cpp | 2 +- mozilla/layout/generic/nsImageFrame.cpp | 2 +- mozilla/layout/generic/nsInlineFrame.cpp | 2 +- mozilla/layout/generic/nsObjectFrame.cpp | 2 +- mozilla/layout/generic/nsPageFrame.cpp | 2 +- mozilla/layout/generic/nsPlaceholderFrame.cpp | 2 +- .../layout/generic/nsSimplePageSequence.cpp | 2 +- mozilla/layout/generic/nsSpacerFrame.cpp | 2 +- mozilla/layout/generic/nsTextFrame.cpp | 2 +- mozilla/layout/generic/nsViewportFrame.cpp | 2 +- mozilla/layout/html/base/src/nsBRFrame.cpp | 2 +- mozilla/layout/html/base/src/nsBlockFrame.cpp | 2 +- .../layout/html/base/src/nsBulletFrame.cpp | 2 +- .../html/base/src/nsFirstLetterFrame.cpp | 2 +- mozilla/layout/html/base/src/nsFrame.cpp | 57 ++++++++++++++++--- mozilla/layout/html/base/src/nsFrame.h | 20 ++++--- .../layout/html/base/src/nsGfxScrollFrame.cpp | 2 +- mozilla/layout/html/base/src/nsHRFrame.cpp | 2 +- mozilla/layout/html/base/src/nsImageFrame.cpp | 2 +- .../layout/html/base/src/nsInlineFrame.cpp | 2 +- .../layout/html/base/src/nsObjectFrame.cpp | 2 +- mozilla/layout/html/base/src/nsPageFrame.cpp | 2 +- .../html/base/src/nsPlaceholderFrame.cpp | 2 +- .../layout/html/base/src/nsScrollFrame.cpp | 2 +- .../html/base/src/nsSimplePageSequence.cpp | 2 +- .../layout/html/base/src/nsSpacerFrame.cpp | 2 +- mozilla/layout/html/base/src/nsTextFrame.cpp | 2 +- .../layout/html/base/src/nsViewportFrame.cpp | 2 +- .../layout/html/document/src/nsFrameFrame.cpp | 2 +- .../html/document/src/nsFrameSetFrame.cpp | 2 +- .../html/forms/src/nsComboboxControlFrame.cpp | 2 +- .../layout/html/forms/src/nsFieldSetFrame.cpp | 2 +- .../html/forms/src/nsFileControlFrame.cpp | 2 +- .../html/forms/src/nsFormControlFrame.cpp | 2 +- .../forms/src/nsGfxButtonControlFrame.cpp | 2 +- .../forms/src/nsGfxCheckboxControlFrame.cpp | 2 +- .../html/forms/src/nsGfxRadioControlFrame.cpp | 2 +- .../html/forms/src/nsGfxTextControlFrame2.cpp | 2 +- .../forms/src/nsHTMLButtonControlFrame.cpp | 2 +- .../html/forms/src/nsImageControlFrame.cpp | 2 +- .../layout/html/forms/src/nsIsIndexFrame.cpp | 2 +- .../layout/html/forms/src/nsLabelFrame.cpp | 2 +- .../layout/html/forms/src/nsLegendFrame.cpp | 2 +- .../html/forms/src/nsListControlFrame.cpp | 2 +- .../html/table/src/nsTableCellFrame.cpp | 2 +- .../layout/html/table/src/nsTableColFrame.cpp | 2 +- .../html/table/src/nsTableColGroupFrame.cpp | 2 +- .../layout/html/table/src/nsTableFrame.cpp | 2 +- .../html/table/src/nsTableOuterFrame.cpp | 2 +- .../layout/html/table/src/nsTableRowFrame.cpp | 2 +- .../html/table/src/nsTableRowGroupFrame.cpp | 2 +- mozilla/layout/tables/nsTableCellFrame.cpp | 2 +- mozilla/layout/tables/nsTableColFrame.cpp | 2 +- .../layout/tables/nsTableColGroupFrame.cpp | 2 +- mozilla/layout/tables/nsTableFrame.cpp | 2 +- mozilla/layout/tables/nsTableOuterFrame.cpp | 2 +- mozilla/layout/tables/nsTableRowFrame.cpp | 2 +- .../layout/tables/nsTableRowGroupFrame.cpp | 2 +- 78 files changed, 198 insertions(+), 104 deletions(-) diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index 2b2f3b60505..496ed93f72d 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -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; diff --git a/mozilla/layout/forms/nsFieldSetFrame.cpp b/mozilla/layout/forms/nsFieldSetFrame.cpp index 3044861d738..5d6c9c4920e 100644 --- a/mozilla/layout/forms/nsFieldSetFrame.cpp +++ b/mozilla/layout/forms/nsFieldSetFrame.cpp @@ -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; diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index 8af902dd622..656768a4a3f 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -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; diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index 5158cebd59b..aec571875bc 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -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; diff --git a/mozilla/layout/forms/nsGfxButtonControlFrame.cpp b/mozilla/layout/forms/nsGfxButtonControlFrame.cpp index 16a85cb1b71..963ef5c86e1 100644 --- a/mozilla/layout/forms/nsGfxButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsGfxButtonControlFrame.cpp @@ -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; diff --git a/mozilla/layout/forms/nsGfxCheckboxControlFrame.cpp b/mozilla/layout/forms/nsGfxCheckboxControlFrame.cpp index 39c70177cf1..36ad6206ccf 100644 --- a/mozilla/layout/forms/nsGfxCheckboxControlFrame.cpp +++ b/mozilla/layout/forms/nsGfxCheckboxControlFrame.cpp @@ -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) diff --git a/mozilla/layout/forms/nsGfxRadioControlFrame.cpp b/mozilla/layout/forms/nsGfxRadioControlFrame.cpp index b5a2d3a7983..0e41e83f5b2 100644 --- a/mozilla/layout/forms/nsGfxRadioControlFrame.cpp +++ b/mozilla/layout/forms/nsGfxRadioControlFrame.cpp @@ -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); diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index 939b0174d06..58e47067006 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -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); diff --git a/mozilla/layout/forms/nsImageControlFrame.cpp b/mozilla/layout/forms/nsImageControlFrame.cpp index fb2e8f87058..078d692a56d 100644 --- a/mozilla/layout/forms/nsImageControlFrame.cpp +++ b/mozilla/layout/forms/nsImageControlFrame.cpp @@ -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 diff --git a/mozilla/layout/forms/nsIsIndexFrame.cpp b/mozilla/layout/forms/nsIsIndexFrame.cpp index 31f888df591..76f19bb2057 100644 --- a/mozilla/layout/forms/nsIsIndexFrame.cpp +++ b/mozilla/layout/forms/nsIsIndexFrame.cpp @@ -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?) diff --git a/mozilla/layout/forms/nsLegendFrame.cpp b/mozilla/layout/forms/nsLegendFrame.cpp index 3da6aad05c6..ef64e384eb3 100644 --- a/mozilla/layout/forms/nsLegendFrame.cpp +++ b/mozilla/layout/forms/nsLegendFrame.cpp @@ -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); diff --git a/mozilla/layout/forms/nsListControlFrame.cpp b/mozilla/layout/forms/nsListControlFrame.cpp index f7741d651b9..36000b326af 100644 --- a/mozilla/layout/forms/nsListControlFrame.cpp +++ b/mozilla/layout/forms/nsListControlFrame.cpp @@ -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; diff --git a/mozilla/layout/generic/nsBRFrame.cpp b/mozilla/layout/generic/nsBRFrame.cpp index cab5fef82f4..1dc591c8217 100644 --- a/mozilla/layout/generic/nsBRFrame.cpp +++ b/mozilla/layout/generic/nsBRFrame.cpp @@ -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; diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 989196037e8..8955ee778e9 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -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); diff --git a/mozilla/layout/generic/nsBulletFrame.cpp b/mozilla/layout/generic/nsBulletFrame.cpp index df9ef837ae5..69db1dcb1e9 100644 --- a/mozilla/layout/generic/nsBulletFrame.cpp +++ b/mozilla/layout/generic/nsBulletFrame.cpp @@ -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); diff --git a/mozilla/layout/generic/nsFirstLetterFrame.cpp b/mozilla/layout/generic/nsFirstLetterFrame.cpp index acb8cfb77f8..e9be5b6b262 100644 --- a/mozilla/layout/generic/nsFirstLetterFrame.cpp +++ b/mozilla/layout/generic/nsFirstLetterFrame.cpp @@ -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 diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index d0f29fb501f..e139a285b02 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -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); } diff --git a/mozilla/layout/generic/nsFrame.h b/mozilla/layout/generic/nsFrame.h index 0058c6e359b..2f0e038f779 100644 --- a/mozilla/layout/generic/nsFrame.h +++ b/mozilla/layout/generic/nsFrame.h @@ -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 diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index 152e8b72c3f..e29f38493cb 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -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", diff --git a/mozilla/layout/generic/nsFrameSetFrame.cpp b/mozilla/layout/generic/nsFrameSetFrame.cpp index 5f71fa32cfc..b48de6cd99d 100644 --- a/mozilla/layout/generic/nsFrameSetFrame.cpp +++ b/mozilla/layout/generic/nsFrameSetFrame.cpp @@ -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 shell; aPresContext->GetShell(getter_AddRefs(shell)); diff --git a/mozilla/layout/generic/nsGfxScrollFrame.cpp b/mozilla/layout/generic/nsGfxScrollFrame.cpp index 531cd76f6a4..0c4fc4afb71 100644 --- a/mozilla/layout/generic/nsGfxScrollFrame.cpp +++ b/mozilla/layout/generic/nsGfxScrollFrame.cpp @@ -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) diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index aa701653f6f..6e4a8c5dcfc 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -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)); diff --git a/mozilla/layout/generic/nsInlineFrame.cpp b/mozilla/layout/generic/nsInlineFrame.cpp index eb93d11ec4f..35cb4885d2c 100644 --- a/mozilla/layout/generic/nsInlineFrame.cpp +++ b/mozilla/layout/generic/nsInlineFrame.cpp @@ -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; } diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index 9ece07ef8e5..f4505ce2dad 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -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 diff --git a/mozilla/layout/generic/nsPageFrame.cpp b/mozilla/layout/generic/nsPageFrame.cpp index 77bc9635750..d91c233b54a 100644 --- a/mozilla/layout/generic/nsPageFrame.cpp +++ b/mozilla/layout/generic/nsPageFrame.cpp @@ -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) { diff --git a/mozilla/layout/generic/nsPlaceholderFrame.cpp b/mozilla/layout/generic/nsPlaceholderFrame.cpp index e50a355a095..9568687c85d 100644 --- a/mozilla/layout/generic/nsPlaceholderFrame.cpp +++ b/mozilla/layout/generic/nsPlaceholderFrame.cpp @@ -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; diff --git a/mozilla/layout/generic/nsSimplePageSequence.cpp b/mozilla/layout/generic/nsSimplePageSequence.cpp index c35a8a49f1f..5dcff6b1658 100644 --- a/mozilla/layout/generic/nsSimplePageSequence.cpp +++ b/mozilla/layout/generic/nsSimplePageSequence.cpp @@ -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 diff --git a/mozilla/layout/generic/nsSpacerFrame.cpp b/mozilla/layout/generic/nsSpacerFrame.cpp index 7eb6e3e2858..a215c2b707a 100644 --- a/mozilla/layout/generic/nsSpacerFrame.cpp +++ b/mozilla/layout/generic/nsSpacerFrame.cpp @@ -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 diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index 4934b523370..67ad16c809c 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -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", diff --git a/mozilla/layout/generic/nsViewportFrame.cpp b/mozilla/layout/generic/nsViewportFrame.cpp index c7769d90ad0..0cde308b3da 100644 --- a/mozilla/layout/generic/nsViewportFrame.cpp +++ b/mozilla/layout/generic/nsViewportFrame.cpp @@ -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"); diff --git a/mozilla/layout/html/base/src/nsBRFrame.cpp b/mozilla/layout/html/base/src/nsBRFrame.cpp index cab5fef82f4..1dc591c8217 100644 --- a/mozilla/layout/html/base/src/nsBRFrame.cpp +++ b/mozilla/layout/html/base/src/nsBRFrame.cpp @@ -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; diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 989196037e8..8955ee778e9 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -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); diff --git a/mozilla/layout/html/base/src/nsBulletFrame.cpp b/mozilla/layout/html/base/src/nsBulletFrame.cpp index df9ef837ae5..69db1dcb1e9 100644 --- a/mozilla/layout/html/base/src/nsBulletFrame.cpp +++ b/mozilla/layout/html/base/src/nsBulletFrame.cpp @@ -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); diff --git a/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp b/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp index acb8cfb77f8..e9be5b6b262 100644 --- a/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp +++ b/mozilla/layout/html/base/src/nsFirstLetterFrame.cpp @@ -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 diff --git a/mozilla/layout/html/base/src/nsFrame.cpp b/mozilla/layout/html/base/src/nsFrame.cpp index d0f29fb501f..e139a285b02 100644 --- a/mozilla/layout/html/base/src/nsFrame.cpp +++ b/mozilla/layout/html/base/src/nsFrame.cpp @@ -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); } diff --git a/mozilla/layout/html/base/src/nsFrame.h b/mozilla/layout/html/base/src/nsFrame.h index 0058c6e359b..2f0e038f779 100644 --- a/mozilla/layout/html/base/src/nsFrame.h +++ b/mozilla/layout/html/base/src/nsFrame.h @@ -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 diff --git a/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp b/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp index 531cd76f6a4..0c4fc4afb71 100644 --- a/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp +++ b/mozilla/layout/html/base/src/nsGfxScrollFrame.cpp @@ -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) diff --git a/mozilla/layout/html/base/src/nsHRFrame.cpp b/mozilla/layout/html/base/src/nsHRFrame.cpp index 86c71389c0c..9af1cf42a86 100644 --- a/mozilla/layout/html/base/src/nsHRFrame.cpp +++ b/mozilla/layout/html/base/src/nsHRFrame.cpp @@ -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 diff --git a/mozilla/layout/html/base/src/nsImageFrame.cpp b/mozilla/layout/html/base/src/nsImageFrame.cpp index aa701653f6f..6e4a8c5dcfc 100644 --- a/mozilla/layout/html/base/src/nsImageFrame.cpp +++ b/mozilla/layout/html/base/src/nsImageFrame.cpp @@ -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)); diff --git a/mozilla/layout/html/base/src/nsInlineFrame.cpp b/mozilla/layout/html/base/src/nsInlineFrame.cpp index eb93d11ec4f..35cb4885d2c 100644 --- a/mozilla/layout/html/base/src/nsInlineFrame.cpp +++ b/mozilla/layout/html/base/src/nsInlineFrame.cpp @@ -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; } diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index 9ece07ef8e5..f4505ce2dad 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -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 diff --git a/mozilla/layout/html/base/src/nsPageFrame.cpp b/mozilla/layout/html/base/src/nsPageFrame.cpp index 77bc9635750..d91c233b54a 100644 --- a/mozilla/layout/html/base/src/nsPageFrame.cpp +++ b/mozilla/layout/html/base/src/nsPageFrame.cpp @@ -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) { diff --git a/mozilla/layout/html/base/src/nsPlaceholderFrame.cpp b/mozilla/layout/html/base/src/nsPlaceholderFrame.cpp index e50a355a095..9568687c85d 100644 --- a/mozilla/layout/html/base/src/nsPlaceholderFrame.cpp +++ b/mozilla/layout/html/base/src/nsPlaceholderFrame.cpp @@ -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; diff --git a/mozilla/layout/html/base/src/nsScrollFrame.cpp b/mozilla/layout/html/base/src/nsScrollFrame.cpp index e8a9eb46d8e..36a9b51e729 100644 --- a/mozilla/layout/html/base/src/nsScrollFrame.cpp +++ b/mozilla/layout/html/base/src/nsScrollFrame.cpp @@ -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, diff --git a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp index c35a8a49f1f..5dcff6b1658 100644 --- a/mozilla/layout/html/base/src/nsSimplePageSequence.cpp +++ b/mozilla/layout/html/base/src/nsSimplePageSequence.cpp @@ -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 diff --git a/mozilla/layout/html/base/src/nsSpacerFrame.cpp b/mozilla/layout/html/base/src/nsSpacerFrame.cpp index 7eb6e3e2858..a215c2b707a 100644 --- a/mozilla/layout/html/base/src/nsSpacerFrame.cpp +++ b/mozilla/layout/html/base/src/nsSpacerFrame.cpp @@ -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 diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index 4934b523370..67ad16c809c 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -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", diff --git a/mozilla/layout/html/base/src/nsViewportFrame.cpp b/mozilla/layout/html/base/src/nsViewportFrame.cpp index c7769d90ad0..0cde308b3da 100644 --- a/mozilla/layout/html/base/src/nsViewportFrame.cpp +++ b/mozilla/layout/html/base/src/nsViewportFrame.cpp @@ -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"); diff --git a/mozilla/layout/html/document/src/nsFrameFrame.cpp b/mozilla/layout/html/document/src/nsFrameFrame.cpp index 152e8b72c3f..e29f38493cb 100644 --- a/mozilla/layout/html/document/src/nsFrameFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameFrame.cpp @@ -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", diff --git a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp index 5f71fa32cfc..b48de6cd99d 100644 --- a/mozilla/layout/html/document/src/nsFrameSetFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameSetFrame.cpp @@ -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 shell; aPresContext->GetShell(getter_AddRefs(shell)); diff --git a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp index 2b2f3b60505..496ed93f72d 100644 --- a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -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; diff --git a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp index 3044861d738..5d6c9c4920e 100644 --- a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp @@ -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; diff --git a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp index 8af902dd622..656768a4a3f 100644 --- a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp @@ -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; diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index 5158cebd59b..aec571875bc 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -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; diff --git a/mozilla/layout/html/forms/src/nsGfxButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsGfxButtonControlFrame.cpp index 16a85cb1b71..963ef5c86e1 100644 --- a/mozilla/layout/html/forms/src/nsGfxButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsGfxButtonControlFrame.cpp @@ -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; diff --git a/mozilla/layout/html/forms/src/nsGfxCheckboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsGfxCheckboxControlFrame.cpp index 39c70177cf1..36ad6206ccf 100644 --- a/mozilla/layout/html/forms/src/nsGfxCheckboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsGfxCheckboxControlFrame.cpp @@ -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) diff --git a/mozilla/layout/html/forms/src/nsGfxRadioControlFrame.cpp b/mozilla/layout/html/forms/src/nsGfxRadioControlFrame.cpp index b5a2d3a7983..0e41e83f5b2 100644 --- a/mozilla/layout/html/forms/src/nsGfxRadioControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsGfxRadioControlFrame.cpp @@ -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); diff --git a/mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp b/mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp index d31c942f912..4456b7dd67c 100644 --- a/mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp +++ b/mozilla/layout/html/forms/src/nsGfxTextControlFrame2.cpp @@ -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(); diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index 939b0174d06..58e47067006 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -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); diff --git a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp index fb2e8f87058..078d692a56d 100644 --- a/mozilla/layout/html/forms/src/nsImageControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsImageControlFrame.cpp @@ -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 diff --git a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp index 31f888df591..76f19bb2057 100644 --- a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp +++ b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp @@ -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?) diff --git a/mozilla/layout/html/forms/src/nsLabelFrame.cpp b/mozilla/layout/html/forms/src/nsLabelFrame.cpp index f8b2f32c297..a13082d78ef 100644 --- a/mozilla/layout/html/forms/src/nsLabelFrame.cpp +++ b/mozilla/layout/html/forms/src/nsLabelFrame.cpp @@ -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); diff --git a/mozilla/layout/html/forms/src/nsLegendFrame.cpp b/mozilla/layout/html/forms/src/nsLegendFrame.cpp index 3da6aad05c6..ef64e384eb3 100644 --- a/mozilla/layout/html/forms/src/nsLegendFrame.cpp +++ b/mozilla/layout/html/forms/src/nsLegendFrame.cpp @@ -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); diff --git a/mozilla/layout/html/forms/src/nsListControlFrame.cpp b/mozilla/layout/html/forms/src/nsListControlFrame.cpp index f7741d651b9..36000b326af 100644 --- a/mozilla/layout/html/forms/src/nsListControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsListControlFrame.cpp @@ -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; diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index 0604d957c2b..5cc26e9afd2 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -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 diff --git a/mozilla/layout/html/table/src/nsTableColFrame.cpp b/mozilla/layout/html/table/src/nsTableColFrame.cpp index bd4842cf297..d0bbf783842 100644 --- a/mozilla/layout/html/table/src/nsTableColFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableColFrame.cpp @@ -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) diff --git a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp index 172a5d3a94f..4132b756346 100644 --- a/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableColGroupFrame.cpp @@ -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) diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index fc8ebbf4c54..62550e05864 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -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 diff --git a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp index 7c47af9cadb..eb0ec03adab 100644 --- a/mozilla/layout/html/table/src/nsTableOuterFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableOuterFrame.cpp @@ -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 diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 6411bf884df..1d5e5fd12cf 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -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 diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index 6125cfde508..d106b28523e 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -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 diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index 0604d957c2b..5cc26e9afd2 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -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 diff --git a/mozilla/layout/tables/nsTableColFrame.cpp b/mozilla/layout/tables/nsTableColFrame.cpp index bd4842cf297..d0bbf783842 100644 --- a/mozilla/layout/tables/nsTableColFrame.cpp +++ b/mozilla/layout/tables/nsTableColFrame.cpp @@ -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) diff --git a/mozilla/layout/tables/nsTableColGroupFrame.cpp b/mozilla/layout/tables/nsTableColGroupFrame.cpp index 172a5d3a94f..4132b756346 100644 --- a/mozilla/layout/tables/nsTableColGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableColGroupFrame.cpp @@ -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) diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index fc8ebbf4c54..62550e05864 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -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 diff --git a/mozilla/layout/tables/nsTableOuterFrame.cpp b/mozilla/layout/tables/nsTableOuterFrame.cpp index 7c47af9cadb..eb0ec03adab 100644 --- a/mozilla/layout/tables/nsTableOuterFrame.cpp +++ b/mozilla/layout/tables/nsTableOuterFrame.cpp @@ -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 diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 6411bf884df..1d5e5fd12cf 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -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 diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 6125cfde508..d106b28523e 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -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