Bug 786254 - SVG effects rendering doesn't pixel snap, causing faint vertical lines appear on some tabs. r=roc

This commit is contained in:
Xidorn Quan 2013-07-24 09:03:11 -04:00
Родитель 08d5b9fa65
Коммит b4cc4e0631
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -464,7 +464,16 @@ nsSVGIntegrationUtils::PaintFramesWithEffects(nsRenderingContext* aCtx,
nsPoint firstFrameOffset = GetOffsetToUserSpace(firstFrame);
nsPoint offset = aBuilder->ToReferenceFrame(firstFrame) - firstFrameOffset;
nsPoint offsetWithoutSVGGeomFramePos = offset;
nsPoint offsetWithoutSVGGeomFramePos;
if (firstFrame->IsFrameOfType(nsIFrame::eSVG)) {
offsetWithoutSVGGeomFramePos = offset;
} else {
/* Snap the offset if the reference frame is not a SVG frame,
* since other frames will be snapped to pixel when rendering. */
offsetWithoutSVGGeomFramePos = nsPoint(
aFrame->PresContext()->RoundAppUnitsToNearestDevPixels(offset.x),
aFrame->PresContext()->RoundAppUnitsToNearestDevPixels(offset.y));
}
nsPoint svgGeomFramePos;
if (aFrame->IsFrameOfType(nsIFrame::eSVGGeometry) ||
aFrame->IsSVGText()) {