From c2b844077e719355214dcf7f1ab90f811cfac99c Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 14 Aug 2019 15:09:34 +0200 Subject: [PATCH] Issue #438: Check for non-rectilinear transforms --- layout/svg/nsSVGOuterSVGFrame.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layout/svg/nsSVGOuterSVGFrame.cpp b/layout/svg/nsSVGOuterSVGFrame.cpp index e1b97bb40b..434676010d 100644 --- a/layout/svg/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/nsSVGOuterSVGFrame.cpp @@ -1006,6 +1006,9 @@ nsSVGOuterSVGAnonChildFrame::IsSVGTransformed(Matrix* aOwnTransform, if (ownMatrix.HasNonTranslation()) { // Note: viewBox, currentScale and currentTranslate should only // produce a rectilinear transform. + MOZ_ASSERT(ownMatrix.IsRectilinear(), + "Non-rectilinear transform will break the following logic"); + // The nsDisplayTransform code will apply this transform to our frame, // including to our frame position. We don't want our frame position to // be scaled though, so we need to correct for that in the transform.