Created attachment 169697 [details] Leaves unpainted artifacts when shrinking When scaling (shrinking) SVG shapes dynamically, the old area is not always fully repainted.
Not limited to scaling, see http://code.google.com/p/chromium/issues/detail?id=156597
Created attachment 169909 [details] Updated test. The initial test only exhibits the issue for certain browser window sizes. Updated.
Also, this appears to be Chromium-only.
Created attachment 169917 [details] Screenshot of observed ghosting.
I tracked this down to accumulated rounding errors in SVGRenderRoot::paintReplaced() when using subpixel layout: IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset); childPaintInfo.applyTransform(AffineTransform::translation(adjustedPaintOffset.x() - x(), adjustedPaintOffset.y() - y()) * localToParentTransform()); The problem is we're rounding layout units both for adjustedPaintOffset and in localToParentTransform() and effectively adding the results => we're getting 2x the rounding delta. If the delta happens to be 1/2 pixles then we end up being off by one pixel, which skews the painting/repainting rects. We can either adjust by one in the special case of rounding delta == 0.5, or use localToBorderBoxTransform() to avoid getting the delta injected twice. I'll put a patch up shortly.
Created attachment 170422 [details] Patch
Not sure whether subpixel layout is used on other platforms besides Chromium - if it is we'll have to add new expectations to the patch.
Comment on attachment 170422 [details] Patch LGTM. Thank you.
(In reply to comment #7) > Not sure whether subpixel layout is used on other platforms besides Chromium - if it is we'll have to add new expectations to the patch. Not yet, no.
Comment on attachment 170422 [details] Patch Clearing flags on attachment: 170422 Committed r132377: <http://trac.webkit.org/changeset/132377>
All reviewed patches have been landed. Closing bug.
Committed r132477: <http://trac.webkit.org/changeset/132477>