use new nsHTMLReflowState ctors; made pages support IsPercentageBase

This commit is contained in:
kipp%netscape.com 1999-03-05 04:28:07 +00:00
Родитель d82c80b2ed
Коммит 24b1378c74
4 изменённых файлов: 22 добавлений и 8 удалений

Просмотреть файл

@ -57,9 +57,8 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext,
// Dispatch the reflow command to our content child. Allow it to be as high
// as it wants
nsSize maxSize(aReflowState.availableWidth, NS_UNCONSTRAINEDSIZE);
nsHTMLReflowState kidReflowState(aPresContext, mFrames.FirstChild(),
aReflowState,
maxSize);
nsHTMLReflowState kidReflowState(aPresContext, aReflowState,
mFrames.FirstChild(), maxSize);
kidReflowState.isTopOfPage = PR_TRUE;
ReflowChild(mFrames.FirstChild(), aPresContext, aDesiredSize,
@ -100,7 +99,7 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext,
if (mFrames.NotEmpty()) {
nsIFrame* frame = mFrames.FirstChild();
nsSize maxSize(aReflowState.availableWidth, aReflowState.availableHeight);
nsHTMLReflowState kidReflowState(aPresContext, frame, aReflowState,
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, frame,
maxSize);
kidReflowState.isTopOfPage = PR_TRUE;
@ -153,6 +152,13 @@ nsPageFrame::GetFrameName(nsString& aResult) const
return MakeFrameName("Page", aResult);
}
NS_IMETHODIMP
nsPageFrame::IsPercentageBase(PRBool& aBase) const
{
aBase = PR_TRUE;
return NS_OK;
}
//----------------------------------------------------------------------
nsresult

Просмотреть файл

@ -29,6 +29,7 @@ public:
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus);
NS_IMETHOD IsPercentageBase(PRBool& aBase) const;
/**
* Get the "type" of the frame

Просмотреть файл

@ -57,9 +57,8 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext,
// Dispatch the reflow command to our content child. Allow it to be as high
// as it wants
nsSize maxSize(aReflowState.availableWidth, NS_UNCONSTRAINEDSIZE);
nsHTMLReflowState kidReflowState(aPresContext, mFrames.FirstChild(),
aReflowState,
maxSize);
nsHTMLReflowState kidReflowState(aPresContext, aReflowState,
mFrames.FirstChild(), maxSize);
kidReflowState.isTopOfPage = PR_TRUE;
ReflowChild(mFrames.FirstChild(), aPresContext, aDesiredSize,
@ -100,7 +99,7 @@ NS_METHOD nsPageFrame::Reflow(nsIPresContext& aPresContext,
if (mFrames.NotEmpty()) {
nsIFrame* frame = mFrames.FirstChild();
nsSize maxSize(aReflowState.availableWidth, aReflowState.availableHeight);
nsHTMLReflowState kidReflowState(aPresContext, frame, aReflowState,
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, frame,
maxSize);
kidReflowState.isTopOfPage = PR_TRUE;
@ -153,6 +152,13 @@ nsPageFrame::GetFrameName(nsString& aResult) const
return MakeFrameName("Page", aResult);
}
NS_IMETHODIMP
nsPageFrame::IsPercentageBase(PRBool& aBase) const
{
aBase = PR_TRUE;
return NS_OK;
}
//----------------------------------------------------------------------
nsresult

Просмотреть файл

@ -29,6 +29,7 @@ public:
nsHTMLReflowMetrics& aDesiredSize,
const nsHTMLReflowState& aMaxSize,
nsReflowStatus& aStatus);
NS_IMETHOD IsPercentageBase(PRBool& aBase) const;
/**
* Get the "type" of the frame