Index: Source/core/rendering/svg/RenderSVGRoot.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGRoot.cpp b/Source/core/rendering/svg/RenderSVGRoot.cpp |
index 0416eddc184087846a0976f48300cc2743b85db5..43495c65f464a288bd3716dfa2d0ae8731ed9257 100644 |
--- a/Source/core/rendering/svg/RenderSVGRoot.cpp |
+++ b/Source/core/rendering/svg/RenderSVGRoot.cpp |
@@ -337,9 +337,10 @@ void RenderSVGRoot::buildLocalToBorderBoxTransform() |
FloatPoint translate = svg->currentTranslate(); |
LayoutSize borderAndPadding(borderLeft() + paddingLeft(), borderTop() + paddingTop()); |
m_localToBorderBoxTransform = svg->viewBoxToViewTransform(contentWidth() / scale, contentHeight() / scale); |
- if (borderAndPadding.isEmpty() && scale == 1 && translate == FloatPoint::zero()) |
+ AffineTransform viewToBorderBoxTransform(scale, 0, 0, scale, borderAndPadding.width() + translate.x(), borderAndPadding.height() + translate.y()); |
+ if (viewToBorderBoxTransform.isIdentity()) |
return; |
- m_localToBorderBoxTransform = AffineTransform(scale, 0, 0, scale, borderAndPadding.width() + translate.x(), borderAndPadding.height() + translate.y()) * m_localToBorderBoxTransform; |
+ m_localToBorderBoxTransform = viewToBorderBoxTransform * m_localToBorderBoxTransform; |
} |
const AffineTransform& RenderSVGRoot::localToParentTransform() const |