Backed out changeset 1e6d52401dd2
This commit is contained in:
@@ -155,7 +155,7 @@ class nsDisplayTextShadow : public nsDisplayItem {
|
||||
public:
|
||||
nsDisplayTextShadow(nsHTMLContainerFrame* aFrame, const PRUint8 aDecoration,
|
||||
const nscolor& aColor, nsLineBox* aLine,
|
||||
const nscoord& aBlurRadius, const nsPoint& aOffset)
|
||||
const nscoord& aBlurRadius, const gfxPoint& aOffset)
|
||||
: nsDisplayItem(aFrame), mLine(aLine), mColor(aColor),
|
||||
mDecorationFlags(aDecoration),
|
||||
mBlurRadius(aBlurRadius), mOffset(aOffset) {
|
||||
@@ -174,7 +174,7 @@ private:
|
||||
nscolor mColor;
|
||||
PRUint8 mDecorationFlags;
|
||||
nscoord mBlurRadius; // App units
|
||||
nsPoint mOffset; // App units
|
||||
gfxPoint mOffset; // App units
|
||||
};
|
||||
|
||||
void
|
||||
@@ -192,17 +192,21 @@ nsDisplayTextShadow::Paint(nsDisplayListBuilder* aBuilder,
|
||||
if (!firstFont)
|
||||
return; // OOM
|
||||
const gfxFont::Metrics& metrics = firstFont->GetMetrics();
|
||||
nsPoint pt = aBuilder->ToReferenceFrame(mFrame) + nsPoint(mOffset.x, mOffset.y);
|
||||
|
||||
nsHTMLContainerFrame* f = static_cast<nsHTMLContainerFrame*>(mFrame);
|
||||
nsPoint pt = aBuilder->ToReferenceFrame(mFrame) + mOffset;
|
||||
nsMargin bp = f->GetUsedBorderAndPadding();
|
||||
nscoord innerWidthInAppUnits = (mFrame->GetSize().width - bp.LeftRight());
|
||||
|
||||
nsRect shadowRect = mFrame->GetContentRect() - mFrame->GetPosition() + pt;
|
||||
gfxRect shadowRect = gfxRect(pt.x, pt.y, innerWidthInAppUnits, mFrame->GetSize().height);
|
||||
gfxContext* thebesCtx = aCtx->ThebesContext();
|
||||
|
||||
gfxRect dirtyRect(aDirtyRect.x, aDirtyRect.y, aDirtyRect.width, aDirtyRect.height);
|
||||
|
||||
nsContextBoxBlur contextBoxBlur;
|
||||
gfxContext* shadowCtx = contextBoxBlur.Init(shadowRect, mBlurRadius,
|
||||
mFrame->PresContext()->AppUnitsPerDevPixel(),
|
||||
thebesCtx, aDirtyRect);
|
||||
thebesCtx, dirtyRect);
|
||||
if (!shadowCtx)
|
||||
return;
|
||||
|
||||
@@ -275,7 +279,7 @@ nsHTMLContainerFrame::DisplayTextDecorations(nsDisplayListBuilder* aBuilder,
|
||||
else
|
||||
shadowColor = GetStyleColor()->mColor;
|
||||
|
||||
nsPoint offset(shadow->mXOffset, shadow->mYOffset);
|
||||
gfxPoint offset = gfxPoint(shadow->mXOffset, shadow->mYOffset);
|
||||
|
||||
// Add it to the display list so it is painted underneath the text and all decorations
|
||||
nsresult rv = aBelowTextDecorations->AppendNewToTop(new (aBuilder)
|
||||
|
||||
Reference in New Issue
Block a user