mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Provide correct GetBounds() for nsDisplayMathMLCharForeground. Bug 161155 - Integrals appear clipped sometimes. r+sr=roc
This commit is contained in:
parent
b07dd04746
commit
7c689c0e12
@ -1854,21 +1854,31 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder) {
|
||||
nsRect rect;
|
||||
mChar->GetRect(rect);
|
||||
nsPoint offset =
|
||||
aBuilder->ToReferenceFrame(mFrame) + rect.TopLeft();
|
||||
nsBoundingMetrics bm;
|
||||
mChar->GetBoundingMetrics(bm);
|
||||
return nsRect(offset.x + bm.leftBearing, offset.y,
|
||||
bm.rightBearing - bm.leftBearing, bm.ascent + bm.descent);
|
||||
}
|
||||
|
||||
virtual void Paint(nsDisplayListBuilder* aBuilder, nsIRenderingContext* aCtx,
|
||||
const nsRect& aDirtyRect);
|
||||
const nsRect& aDirtyRect)
|
||||
{
|
||||
mChar->PaintForeground(mFrame->PresContext(), *aCtx,
|
||||
aBuilder->ToReferenceFrame(mFrame), mIsSelected);
|
||||
}
|
||||
|
||||
NS_DISPLAY_DECL_NAME("MathMLCharForeground")
|
||||
|
||||
private:
|
||||
nsMathMLChar* mChar;
|
||||
PRPackedBool mIsSelected;
|
||||
};
|
||||
|
||||
void nsDisplayMathMLCharForeground::Paint(nsDisplayListBuilder* aBuilder,
|
||||
nsIRenderingContext* aCtx, const nsRect& aDirtyRect)
|
||||
{
|
||||
mChar->PaintForeground(mFrame->PresContext(), *aCtx,
|
||||
aBuilder->ToReferenceFrame(mFrame), mIsSelected);
|
||||
}
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
class nsDisplayMathMLCharDebug : public nsDisplayItem {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user