https://bugs.webkit.org/show_bug.cgi?id=69261
Source/WebCore:
Reviewed by Rob Buis.
Scale the SVG pattern tile by the scale level of patternTransform to avoid pixelation.
Test: svg/custom/pattern-scaled-pattern-space.svg
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::applyResource):
LayoutTests:
Reviewed by Rob Buis.
Add a new test to check that SVG pattern tiles are not pixelated on
scaling with patternTransform.
Updated two more pixel tests. Both changes are progressions.
* platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png:
* platform/mac/svg/custom/non-scaling-stroke-expected.png:
* svg/custom/pattern-scaled-pattern-space-expected.png: Added.
* svg/custom/pattern-scaled-pattern-space-expected.txt: Added.
* svg/custom/pattern-scaled-pattern-space.svg: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96530
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-10-03 Dirk Schulze <krit@webkit.org>
+
+ SVG Pattern tile pixelated on patternTransform
+ https://bugs.webkit.org/show_bug.cgi?id=69261
+
+ Reviewed by Rob Buis.
+
+ Add a new test to check that SVG pattern tiles are not pixelated on
+ scaling with patternTransform.
+ Updated two more pixel tests. Both changes are progressions.
+
+ * platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png:
+ * platform/mac/svg/custom/non-scaling-stroke-expected.png:
+ * svg/custom/pattern-scaled-pattern-space-expected.png: Added.
+ * svg/custom/pattern-scaled-pattern-space-expected.txt: Added.
+ * svg/custom/pattern-scaled-pattern-space.svg: Added.
+
2011-10-03 Adam Barth <abarth@webkit.org>
Another round of updates after http://trac.webkit.org/changeset/96509.
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderSVGRoot {svg} at (0,0) size 200x200
+ RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+ RenderSVGResourcePattern {pattern} [id="pattern"] [patternUnits=userSpaceOnUse] [patternContentUnits=userSpaceOnUse] [patternTransform={m=((40.00,0.00)(0.00,40.00)) t=(0.00,0.00)}]
+ RenderSVGPath {circle} at (0,0) size 5x5 [fill={[type=SOLID] [color=#00FF00]}] [cx=2.50] [cy=2.50] [r=2.50]
+ RenderSVGPath {rect} at (0,0) size 200x200 [fill={[type=PATTERN] [id="pattern"]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
--- /dev/null
+<svg xmlns="http://www.w3.org/2000/svg">
+<defs>
+<pattern id="pattern" width="5" height="5" patternUnits="userSpaceOnUse" patternTransform="scale(40)">
+ <circle cx="2.5" cy="2.5" r="2.5" fill="lime" />
+</pattern>
+</defs>
+<rect width="200" height="200" fill="url(#pattern)"/>
+</svg>
+2011-10-03 Dirk Schulze <krit@webkit.org>
+
+ SVG Pattern tile pixelated on patternTransform
+ https://bugs.webkit.org/show_bug.cgi?id=69261
+
+ Reviewed by Rob Buis.
+
+ Scale the SVG pattern tile by the scale level of patternTransform to avoid pixelation.
+
+ Test: svg/custom/pattern-scaled-pattern-space.svg
+
+ * rendering/svg/RenderSVGResourcePattern.cpp:
+ (WebCore::RenderSVGResourcePattern::applyResource):
+
2011-10-03 Jer Noble <jer.noble@apple.com>
Enable WEB_AUDIO by default in the WebKit/mac port.
FloatRect absoluteTileBoundaries = absoluteTransformIgnoringRotation.mapRect(tileBoundaries);
FloatRect clampedAbsoluteTileBoundaries;
+ // Scale the tile size to match the scale level of the patternTransform.
+ absoluteTileBoundaries.scale(m_attributes.patternTransform().xScale(), m_attributes.patternTransform().yScale());
+
// Build tile image.
OwnPtr<ImageBuffer> tileImage = createTileImage(m_attributes, tileBoundaries, absoluteTileBoundaries, tileImageTransform, clampedAbsoluteTileBoundaries);
if (!tileImage)