From 4bb5a957fb7a792e957cc1a9a191ad74688b2c7f Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 14 Aug 2019 13:38:25 +0200 Subject: Issue #438: Pixel-snap subpixel value for outer SVG and anon child. This doesn't solve the blurriness yet, but is part of the problem. --- layout/base/nsDisplayList.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'layout') diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index cd0c623df..44fc95deb 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -5918,11 +5918,16 @@ nsDisplayTransform::GetResultingTransformMatrixInternal(const FrameTransformProp bool hasTransformFromSVGParent = hasSVGTransforms && !transformFromSVGParent.IsIdentity(); + bool shouldRound = true; + // An SVG frame should not have its translation rounded. // Note it's possible that the SVG frame doesn't have an SVG // transform but only has a CSS transform. - bool shouldRound = !(frame && frame->IsFrameOfType(nsIFrame::eSVG)); - + if (frame && frame->HasAnyStateBits(NS_FRAME_SVG_LAYOUT) && + !(frame->GetType() == nsGkAtoms::svgOuterSVGAnonChildFrame)) { + shouldRound = false; + } + /* Transformed frames always have a transform, or are preserving 3d (and might still have perspective!) */ if (aProperties.mTransformList) { result = nsStyleTransformMatrix::ReadTransforms(aProperties.mTransformList->mHead, -- cgit v1.2.3