From 399ce5dd64011e8bb03840e1cb6ed2d1db1e1acf Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Fri, 5 Mar 1999 04:28:07 +0000 Subject: [PATCH] use new nsHTMLReflowState ctors; made pages support IsPercentageBase git-svn-id: svn://10.0.0.236/trunk@22847 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsPageFrame.cpp | 14 ++++++++++---- mozilla/layout/generic/nsPageFrame.h | 1 + mozilla/layout/html/base/src/nsPageFrame.cpp | 14 ++++++++++---- mozilla/layout/html/base/src/nsPageFrame.h | 1 + 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/mozilla/layout/generic/nsPageFrame.cpp b/mozilla/layout/generic/nsPageFrame.cpp index 2b4d311751b..8c27cbfe7dc 100644 --- a/mozilla/layout/generic/nsPageFrame.cpp +++ b/mozilla/layout/generic/nsPageFrame.cpp @@ -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 diff --git a/mozilla/layout/generic/nsPageFrame.h b/mozilla/layout/generic/nsPageFrame.h index 9f38b7e266f..ae074173777 100644 --- a/mozilla/layout/generic/nsPageFrame.h +++ b/mozilla/layout/generic/nsPageFrame.h @@ -29,6 +29,7 @@ public: nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aMaxSize, nsReflowStatus& aStatus); + NS_IMETHOD IsPercentageBase(PRBool& aBase) const; /** * Get the "type" of the frame diff --git a/mozilla/layout/html/base/src/nsPageFrame.cpp b/mozilla/layout/html/base/src/nsPageFrame.cpp index 2b4d311751b..8c27cbfe7dc 100644 --- a/mozilla/layout/html/base/src/nsPageFrame.cpp +++ b/mozilla/layout/html/base/src/nsPageFrame.cpp @@ -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 diff --git a/mozilla/layout/html/base/src/nsPageFrame.h b/mozilla/layout/html/base/src/nsPageFrame.h index 9f38b7e266f..ae074173777 100644 --- a/mozilla/layout/html/base/src/nsPageFrame.h +++ b/mozilla/layout/html/base/src/nsPageFrame.h @@ -29,6 +29,7 @@ public: nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aMaxSize, nsReflowStatus& aStatus); + NS_IMETHOD IsPercentageBase(PRBool& aBase) const; /** * Get the "type" of the frame