зеркало из https://github.com/mozilla/gecko-dev.git
Bug 104544 (unpainted horizontal lines in images when scrolling). If we get twip coordinates from layout that aren't on pixel boundaries, round the rect out to make sure we paint everything that we need to. r=pavlov, sr=jag/brendan.
This commit is contained in:
Родитель
4e61c415e1
Коммит
d9b087e808
|
@ -891,11 +891,12 @@ NS_IMETHODIMP nsRenderingContextImpl::DrawImage(imgIContainer *aImage, const nsR
|
|||
mTranMatrix->TransformCoord(&pt.x, &pt.y);
|
||||
|
||||
sr = *aSrcRect;
|
||||
mTranMatrix->TransformCoord(&sr.x, &sr.y, &sr.width, &sr.height);
|
||||
|
||||
sr.x = aSrcRect->x;
|
||||
sr.y = aSrcRect->y;
|
||||
mTranMatrix->TransformNoXLateCoord(&sr.x, &sr.y);
|
||||
nsCOMPtr<nsIDeviceContext> dc;
|
||||
GetDeviceContext(*getter_AddRefs(dc));
|
||||
float t2p;
|
||||
dc->GetAppUnitsToDevUnits(t2p);
|
||||
sr.ScaleRoundOut(t2p);
|
||||
|
||||
nsCOMPtr<gfxIImageFrame> iframe;
|
||||
aImage->GetCurrentFrame(getter_AddRefs(iframe));
|
||||
|
|
|
@ -891,11 +891,12 @@ NS_IMETHODIMP nsRenderingContextImpl::DrawImage(imgIContainer *aImage, const nsR
|
|||
mTranMatrix->TransformCoord(&pt.x, &pt.y);
|
||||
|
||||
sr = *aSrcRect;
|
||||
mTranMatrix->TransformCoord(&sr.x, &sr.y, &sr.width, &sr.height);
|
||||
|
||||
sr.x = aSrcRect->x;
|
||||
sr.y = aSrcRect->y;
|
||||
mTranMatrix->TransformNoXLateCoord(&sr.x, &sr.y);
|
||||
nsCOMPtr<nsIDeviceContext> dc;
|
||||
GetDeviceContext(*getter_AddRefs(dc));
|
||||
float t2p;
|
||||
dc->GetAppUnitsToDevUnits(t2p);
|
||||
sr.ScaleRoundOut(t2p);
|
||||
|
||||
nsCOMPtr<gfxIImageFrame> iframe;
|
||||
aImage->GetCurrentFrame(getter_AddRefs(iframe));
|
||||
|
|
Загрузка…
Ссылка в новой задаче