Bug 1269971 - Part 5. Correct draw region in nsDisplayBackgroundColor::Paint;
MozReview-Commit-ID: LV8lP6NuV85
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -3379,31 +3379,30 @@ nsDisplayBackgroundColor::Paint(nsDispla
Rect rect = NSRectToSnappedRect(mBackgroundRect,
mFrame->PresContext()->AppUnitsPerDevPixel(),
aDrawTarget);
ColorPattern color(ToDeviceColor(mColor));
aDrawTarget.FillRect(rect, color);
#else
gfxContext* ctx = aCtx->ThebesContext();
+ gfxRect bounds =
+ nsLayoutUtils::RectToGfxRect(mBackgroundRect,
+ mFrame->PresContext()->AppUnitsPerDevPixel());
uint8_t clip = mBackgroundStyle->mImage.mLayers[0].mClip;
if (clip == NS_STYLE_IMAGELAYER_CLIP_TEXT) {
- gfxContextAutoSaveRestore save(ctx);
-
GenerateAndPushTextMask(mFrame, aCtx, mBackgroundRect);
ctx->SetColor(mColor);
+ ctx->Rectangle(bounds, true);
ctx->Fill();
ctx->PopGroupAndBlend();
return;
}
- gfxRect bounds =
- nsLayoutUtils::RectToGfxRect(mBackgroundRect, mFrame->PresContext()->AppUnitsPerDevPixel());
-
ctx->SetColor(mColor);
ctx->NewPath();
ctx->Rectangle(bounds, true);
ctx->Fill();
#endif
}
nsRegion