SVG Pattern pixelated on inline SVG with CSS transforms
authorfmalita@chromium.org <fmalita@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 14:38:48 +0000 (14:38 +0000)
committerfmalita@chromium.org <fmalita@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2013 14:38:48 +0000 (14:38 +0000)
commite46f0d47d28f9e6ca4f89fef036db1ec150fad38
tree1054a3576877c8280c926d6e202abbbc4b27d172
parent524d719f12c47642d6b85f2a42ee534f2a49424c
SVG Pattern pixelated on inline SVG with CSS transforms
https://bugs.webkit.org/show_bug.cgi?id=111587

Reviewed by Dirk Schulze.

Source/WebCore:

When calculating the resolution for resource image buffers, we need to also consider CSS
transforms. This patch updates calculateTransformationToOutermostSVGCoordinateSystem()
(renamed to calculateTransformationToOutermostCoordinateSystem) to include the affine
component from CSS transforms by walking the parent layer tree.

Test: svg/custom/resources-css-scaled.html

* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceGradient.cpp:
(WebCore::createMaskAndSwapContextForTextGradient):
(WebCore::clipToTextMask):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
(WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
* rendering/svg/SVGRenderingContext.h:
(SVGRenderingContext):

LayoutTests:

* svg/custom/resources-css-scaled-expected.html: Added.
* svg/custom/resources-css-scaled.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/custom/resources-css-scaled-expected.html [new file with mode: 0644]
LayoutTests/svg/custom/resources-css-scaled.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp
Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
Source/WebCore/rendering/svg/SVGRenderingContext.cpp
Source/WebCore/rendering/svg/SVGRenderingContext.h