[Webkit-unassigned] [Bug 159340] Drawing an <img> with an SVG source into a <canvas> has incorrect rendering if the SVG viewBox does not match the <img> metrics

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 1 03:07:46 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=159340

--- Comment #4 from Antoine Quint <graouts at webkit.org> ---
The size of the container for the SVGImage is coming from this line in CanvasRenderingContext2D::drawImage(HTMLImageElement&, const FloatRect&, const FloatRect&, const CompositeOperator&, const BlendMode&, ExceptionCode&):

    FloatRect imageRect = FloatRect(FloatPoint(), size(imageElement, ImageSizeBeforeDevicePixelRatio));

In the WK1 case, when SVGImageCache::imageSizeForRenderer() is eventually called, it finds an `image` which has clearly already been laid out and has a 100x100 size, which is used to size the container.

In the WK2 case, SVGImageCache::imageSizeForRenderer() does not find an image and returns the intrinsic size instead, which is 200x200.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160701/ec692585/attachment.html>


More information about the webkit-unassigned mailing list