Bug 75741 - [cg] userSpaceOnUse SVG Patterns have the wrong origin
Summary: [cg] userSpaceOnUse SVG Patterns have the wrong origin
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-06 14:05 PST by Tim Horton
Modified: 2012-01-06 16:30 PST (History)
4 users (show)

See Also:


Attachments
repro (5.14 KB, application/xhtml+xml)
2012-01-06 14:05 PST, Tim Horton
no flags Details
patch (11.94 KB, patch)
2012-01-06 14:14 PST, Tim Horton
no flags Details | Formatted Diff | Diff
patch with image result (25.57 KB, patch)
2012-01-06 14:41 PST, Tim Horton
simon.fraser: review+
webkit.review.bot: 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-06 14:05:44 PST
Created attachment 121491 [details]
repro

Patterns use the wrong transformation to user space, leading to the origin being in the bottom left instead of top left. Note that the patterns in the attached test case are a) upside-down and b) move when you resize the window. See expected behavior in Firefox or Opera.

I have a patch.

<rdar://problem/9383222>
Comment 1 Tim Horton 2012-01-06 14:14:28 PST
Created attachment 121494 [details]
patch
Comment 2 Simon Fraser (smfr) 2012-01-06 14:17:41 PST
Comment on attachment 121494 [details]
patch

Are applyStrokePattern() and applyFillPattern() used by canvas and CSS rendering? How does this affect those?
Comment 3 Tim Horton 2012-01-06 14:25:53 PST
(In reply to comment #2)
> (From update of attachment 121494 [details])
> Are applyStrokePattern() and applyFillPattern() used by canvas and CSS rendering? How does this affect those?

Just Canvas and SVG, as far as I can tell. What in CSS would use them?

In terms of Canvas, all the tests pass, and I manually tried out some of hixie's pattern examples and they all seem to pass too.
Comment 4 Tim Horton 2012-01-06 14:41:30 PST
Created attachment 121500 [details]
patch with image result
Comment 5 WebKit Review Bot 2012-01-06 16:17:38 PST
Comment on attachment 121500 [details]
patch with image result

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

New failing tests:
svg/custom/pattern-userSpaceOnUse-userToBaseTransform.xhtml
Comment 6 Tim Horton 2012-01-06 16:30:08 PST
Landed in http://trac.webkit.org/changeset/104356