Bug 1098417 part 2: Make nsImageFrame pass "object-position"-determined anchor-point to DrawSingleImage. r=seth
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user