Loading layout/reftests/svg/image/image-scaling-03.svg 0 → 100644 +19 −0 Original line number Diff line number Diff line <!-- Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ --> <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1776098 Make sure small scaled vector images display. --> <svg xmlns="http://www.w3.org/2000/svg"> <title> Ensure small vector images display</title> <rect width="100%" height="100%" fill="lime"/> <rect width="98" height="98" fill="red"/> <image transform="scale(200)" width="0.5" height="0.5" href="lime100x100.svg"/> </svg> layout/reftests/svg/image/reftest.list +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ fuzzy(0-1,0-100) == image-opacity-02.svg image-opacity-02-ref.svg # Bug 776039 f == image-rotate-02b.svg image-rotate-02-ref.svg == image-scaling-01.svg ../pass.svg == image-scaling-02.svg ../pass.svg == image-scaling-03.svg ../pass.svg == image-svg-inline-01.html ../pass.svg == image-svg-inline-zoom-in-01a.html ../pass.svg == image-svg-inline-zoom-in-01b.html ../pass.svg Loading layout/svg/SVGImageFrame.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -375,7 +375,7 @@ void SVGImageFrame::PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform, // of the SVG image's internal document that is visible, in combination // with preserveAspectRatio and viewBox. const SVGImageContext context( Some(CSSIntSize::Truncate(width, height)), Some(CSSIntSize::Ceil(width, height)), Some(imgElem->mPreserveAspectRatio.GetAnimValue())); // For the actual draw operation to draw crisply (and at the right size), Loading Loading @@ -617,7 +617,7 @@ bool SVGImageFrame::CreateWebRenderCommands( flags |= imgIContainer::FLAG_RECORD_BLOB; } // Forward preserveAspectRatio to inner SVGs svgContext.SetViewportSize(Some(CSSIntSize::Truncate(width, height))); svgContext.SetViewportSize(Some(CSSIntSize::Ceil(width, height))); svgContext.SetPreserveAspectRatio( Some(imgElem->mPreserveAspectRatio.GetAnimValue())); } Loading Loading
layout/reftests/svg/image/image-scaling-03.svg 0 → 100644 +19 −0 Original line number Diff line number Diff line <!-- Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ --> <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=1776098 Make sure small scaled vector images display. --> <svg xmlns="http://www.w3.org/2000/svg"> <title> Ensure small vector images display</title> <rect width="100%" height="100%" fill="lime"/> <rect width="98" height="98" fill="red"/> <image transform="scale(200)" width="0.5" height="0.5" href="lime100x100.svg"/> </svg>
layout/reftests/svg/image/reftest.list +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ fuzzy(0-1,0-100) == image-opacity-02.svg image-opacity-02-ref.svg # Bug 776039 f == image-rotate-02b.svg image-rotate-02-ref.svg == image-scaling-01.svg ../pass.svg == image-scaling-02.svg ../pass.svg == image-scaling-03.svg ../pass.svg == image-svg-inline-01.html ../pass.svg == image-svg-inline-zoom-in-01a.html ../pass.svg == image-svg-inline-zoom-in-01b.html ../pass.svg Loading
layout/svg/SVGImageFrame.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -375,7 +375,7 @@ void SVGImageFrame::PaintSVG(gfxContext& aContext, const gfxMatrix& aTransform, // of the SVG image's internal document that is visible, in combination // with preserveAspectRatio and viewBox. const SVGImageContext context( Some(CSSIntSize::Truncate(width, height)), Some(CSSIntSize::Ceil(width, height)), Some(imgElem->mPreserveAspectRatio.GetAnimValue())); // For the actual draw operation to draw crisply (and at the right size), Loading Loading @@ -617,7 +617,7 @@ bool SVGImageFrame::CreateWebRenderCommands( flags |= imgIContainer::FLAG_RECORD_BLOB; } // Forward preserveAspectRatio to inner SVGs svgContext.SetViewportSize(Some(CSSIntSize::Truncate(width, height))); svgContext.SetViewportSize(Some(CSSIntSize::Ceil(width, height))); svgContext.SetPreserveAspectRatio( Some(imgElem->mPreserveAspectRatio.GetAnimValue())); } Loading