From 82b8f74f2a690b1f296a73adca9a3baf294e80a5 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Tue, 25 Nov 2014 16:46:14 -0800 Subject: [PATCH] Bug 1098417 part 2: Make nsImageFrame pass "object-position"-determined anchor-point to DrawSingleImage. r=seth --- layout/generic/nsImageFrame.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 47794ba938f7..be631ddb573e 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -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) {