зеркало из https://github.com/mozilla/gecko-dev.git
Removed PreReflowCheck() and PostReflowCheck() from nsContainerFrame
This commit is contained in:
Родитель
b064b17d15
Коммит
dd71642dd1
|
@ -814,40 +814,6 @@ void nsContainerFrame::DumpTree() const
|
|||
root->List();
|
||||
}
|
||||
|
||||
void nsContainerFrame::PreReflowCheck()
|
||||
{
|
||||
// XXX CONSTRUCTION
|
||||
#if 0
|
||||
PRInt32 len = LengthOf(mFirstChild);
|
||||
NS_ASSERTION(len == mChildCount, "bad child count");
|
||||
|
||||
if (0 == mChildCount) {
|
||||
NS_ASSERTION(nsnull == mFirstChild, "bad child-count/first-child");
|
||||
} else {
|
||||
NS_ASSERTION(nsnull != mFirstChild, "bad child-count/first-child");
|
||||
CheckContentOffsets();
|
||||
}
|
||||
VerifyLastIsComplete();
|
||||
#endif
|
||||
}
|
||||
|
||||
void nsContainerFrame::PostReflowCheck(nsReflowStatus aStatus)
|
||||
{
|
||||
// XXX CONSTRUCTION
|
||||
#if 0
|
||||
PRInt32 len = LengthOf(mFirstChild) ;
|
||||
NS_ASSERTION(len == mChildCount, "bad child count");
|
||||
|
||||
if (0 == mChildCount) {
|
||||
NS_ASSERTION(nsnull == mFirstChild, "bad child-count/first-child");
|
||||
} else {
|
||||
NS_ASSERTION(nsnull != mFirstChild, "bad child-count/first-child");
|
||||
CheckContentOffsets();
|
||||
}
|
||||
VerifyLastIsComplete();
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* A container is empty if it has no children, or it has exactly one
|
||||
* child and that child is a pseudo-frame and it's empty (recursively
|
||||
|
|
|
@ -139,6 +139,7 @@ public:
|
|||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
|
||||
// Returns true if this frame is being used a pseudo frame
|
||||
// XXX deprecated
|
||||
PRBool IsPseudoFrame() const;
|
||||
|
||||
// Debugging
|
||||
|
@ -212,16 +213,6 @@ protected:
|
|||
*/
|
||||
PRBool MoveOverflowToChildList();
|
||||
|
||||
/**
|
||||
* Remove and delete aChild's next-in-flow(s). Updates the sibling and flow
|
||||
* pointers.
|
||||
*
|
||||
* Updates the child count and content offsets of all containers that are
|
||||
* affected.
|
||||
*
|
||||
* @param aChild child this child's next-in-flow
|
||||
*/
|
||||
|
||||
/**
|
||||
* Push aFromChild and its next siblings to the next-in-flow. Change the
|
||||
* geometric parent of each frame that's pushed. If there is no next-in-flow
|
||||
|
@ -255,6 +246,7 @@ protected:
|
|||
void AppendChildren(nsIFrame* aChild, PRBool aSetParent = PR_TRUE);
|
||||
|
||||
// Returns true if aChild is being used as a pseudo frame
|
||||
// XXX deprecated
|
||||
PRBool ChildIsPseudoFrame(const nsIFrame* aChild) const;
|
||||
|
||||
virtual void WillDeleteNextInFlowFrame(nsIFrame* aNextInFlow);
|
||||
|
@ -272,22 +264,6 @@ protected:
|
|||
|
||||
void DumpTree() const;
|
||||
|
||||
/**
|
||||
* Before reflow for this container has started we check that all
|
||||
* is well.
|
||||
*/
|
||||
void PreReflowCheck();
|
||||
|
||||
/**
|
||||
* After reflow for this container has finished we check that all
|
||||
* is well.
|
||||
*
|
||||
* @param aStatus status to be returned from the resize reflow. If the status
|
||||
* is frNotComplete then the next-in-flow content offsets are
|
||||
* validated as well
|
||||
*/
|
||||
void PostReflowCheck(nsReflowStatus aStatus);
|
||||
|
||||
PRBool IsEmpty();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -119,10 +119,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
|
|||
{
|
||||
NS_FRAME_TRACE_REFLOW_IN("RootFrame::Reflow");
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
if (eReflowReason_Incremental == aReflowState.reason) {
|
||||
|
@ -162,9 +158,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
|
|||
aDesiredSize.ascent = aDesiredSize.height;
|
||||
aDesiredSize.descent = 0;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
NS_FRAME_TRACE_REFLOW_OUT("RootFrame::Reflow", aStatus);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -272,9 +265,6 @@ RootContentFrame::Reflow(nsIPresContext& aPresContext,
|
|||
nsReflowStatus& aStatus)
|
||||
{
|
||||
NS_FRAME_TRACE_REFLOW_IN("RootContentFrame::Reflow");
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
|
@ -445,9 +435,6 @@ RootContentFrame::Reflow(nsIPresContext& aPresContext,
|
|||
// properly pushed upwards
|
||||
nsContainerFrame* parent = (nsContainerFrame*) mGeometricParent;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
NS_FRAME_TRACE_REFLOW_OUT("RootContentFrame::Reflow", aStatus);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -68,9 +68,6 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext,
|
|||
const nsReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
aStatus = NS_FRAME_COMPLETE; // initialize out parameter
|
||||
|
||||
// XXX Do something sensible in page mode...
|
||||
|
@ -158,9 +155,6 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext,
|
|||
aDesiredSize.height = aReflowState.maxSize.height;
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,10 +119,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
|
|||
{
|
||||
NS_FRAME_TRACE_REFLOW_IN("RootFrame::Reflow");
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
if (eReflowReason_Incremental == aReflowState.reason) {
|
||||
|
@ -162,9 +158,6 @@ RootFrame::Reflow(nsIPresContext& aPresContext,
|
|||
aDesiredSize.ascent = aDesiredSize.height;
|
||||
aDesiredSize.descent = 0;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
NS_FRAME_TRACE_REFLOW_OUT("RootFrame::Reflow", aStatus);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -272,9 +265,6 @@ RootContentFrame::Reflow(nsIPresContext& aPresContext,
|
|||
nsReflowStatus& aStatus)
|
||||
{
|
||||
NS_FRAME_TRACE_REFLOW_IN("RootContentFrame::Reflow");
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
|
@ -445,9 +435,6 @@ RootContentFrame::Reflow(nsIPresContext& aPresContext,
|
|||
// properly pushed upwards
|
||||
nsContainerFrame* parent = (nsContainerFrame*) mGeometricParent;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
NS_FRAME_TRACE_REFLOW_OUT("RootContentFrame::Reflow", aStatus);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -68,9 +68,6 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext,
|
|||
const nsReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
aStatus = NS_FRAME_COMPLETE; // initialize out parameter
|
||||
|
||||
// XXX Do something sensible in page mode...
|
||||
|
@ -158,9 +155,6 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext,
|
|||
aDesiredSize.height = aReflowState.maxSize.height;
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -104,9 +104,6 @@ nsScrollBodyFrame::Reflow(nsIPresContext& aPresContext,
|
|||
aReflowState.maxSize.width,
|
||||
aReflowState.maxSize.height));
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
// XXX Incremental reflow code doesn't handle page mode at all...
|
||||
|
@ -257,10 +254,6 @@ nsScrollBodyFrame::Reflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
|
||||
NS_FRAME_TRACE_MSG(NS_FRAME_TRACE_CALLS,
|
||||
("exit nsScrollBodyFrame::Reflow: status=%d width=%d height=%d",
|
||||
aStatus, aDesiredSize.width, aDesiredSize.height));
|
||||
|
|
|
@ -1498,10 +1498,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
|
|||
this, aReflowState.reason, aReflowState.maxSize.width, aReflowState.maxSize.height);
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
// Initialize out parameter
|
||||
if (nsnull != aDesiredSize.maxElementSize) {
|
||||
aDesiredSize.maxElementSize->width = 0;
|
||||
|
@ -1609,10 +1605,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
|
|||
this, aDesiredSize.width, aDesiredSize.height);
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
|
||||
if (PR_TRUE==gsDebug) printf("end reflow for table %p\n", this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -929,9 +929,6 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (gsDebug==PR_TRUE)
|
||||
printf("nsTableRowFrame::Reflow - aMaxSize = %d, %d\n",
|
||||
aReflowState.maxSize.width, aReflowState.maxSize.height);
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
// Initialize 'out' parameters
|
||||
if (nsnull != aDesiredSize.maxElementSize) {
|
||||
|
@ -968,10 +965,6 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
|
||||
if (gsDebug==PR_TRUE)
|
||||
{
|
||||
if (nsnull!=aDesiredSize.maxElementSize)
|
||||
|
|
|
@ -745,9 +745,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (gsDebug==PR_TRUE)
|
||||
printf("nsTableRowGroupFrame::Reflow - aMaxSize = %d, %d\n",
|
||||
aReflowState.maxSize.width, aReflowState.maxSize.height);
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
// Initialize out parameter
|
||||
if (nsnull != aDesiredSize.maxElementSize) {
|
||||
|
@ -844,10 +841,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext,
|
|||
ShrinkWrapChildren(&aPresContext, aDesiredSize);
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
|
||||
if (gsDebug==PR_TRUE)
|
||||
{
|
||||
if (nsnull!=aDesiredSize.maxElementSize)
|
||||
|
|
|
@ -1498,10 +1498,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
|
|||
this, aReflowState.reason, aReflowState.maxSize.width, aReflowState.maxSize.height);
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
// Initialize out parameter
|
||||
if (nsnull != aDesiredSize.maxElementSize) {
|
||||
aDesiredSize.maxElementSize->width = 0;
|
||||
|
@ -1609,10 +1605,6 @@ NS_METHOD nsTableFrame::Reflow(nsIPresContext& aPresContext,
|
|||
this, aDesiredSize.width, aDesiredSize.height);
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
|
||||
if (PR_TRUE==gsDebug) printf("end reflow for table %p\n", this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -929,9 +929,6 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (gsDebug==PR_TRUE)
|
||||
printf("nsTableRowFrame::Reflow - aMaxSize = %d, %d\n",
|
||||
aReflowState.maxSize.width, aReflowState.maxSize.height);
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
// Initialize 'out' parameters
|
||||
if (nsnull != aDesiredSize.maxElementSize) {
|
||||
|
@ -968,10 +965,6 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
|
||||
if (gsDebug==PR_TRUE)
|
||||
{
|
||||
if (nsnull!=aDesiredSize.maxElementSize)
|
||||
|
|
|
@ -745,9 +745,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (gsDebug==PR_TRUE)
|
||||
printf("nsTableRowGroupFrame::Reflow - aMaxSize = %d, %d\n",
|
||||
aReflowState.maxSize.width, aReflowState.maxSize.height);
|
||||
#ifdef NS_DEBUG
|
||||
PreReflowCheck();
|
||||
#endif
|
||||
|
||||
// Initialize out parameter
|
||||
if (nsnull != aDesiredSize.maxElementSize) {
|
||||
|
@ -844,10 +841,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext,
|
|||
ShrinkWrapChildren(&aPresContext, aDesiredSize);
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
PostReflowCheck(aStatus);
|
||||
#endif
|
||||
|
||||
if (gsDebug==PR_TRUE)
|
||||
{
|
||||
if (nsnull!=aDesiredSize.maxElementSize)
|
||||
|
|
Загрузка…
Ссылка в новой задаче