mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 14:15:30 +00:00
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:
parent
4d224c9485
commit
56bb77b76d
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user