Bug 166750 - Zooming factor is not respected when displaying an non inline SVG with a <mask> element
Summary: Zooming factor is not respected when displaying an non inline SVG with a <mas...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-05 18:20 PST by Said Abou-Hallawa
Modified: 2018-11-10 06:37 PST (History)
6 users (show)

See Also:


Attachments
mask (234 bytes, image/svg+xml)
2017-01-05 18:20 PST, Said Abou-Hallawa
no flags Details
test case (839 bytes, text/html)
2017-01-05 18:21 PST, Said Abou-Hallawa
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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]
mask
Comment 2 Said Abou-Hallawa 2017-01-05 18:21:52 PST
Created attachment 298162 [details]
test case