mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
bug 103925 (3rd patch) - display changes in reflow parameters. sr=attinasi.
This commit is contained in:
parent
2249a37ba6
commit
5b097ca46e
@ -4736,18 +4736,14 @@ CheckPixelError(nscoord aSize,
|
||||
}
|
||||
}
|
||||
|
||||
void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
const nsHTMLReflowState& aReflowState)
|
||||
static void DisplayReflowEnterPrint(nsIPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
DR_FrameTreeNode& aTreeNode,
|
||||
PRBool aChanged)
|
||||
{
|
||||
if (!DR_state.mInited) DR_state.Init();
|
||||
if (!DR_state.mActive) return nsnull;
|
||||
|
||||
NS_ASSERTION(aFrame, "invalid call");
|
||||
|
||||
DR_FrameTreeNode* treeNode = DR_state.CreateTreeNode(aFrame, aReflowState);
|
||||
if (treeNode->mDisplay) {
|
||||
DR_state.DisplayFrameTypeInfo(aFrame, treeNode->mIndent);
|
||||
if (aTreeNode.mDisplay) {
|
||||
DR_state.DisplayFrameTypeInfo(aFrame, aTreeNode.mIndent);
|
||||
|
||||
char width[16];
|
||||
char height[16];
|
||||
@ -4768,7 +4764,10 @@ void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
|
||||
if (inFlow) {
|
||||
printf("nif=%p ", inFlow);
|
||||
}
|
||||
printf("cnt=%d \n", DR_state.mCount);
|
||||
if (aChanged)
|
||||
printf("CHANGED \n");
|
||||
else
|
||||
printf("cnt=%d \n", DR_state.mCount);
|
||||
if (DR_state.mDisplayPixelErrors) {
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
@ -4778,6 +4777,21 @@ void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
|
||||
CheckPixelError(aReflowState.mComputedHeight, p2t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
if (!DR_state.mInited) DR_state.Init();
|
||||
if (!DR_state.mActive) return nsnull;
|
||||
|
||||
NS_ASSERTION(aFrame, "invalid call");
|
||||
|
||||
DR_FrameTreeNode* treeNode = DR_state.CreateTreeNode(aFrame, aReflowState);
|
||||
if (treeNode) {
|
||||
DisplayReflowEnterPrint(aPresContext, aFrame, aReflowState, *treeNode, PR_FALSE);
|
||||
}
|
||||
return treeNode;
|
||||
}
|
||||
|
||||
@ -4828,6 +4842,14 @@ void nsFrame::DisplayReflowExit(nsIPresContext* aPresContext,
|
||||
DR_state.DeleteTreeNode(*treeNode);
|
||||
}
|
||||
|
||||
void DR_cookie::Change() const
|
||||
{
|
||||
DR_FrameTreeNode* treeNode = (DR_FrameTreeNode*)mValue;
|
||||
if (treeNode && treeNode->mDisplay) {
|
||||
DisplayReflowEnterPrint(mPresContext, mFrame, mReflowState, *treeNode, PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
// End Display Reflow
|
||||
|
||||
|
@ -507,6 +507,7 @@ protected:
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nsReflowStatus& aStatus);
|
||||
~DR_cookie();
|
||||
void Change() const;
|
||||
|
||||
nsIPresContext* mPresContext;
|
||||
nsIFrame* mFrame;
|
||||
@ -518,10 +519,13 @@ protected:
|
||||
|
||||
#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);
|
||||
#define DISPLAY_REFLOW_CHANGE() \
|
||||
dr_cookie.Change();
|
||||
|
||||
#else
|
||||
|
||||
#define DISPLAY_REFLOW(dr_pres_context, dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status)
|
||||
#define DISPLAY_REFLOW_CHANGE()
|
||||
|
||||
#endif
|
||||
// End Display Reflow Debugging
|
||||
|
@ -4736,18 +4736,14 @@ CheckPixelError(nscoord aSize,
|
||||
}
|
||||
}
|
||||
|
||||
void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
const nsHTMLReflowState& aReflowState)
|
||||
static void DisplayReflowEnterPrint(nsIPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
DR_FrameTreeNode& aTreeNode,
|
||||
PRBool aChanged)
|
||||
{
|
||||
if (!DR_state.mInited) DR_state.Init();
|
||||
if (!DR_state.mActive) return nsnull;
|
||||
|
||||
NS_ASSERTION(aFrame, "invalid call");
|
||||
|
||||
DR_FrameTreeNode* treeNode = DR_state.CreateTreeNode(aFrame, aReflowState);
|
||||
if (treeNode->mDisplay) {
|
||||
DR_state.DisplayFrameTypeInfo(aFrame, treeNode->mIndent);
|
||||
if (aTreeNode.mDisplay) {
|
||||
DR_state.DisplayFrameTypeInfo(aFrame, aTreeNode.mIndent);
|
||||
|
||||
char width[16];
|
||||
char height[16];
|
||||
@ -4768,7 +4764,10 @@ void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
|
||||
if (inFlow) {
|
||||
printf("nif=%p ", inFlow);
|
||||
}
|
||||
printf("cnt=%d \n", DR_state.mCount);
|
||||
if (aChanged)
|
||||
printf("CHANGED \n");
|
||||
else
|
||||
printf("cnt=%d \n", DR_state.mCount);
|
||||
if (DR_state.mDisplayPixelErrors) {
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
@ -4778,6 +4777,21 @@ void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
|
||||
CheckPixelError(aReflowState.mComputedHeight, p2t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void* nsFrame::DisplayReflowEnter(nsIPresContext* aPresContext,
|
||||
nsIFrame* aFrame,
|
||||
const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
if (!DR_state.mInited) DR_state.Init();
|
||||
if (!DR_state.mActive) return nsnull;
|
||||
|
||||
NS_ASSERTION(aFrame, "invalid call");
|
||||
|
||||
DR_FrameTreeNode* treeNode = DR_state.CreateTreeNode(aFrame, aReflowState);
|
||||
if (treeNode) {
|
||||
DisplayReflowEnterPrint(aPresContext, aFrame, aReflowState, *treeNode, PR_FALSE);
|
||||
}
|
||||
return treeNode;
|
||||
}
|
||||
|
||||
@ -4828,6 +4842,14 @@ void nsFrame::DisplayReflowExit(nsIPresContext* aPresContext,
|
||||
DR_state.DeleteTreeNode(*treeNode);
|
||||
}
|
||||
|
||||
void DR_cookie::Change() const
|
||||
{
|
||||
DR_FrameTreeNode* treeNode = (DR_FrameTreeNode*)mValue;
|
||||
if (treeNode && treeNode->mDisplay) {
|
||||
DisplayReflowEnterPrint(mPresContext, mFrame, mReflowState, *treeNode, PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
// End Display Reflow
|
||||
|
||||
|
@ -507,6 +507,7 @@ protected:
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
nsReflowStatus& aStatus);
|
||||
~DR_cookie();
|
||||
void Change() const;
|
||||
|
||||
nsIPresContext* mPresContext;
|
||||
nsIFrame* mFrame;
|
||||
@ -518,10 +519,13 @@ protected:
|
||||
|
||||
#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);
|
||||
#define DISPLAY_REFLOW_CHANGE() \
|
||||
dr_cookie.Change();
|
||||
|
||||
#else
|
||||
|
||||
#define DISPLAY_REFLOW(dr_pres_context, dr_frame, dr_rf_state, dr_rf_metrics, dr_rf_status)
|
||||
#define DISPLAY_REFLOW_CHANGE()
|
||||
|
||||
#endif
|
||||
// End Display Reflow Debugging
|
||||
|
@ -804,6 +804,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
|
||||
|
||||
if (aReflowState.mFlags.mSpecialTableReflow || (eReflowReason_Incremental == aReflowState.reason)) {
|
||||
((nsHTMLReflowState&)aReflowState).mComputedHeight = mRect.height - topInset - bottomInset;
|
||||
DISPLAY_REFLOW_CHANGE();
|
||||
}
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, firstKid,
|
||||
availSize);
|
||||
|
@ -804,6 +804,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
|
||||
|
||||
if (aReflowState.mFlags.mSpecialTableReflow || (eReflowReason_Incremental == aReflowState.reason)) {
|
||||
((nsHTMLReflowState&)aReflowState).mComputedHeight = mRect.height - topInset - bottomInset;
|
||||
DISPLAY_REFLOW_CHANGE();
|
||||
}
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, firstKid,
|
||||
availSize);
|
||||
|
Loading…
Reference in New Issue
Block a user