Bug 76482 - [CG] Rasterized scaling of transformed SVG shapes with gradient fill and -webkit-svg-shadow applied
Summary: [CG] Rasterized scaling of transformed SVG shapes with gradient fill and -web...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-01-17 15:04 PST by Tim Horton
Modified: 2012-01-18 10:50 PST (History)
5 users (show)

See Also:


Attachments
repro (940 bytes, image/svg+xml)
2012-01-17 15:04 PST, Tim Horton
no flags Details
patch (111.07 KB, patch)
2012-01-17 15:38 PST, Tim Horton
no flags Details | Formatted Diff | Diff
patch v.2 (110.43 KB, patch)
2012-01-17 16:41 PST, Tim Horton
simon.fraser: review+
simon.fraser: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2012-01-17 15:04:19 PST
The attached repro case demonstrates that applying a scale() transform to an SVG shape that has both gradient fill and the CSS -webkit-svg-shadow property applied will result in rasterized scaling of the shape.

<rdar://problem/10415483>

I have a patch.
Comment 1 Tim Horton 2012-01-17 15:04:48 PST
Created attachment 122820 [details]
repro
Comment 2 Tim Horton 2012-01-17 15:38:05 PST
Created attachment 122825 [details]
patch
Comment 3 Tim Horton 2012-01-17 16:12:53 PST
I just found an issue with zooming and ::strokeRect, so clearing review for now.
Comment 4 Tim Horton 2012-01-17 16:41:59 PST
Created attachment 122838 [details]
patch v.2
Comment 5 Simon Fraser (smfr) 2012-01-17 19:28:08 PST
Comment on attachment 122838 [details]
patch v.2

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

> Source/WebCore/platform/graphics/transforms/AffineTransform.cpp:257
> +    double width2, height2;
> +    width2 = size.width() * xScale();
> +    height2 = size.height() * yScale();

Just do:

double width2 = 
double height2 = 

Why the '2'?

> Source/WebCore/platform/graphics/transforms/AffineTransform.cpp:266
> +    double width2, height2;
> +    width2 = size.width() * xScale();
> +    height2 = size.height() * yScale();

Ditto.
Comment 6 WebKit Review Bot 2012-01-17 19:28:25 PST
Comment on attachment 122838 [details]
patch v.2

Attachment 122838 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11283028

New failing tests:
svg/custom/transform-with-shadow-and-gradient.svg
Comment 7 Tim Horton 2012-01-18 10:50:44 PST
Landed as http://trac.webkit.org/changeset/105296 with half of Simon's changes (I used the "2" suffix to fit in with that function's siblings).