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); nsRect constraintRect(aPt + GetInnerArea().TopLeft(), mComputedSize);
constraintRect.y -= GetContinuationOffset(); constraintRect.y -= GetContinuationOffset();
nsPoint anchorPoint;
nsRect dest = nsLayoutUtils::ComputeObjectDestRect(constraintRect, nsRect dest = nsLayoutUtils::ComputeObjectDestRect(constraintRect,
mIntrinsicSize, mIntrinsicSize,
mIntrinsicRatio, mIntrinsicRatio,
StylePosition()); StylePosition(),
&anchorPoint);
nsLayoutUtils::DrawSingleImage(*aRenderingContext.ThebesContext(), nsLayoutUtils::DrawSingleImage(*aRenderingContext.ThebesContext(),
PresContext(), aImage, PresContext(), aImage,
nsLayoutUtils::GetGraphicsFilterForFrame(this), dest, aDirtyRect, nsLayoutUtils::GetGraphicsFilterForFrame(this), dest, aDirtyRect,
nullptr, aFlags); nullptr, aFlags, &anchorPoint);
nsImageMap* map = GetImageMap(); nsImageMap* map = GetImageMap();
if (map) { if (map) {