Bug 75741

Summary: [cg] userSpaceOnUse SVG Patterns have the wrong origin
Product: WebKit Reporter: Tim Horton <thorton>
Component: SVGAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, simon.fraser, webkit.review.bot, zimmermann
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
repro
none
patch
none
patch with image result simon.fraser: review+, webkit.review.bot: commit-queue-

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