Change the bulk of ascent (baseline) computation to happen on a virtual method on nsIFrame, and remove the redundant descent member from nsHTMLReflowMetrics, primarily to support having both first-line and last-line baselines. b=367332 r+sr=roc

git-svn-id: svn://10.0.0.236/trunk@218785 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%dbaron.org
2007-01-23 04:06:56 +00:00
parent 99df522954
commit 103e95ab15
76 changed files with 601 additions and 386 deletions

View File

@@ -279,7 +279,7 @@ nsMathMLmactionFrame::Reflow(nsPresContext* aPresContext,
nsresult rv = NS_OK;
aStatus = NS_FRAME_COMPLETE;
aDesiredSize.width = aDesiredSize.height = 0;
aDesiredSize.ascent = aDesiredSize.descent = 0;
aDesiredSize.ascent = 0;
mBoundingMetrics.Clear();
nsIFrame* childFrame = GetSelectedFrame();
if (childFrame) {
@@ -288,7 +288,7 @@ nsMathMLmactionFrame::Reflow(nsPresContext* aPresContext,
childFrame, availSize);
rv = ReflowChild(childFrame, aPresContext, aDesiredSize,
childReflowState, aStatus);
childFrame->SetRect(nsRect(aDesiredSize.descent,aDesiredSize.ascent,
childFrame->SetRect(nsRect(0,aDesiredSize.ascent,
aDesiredSize.width,aDesiredSize.height));
mBoundingMetrics = aDesiredSize.mBoundingMetrics;
}
@@ -304,7 +304,7 @@ nsMathMLmactionFrame::Place(nsIRenderingContext& aRenderingContext,
nsHTMLReflowMetrics& aDesiredSize)
{
aDesiredSize.width = aDesiredSize.height = 0;
aDesiredSize.ascent = aDesiredSize.descent = 0;
aDesiredSize.ascent = 0;
mBoundingMetrics.Clear();
nsIFrame* childFrame = GetSelectedFrame();
if (childFrame) {