Bug 21555

Summary: [CAIRO][QT] Canvas transformations applied twice to Patterns
Product: WebKit Reporter: Dirk Schulze <krit>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal Keywords: Cairo, Qt
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Pattern with transform
none
Pattern transformation
none
Pattern transform
oliver: review+
LayoutTest for pattern transformations oliver: review+

Description Dirk Schulze 2008-10-12 10:54:05 PDT
If you have a transformation ctx.transform(2,0,0,2,0,0); before a creation of a pattern, the transformation is applied twice to the pattern, but with a normal bahavior to paths.
Comment 1 Dirk Schulze 2008-10-12 11:07:45 PDT
Created attachment 24303 [details]
Pattern with transform

A TestCase. You should see skewed yellow and blue boxes, not just a blue rect.
Comment 2 Dirk Schulze 2008-10-12 12:01:18 PDT
Created attachment 24305 [details]
Pattern transformation

Patterns don't need extra transformations, since the context is transformed itself.
Comment 3 Oliver Hunt 2008-10-12 23:35:19 PDT
My testing on the nightly shows the same behaviour in the current nightly, firefox, opera
Comment 4 Dirk Schulze 2008-10-13 11:12:24 PDT
It does appear on Qt and Cairo. Renamed the title.
Comment 5 Dirk Schulze 2008-10-13 11:50:04 PDT
Created attachment 24319 [details]
Pattern transform

Give a identity matrix to pattern for qt and cairo. This solves the double transformation of patterns on Qt and Cairo. I'm not absolutly sure about this. I believe it is because the context is transformed already. So you don't need to transform the pattern again.
Comment 6 Oliver Hunt 2008-10-14 23:11:06 PDT
Comment on attachment 24319 [details]
Pattern transform

I'm clearing the review flag so no one goes and lands this :D

Basically this looks correct and per Dirk results in Gtk and Qt being correct (Cg is already correct) -- but as I said on IRC dumpAsText layout tests == win :D
Comment 7 Dirk Schulze 2008-10-14 23:51:30 PDT
Created attachment 24353 [details]
LayoutTest for pattern transformations

Added a LayoutTest.
Comment 8 Oliver Hunt 2008-10-15 00:13:46 PDT
Comment on attachment 24319 [details]
Pattern transform

This seems to make sense to me -- but i'm not a gtk/qt type person, however assuming behaviour matches firefox/opera now r=me
Comment 9 Dirk Schulze 2008-11-11 08:26:36 PST
landed in r38299.