Bug 1098417 part 2: Make nsImageFrame pass "object-position"-determined anchor-point to DrawSingleImage. r=seth

This commit is contained in:
Daniel Holbert
2014-11-25 16:46:14 -08:00
parent b359265602
commit 9a9c64d535

View File

@@ -1538,15 +1538,17 @@ nsImageFrame::PaintImage(nsRenderingContext& aRenderingContext, nsPoint aPt,
nsRect constraintRect(aPt + GetInnerArea().TopLeft(), mComputedSize);
constraintRect.y -= GetContinuationOffset();
nsPoint anchorPoint;
nsRect dest = nsLayoutUtils::ComputeObjectDestRect(constraintRect,
mIntrinsicSize,
mIntrinsicRatio,
StylePosition());
StylePosition(),
&anchorPoint);
nsLayoutUtils::DrawSingleImage(*aRenderingContext.ThebesContext(),
PresContext(), aImage,
nsLayoutUtils::GetGraphicsFilterForFrame(this), dest, aDirtyRect,
nullptr, aFlags);
nullptr, aFlags, &anchorPoint);
nsImageMap* map = GetImageMap();
if (map) {