Created attachment 169693 [details] "Wobbly" pattern scaling SVG patterns do not scale smoothly with arbitrary factors. Certain values cause the pattern to shift around visibly. Chromium issue: http://code.google.com/p/chromium/issues/detail?id=125638
And repaint issues as well.
(In reply to comment #1) > And repaint issues as well. Yes, that too. I'd like to handle that as a separate bug though.
Created attachment 169704 [details] Patch
Comment on attachment 169704 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=169704&action=review > Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp:131 > + patternData->transform.scale(tileBoundaries.width() / tileImageSize.width(), tileBoundaries.height() / tileImageSize.height()); I can't really tell if that is fully correct, even if it looks sane. I would like to have an easy example where you can see the wrong scaling behavior (sth. with red wrong, just green correct).
(In reply to comment #4) > (From update of attachment 169704 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=169704&action=review > > > Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp:131 > > + patternData->transform.scale(tileBoundaries.width() / tileImageSize.width(), tileBoundaries.height() / tileImageSize.height()); > > I can't really tell if that is fully correct, even if it looks sane. I would like to have an easy example where you can see the wrong scaling behavior (sth. with red wrong, just green correct). I tried making it a reftest initially, but there are subtle subpixel differences and couldn't make it work. Since this deals with pattern tile alignment, I can't really think of a way to make it turn red when misaligned... do you have any ideas? But if you open the added test in an unpatched build you can notice that the pattern doesn't align on the right side for all scales as it is supposed to (the shape size is a multiple of the pattern size). The pixel results capture this, and I guess I could add a comment explaining how it should look.
Can you add a pixel test then?
(In reply to comment #6) > Can you add a pixel test then? There is this one I was talking about added in the patch: svg/custom/pattern-scaling.svg (green/yellow squares pattern that should align on all rect edges) I only have Chromium/Linux results for it, but will add the rest as they become available. Do you think we need some more?
Comment on attachment 169704 [details] Patch I missed the new test, sorry. Looks fine for me.
Comment on attachment 169704 [details] Patch Clearing flags on attachment: 169704 Committed r131974: <http://trac.webkit.org/changeset/131974>
All reviewed patches have been landed. Closing bug.