Bug 644428 - (Alternative approach) Clamp the baseline for every case to the context box height for inline frames; r=roc

This commit is contained in:
Ehsan Akhgari 2011-04-09 09:13:16 -07:00
parent 4d224c9485
commit 56bb77b76d
2 changed files with 1 additions and 18 deletions

View File

@ -919,23 +919,7 @@ nsInlineFrame::GetBaseline() const
if (NS_SUCCEEDED(nsLayoutUtils::GetFontMetricsForFrame(this, getter_AddRefs(fm)))) {
fm->GetMaxAscent(ascent);
}
return ascent + GetUsedBorderAndPadding().top;
}
nscoord
nsInlineFrame::GetCaretBaseline() const
{
nscoord baseline;
if (mRect.height == 0) {
// Empty inline frames will be pushed down in the line, so we need to
// account for that here.
baseline = 0;
} else {
baseline = GetBaseline();
NS_ASSERTION(baseline <= mRect.height,
"We should never hit a case where our height is non-zero but smaller than the caret baseline...");
}
return baseline;
return NS_MIN(mRect.height, ascent + GetUsedBorderAndPadding().top);
}
#ifdef ACCESSIBILITY

View File

@ -119,7 +119,6 @@ public:
virtual void PullOverflowsFromPrevInFlow();
virtual nscoord GetBaseline() const;
virtual nscoord GetCaretBaseline() const;
/**
* Return true if the frame is leftmost frame or continuation.