Bug 608812 - Should snap subpixel value for outer svg and anon child r=longsonr

We should  snap subpixel value at nsDisplayTransform::GetResultingTransformMatrix
for outer svg and the anon child. This will solve blurry rendering for subpixel position
when webrender is __not__ enabled.

Differential Revision: https://phabricator.services.mozilla.com/D29344

--HG--
extra : moz-landing-system : lando
This commit is contained in:
violet 2019-05-01 17:53:32 +00:00
Родитель ce390c7a4f
Коммит 3c2c9a686e
2 изменённых файлов: 10 добавлений и 5 удалений

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

@ -7803,10 +7803,15 @@ Matrix4x4 nsDisplayTransform::GetResultingTransformMatrixInternal(
frame && frame &&
frame->IsSVGTransformed(&svgTransform, &parentsChildrenOnlyTransform); frame->IsSVGTransformed(&svgTransform, &parentsChildrenOnlyTransform);
bool shouldRound = true;
// An SVG frame should not have its translation rounded. // An SVG frame should not have its translation rounded.
// Note it's possible that the SVG frame doesn't have an SVG // Note it's possible that the SVG frame doesn't have an SVG
// transform but only has a CSS transform. // transform but only has a CSS transform.
bool shouldRound = !(frame && frame->IsFrameOfType(nsIFrame::eSVG)); if (frame && frame->HasAnyStateBits(NS_FRAME_SVG_LAYOUT) &&
!frame->IsSVGOuterSVGAnonChildFrame()) {
shouldRound = false;
}
/* Transformed frames always have a transform, or are preserving 3d (and might /* Transformed frames always have a transform, or are preserving 3d (and might
* still have perspective!) */ * still have perspective!) */

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

@ -181,13 +181,13 @@ fails-if(!webrender) == object-position-png-002c.html object-position-png-002-re
== object-position-png-002i.html object-position-png-002-ref.html == object-position-png-002i.html object-position-png-002-ref.html
== object-position-png-002o.html object-position-png-002-ref.html == object-position-png-002o.html object-position-png-002-ref.html
== object-position-png-002p.html object-position-png-002-ref.html == object-position-png-002p.html object-position-png-002-ref.html
fails-if(!webrender) random-if(webrender) == object-position-svg-001e.html object-position-svg-001-ref.html # bug 1103286 random-if(webrender) == object-position-svg-001e.html object-position-svg-001-ref.html # bug 1103286
== object-position-svg-001i.html object-position-svg-001-ref.html == object-position-svg-001i.html object-position-svg-001-ref.html
fails-if(!webrender) random-if(webrender) == object-position-svg-001o.html object-position-svg-001-ref.html # bug 1103286 random-if(webrender) == object-position-svg-001o.html object-position-svg-001-ref.html # bug 1103286
== object-position-svg-001p.html object-position-svg-001-ref.html == object-position-svg-001p.html object-position-svg-001-ref.html
fails == object-position-svg-002e.html object-position-svg-002-ref.html # bug 1103286 fails-if(webrender) == object-position-svg-002e.html object-position-svg-002-ref.html # bug 1103286
== object-position-svg-002i.html object-position-svg-002-ref.html == object-position-svg-002i.html object-position-svg-002-ref.html
fails == object-position-svg-002o.html object-position-svg-002-ref.html # bug 1103286 fails-if(webrender) == object-position-svg-002o.html object-position-svg-002-ref.html # bug 1103286
== object-position-svg-002p.html object-position-svg-002-ref.html == object-position-svg-002p.html object-position-svg-002-ref.html
# Tests for gradient color stops with 'currentcolor' # Tests for gradient color stops with 'currentcolor'