Bug 166750

Summary: Zooming factor is not respected when displaying an non inline SVG with a <mask> element
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: jespertheend, kaelig, sabouhallawa, simon.fraser, thaddee.tyl, zimmermann
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=135616
Description Flags
test case none

Description Said Abou-Hallawa 2017-01-05 18:20:36 PST
Open the attached test case. It contains three identical SVGs. The first one is a data uri referenced from an <img> element. The second is an external SVG referenced from another <img> element. The third one is an inline SVG.

The non-inline SVG images are not drawn correctly. The reason is the SVG includes a <mask> element which creates an ImageBuffer for applying the mask. For the non-inline case, SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem() returns an identity transform because RenderSVGRoot::localToParentTransform() does not return the zooming factor of the HTMLDocument since its document is an SVGDocument. Also deviceScaleFactor returns 1 in this case on Retina devices.
Comment 1 Said Abou-Hallawa 2017-01-05 18:20:56 PST
Created attachment 298161 [details]
Comment 2 Said Abou-Hallawa 2017-01-05 18:21:52 PST
Created attachment 298162 [details]
test case