Bug 276431 Patch 9: Handle kFullImageSpaceRect in imgIContainerObserver::OnFrameChanged impls. r=roc a=blocking
This commit is contained in:
@@ -203,8 +203,10 @@ NS_IMETHODIMP nsImageLoader::FrameChanged(imgIContainer *aContainer,
|
|||||||
// We're in the middle of a paint anyway
|
// We're in the middle of a paint anyway
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRect r = aDirtyRect->ToAppUnits(nsPresContext::AppUnitsPerCSSPixel());
|
nsRect r = (*aDirtyRect == mozilla::imagelib::kFullImageSpaceRect) ?
|
||||||
|
nsRect(nsPoint(0, 0), mFrame->GetSize()) :
|
||||||
|
aDirtyRect->ToAppUnits(nsPresContext::AppUnitsPerCSSPixel());
|
||||||
|
|
||||||
DoRedraw(&r);
|
DoRedraw(&r);
|
||||||
|
|
||||||
|
|||||||
@@ -659,8 +659,10 @@ nsImageFrame::FrameChanged(imgIContainer *aContainer,
|
|||||||
// We don't care about it
|
// We don't care about it
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsRect r = SourceRectToDest(*aDirtyRect);
|
nsRect r = (*aDirtyRect == mozilla::imagelib::kFullImageSpaceRect) ?
|
||||||
|
GetInnerArea() :
|
||||||
|
SourceRectToDest(*aDirtyRect);
|
||||||
|
|
||||||
// Update border+content to account for image change
|
// Update border+content to account for image change
|
||||||
Invalidate(r);
|
Invalidate(r);
|
||||||
|
|||||||
Reference in New Issue
Block a user