diff --git a/layout/svg/base/src/nsSVGPatternFrame.cpp b/layout/svg/base/src/nsSVGPatternFrame.cpp index 7e1be50a7611..1eb4d0c846ef 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.cpp +++ b/layout/svg/base/src/nsSVGPatternFrame.cpp @@ -580,14 +580,10 @@ nsSVGPatternFrame::ConstructCTM(const gfxRect &callerBBox, tCTM.Scale(scale, scale); } - const nsSVGViewBox& viewBox = GetViewBox(); - if (!viewBox.IsValid()) { - return tCTM; - } - const nsSVGViewBoxRect viewBoxRect = GetViewBox().GetAnimValue(); + const nsSVGViewBoxRect viewBox = GetViewBox().GetAnimValue(); - if (viewBoxRect.height <= 0.0f || viewBoxRect.width <= 0.0f) { - return gfxMatrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); // singular + if (viewBox.height <= 0.0f || viewBox.width <= 0.0f) { + return tCTM; } float viewportWidth, viewportHeight; @@ -606,16 +602,11 @@ nsSVGPatternFrame::ConstructCTM(const gfxRect &callerBBox, viewportHeight = GetLengthValue(nsSVGPatternElement::HEIGHT)->GetAnimValue(aTarget); } - - if (viewportWidth <= 0.0f || viewportHeight <= 0.0f) { - return gfxMatrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); // singular - } - gfxMatrix tm = nsSVGUtils::GetViewBoxTransform( static_cast(mContent), viewportWidth, viewportHeight, - viewBoxRect.x, viewBoxRect.y, - viewBoxRect.width, viewBoxRect.height, + viewBox.x, viewBox.y, + viewBox.width, viewBox.height, GetPreserveAspectRatio()); return tm * tCTM; diff --git a/layout/svg/crashtests/740627-1.svg b/layout/svg/crashtests/740627-1.svg deleted file mode 100644 index b74fcd2ddd7a..000000000000 --- a/layout/svg/crashtests/740627-1.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/layout/svg/crashtests/740627-2.svg b/layout/svg/crashtests/740627-2.svg deleted file mode 100644 index 6241ddaae574..000000000000 --- a/layout/svg/crashtests/740627-2.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/layout/svg/crashtests/crashtests.list b/layout/svg/crashtests/crashtests.list index bbe473014cc1..467879c3006a 100644 --- a/layout/svg/crashtests/crashtests.list +++ b/layout/svg/crashtests/crashtests.list @@ -125,5 +125,3 @@ load 713413-1.svg load 722003-1.svg load 725918-1.svg load 732836-1.svg -load 740627-1.svg -load 740627-2.svg