Bug 125836 - [SVG] Fix CSS transform handling when zoomed
Summary: [SVG] Fix CSS transform handling when zoomed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks:
 
Reported: 2013-12-16 22:18 PST by Ryosuke Niwa
Modified: 2024-07-22 21:08 PDT (History)
14 users (show)

See Also:


Attachments
Patch (5.11 KB, patch)
2014-04-08 12:23 PDT, Adenilson Cavalcanti Silva
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.