Backing out bug 413027

git-svn-id: svn://10.0.0.236/trunk@247536 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu 2008-03-11 08:36:03 +00:00
parent 7cf7812492
commit 09a7cb12fb
2 changed files with 27 additions and 2 deletions

View File

@ -5854,7 +5854,32 @@ nsFrame::RefreshSizeCache(nsBoxLayoutState& aState)
Redraw(aState, &newRect);
}
metrics->mBlockMinSize.height = metrics->mBlockPrefSize.height = newRect.height;
metrics->mBlockMinSize.height = 0;
// ok we need the max ascent of the items on the line. So to do this
// ask the block for its line iterator. Get the max ascent.
nsCOMPtr<nsILineIterator> lines = do_QueryInterface(static_cast<nsIFrame*>(this));
if (lines)
{
metrics->mBlockMinSize.height = 0;
int count = 0;
nsIFrame* firstFrame = nsnull;
PRInt32 framesOnLine;
nsRect lineBounds;
PRUint32 lineFlags;
do {
lines->GetLine(count, &firstFrame, &framesOnLine, lineBounds, &lineFlags);
if (lineBounds.height > metrics->mBlockMinSize.height)
metrics->mBlockMinSize.height = lineBounds.height;
count++;
} while(firstFrame);
} else {
metrics->mBlockMinSize.height = desiredSize.height;
}
metrics->mBlockPrefSize.height = metrics->mBlockMinSize.height;
if (desiredSize.ascent == nsHTMLReflowMetrics::ASK_FOR_BASELINE) {
if (!nsLayoutUtils::GetFirstLineBaseline(this, &metrics->mBlockAscent))

View File

@ -720,7 +720,7 @@ random == 403134-1.html 403134-1-ref.html # bug 405377
== 412607-1b.html 412607-1-ref.html
== 412679-1.html 412679-1-ref.html
== 412679-2.html 412679-2-ref.html
== 413027-1.html 413027-1-ref.html
# == 413027-1.html 413027-1-ref.html
== 413286-1a.html 413286-1-ref.html
== 413286-1b.html 413286-1-ref.html
== 413286-1c.html 413286-1-ref.html