From 60a2733104ef998419faf8cf5b1bfe20918b8c94 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Mon, 29 Mar 1999 23:44:59 +0000 Subject: [PATCH] Removed cruft; added IsHTMLParagraph method --- layout/generic/nsBlockReflowContext.h | 26 ++++----------------- layout/html/base/src/nsBlockReflowContext.h | 26 ++++----------------- 2 files changed, 10 insertions(+), 42 deletions(-) diff --git a/layout/generic/nsBlockReflowContext.h b/layout/generic/nsBlockReflowContext.h index c9ae558b36a7..157dcf268797 100644 --- a/layout/generic/nsBlockReflowContext.h +++ b/layout/generic/nsBlockReflowContext.h @@ -64,18 +64,6 @@ public: nsRect& aInFlowBounds, nsRect& aCombinedRect); -//XXX nscoord GetCollapsedTopMargin() const { -//XXX return mTopMargin; -//XXX } - -//XXX nscoord GetCollapsedBottomMargin() const { -//XXX return mBottomMargin; -//XXX } - -//XXX nscoord GetCarriedOutTopMargin() const { -//XXX return mMetrics.mCarriedOutTopMargin; -//XXX } - nscoord GetCarriedOutBottomMargin() const { return mMetrics.mCarriedOutBottomMargin; } @@ -84,12 +72,6 @@ public: return mMaxElementSize; } - static void ComputeMarginsFor(nsIPresContext& aPresContext, - nsIFrame* aFrame, - const nsStyleSpacing* aSpacing, - const nsHTMLReflowState& aParentRS, - nsMargin& aResult); - static void CollapseMargins(const nsMargin& aMargin, nscoord aCarriedOutTopMargin, nscoord aCarriedOutBottomMargin, @@ -98,6 +80,8 @@ public: nscoord& aTopMarginResult, nscoord& aBottomMarginResult); + // Compute the largest of two adjacent vertical margins, as per the + // CSS2 spec section 8.3.1 static nscoord MaxMargin(nscoord a, nscoord b) { if (a < 0) { if (b < 0) { @@ -113,6 +97,8 @@ public: return b; } + static PRBool IsHTMLParagraph(nsIFrame* aFrame); + protected: nsStyleUnit GetRealMarginLeftUnit(); nsStyleUnit GetRealMarginRightUnit(); @@ -131,9 +117,7 @@ protected: nsMargin mMargin; nscoord mX, mY; nsHTMLReflowMetrics mMetrics; -//XXX nscoord mSpeculativeTopMargin; -//XXX nscoord mTopMargin; -//XXX nscoord mBottomMargin; + nscoord mTopMargin; nsSize mMaxElementSize; PRBool mIsTable; diff --git a/layout/html/base/src/nsBlockReflowContext.h b/layout/html/base/src/nsBlockReflowContext.h index c9ae558b36a7..157dcf268797 100644 --- a/layout/html/base/src/nsBlockReflowContext.h +++ b/layout/html/base/src/nsBlockReflowContext.h @@ -64,18 +64,6 @@ public: nsRect& aInFlowBounds, nsRect& aCombinedRect); -//XXX nscoord GetCollapsedTopMargin() const { -//XXX return mTopMargin; -//XXX } - -//XXX nscoord GetCollapsedBottomMargin() const { -//XXX return mBottomMargin; -//XXX } - -//XXX nscoord GetCarriedOutTopMargin() const { -//XXX return mMetrics.mCarriedOutTopMargin; -//XXX } - nscoord GetCarriedOutBottomMargin() const { return mMetrics.mCarriedOutBottomMargin; } @@ -84,12 +72,6 @@ public: return mMaxElementSize; } - static void ComputeMarginsFor(nsIPresContext& aPresContext, - nsIFrame* aFrame, - const nsStyleSpacing* aSpacing, - const nsHTMLReflowState& aParentRS, - nsMargin& aResult); - static void CollapseMargins(const nsMargin& aMargin, nscoord aCarriedOutTopMargin, nscoord aCarriedOutBottomMargin, @@ -98,6 +80,8 @@ public: nscoord& aTopMarginResult, nscoord& aBottomMarginResult); + // Compute the largest of two adjacent vertical margins, as per the + // CSS2 spec section 8.3.1 static nscoord MaxMargin(nscoord a, nscoord b) { if (a < 0) { if (b < 0) { @@ -113,6 +97,8 @@ public: return b; } + static PRBool IsHTMLParagraph(nsIFrame* aFrame); + protected: nsStyleUnit GetRealMarginLeftUnit(); nsStyleUnit GetRealMarginRightUnit(); @@ -131,9 +117,7 @@ protected: nsMargin mMargin; nscoord mX, mY; nsHTMLReflowMetrics mMetrics; -//XXX nscoord mSpeculativeTopMargin; -//XXX nscoord mTopMargin; -//XXX nscoord mBottomMargin; + nscoord mTopMargin; nsSize mMaxElementSize; PRBool mIsTable;