Bug 125836

Summary: [SVG] Fix CSS transform handling when zoomed
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, dino, d-r, fmalita, gyuyoung.kim, krit, pdr, savagobr, schenney, sergio, simon.fraser, thorton, zimmermann
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Ryosuke Niwa 2013-12-16 22:18:05 PST
Consider merging https://chromium.googlesource.com/chromium/blink/+/12e43b6d16005ed322d97e77e2ec72b0b9d40f9a

CSS takes the page zoom factor into account for all computed length
values, including transform translation components.

OTOH, SVG applies the zoom factor globally (at the SVG root level) -
so when using CSS transforms in SVG, the translation components are
scaled twice.

This CL adjusts CSS transforms when used in SVG to account for
the unexpected translation scale.
Comment 1 Adenilson Cavalcanti Silva 2014-04-08 12:23:54 PDT
Created attachment 228868 [details]
Patch
Comment 2 Tim Horton 2014-04-08 14:28:19 PDT
Comment on attachment 228868 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228868&action=review

> Source/WebCore/svg/SVGGraphicsElement.cpp:80
> +        float zoom = style->effectiveZoom();

does this take page scale into account? page zoom? which ones are baked into the CSS transform values?
Comment 3 WebKit Commit Bot 2014-04-08 15:28:04 PDT
Comment on attachment 228868 [details]
Patch

Clearing flags on attachment: 228868

Committed r166967: <http://trac.webkit.org/changeset/166967>
Comment 4 WebKit Commit Bot 2014-04-08 15:28:10 PDT
All reviewed patches have been landed.  Closing bug.