Bug 21555 - [CAIRO][QT] Canvas transformations applied twice to Patterns
Summary: [CAIRO][QT] Canvas transformations applied twice to Patterns
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
Keywords: Cairo, Qt
Depends on:
Reported: 2008-10-12 10:54 PDT by Dirk Schulze
Modified: 2008-11-11 08:26 PST (History)
0 users

See Also:

Pattern with transform (890 bytes, text/html)
2008-10-12 11:07 PDT, Dirk Schulze
no flags Details
Pattern transformation (9.03 KB, patch)
2008-10-12 12:01 PDT, Dirk Schulze
no flags Details | Formatted Diff | Diff
Pattern transform (6.81 KB, patch)
2008-10-13 11:50 PDT, Dirk Schulze
oliver: review+
Details | Formatted Diff | Diff
LayoutTest for pattern transformations (3.62 KB, patch)
2008-10-14 23:51 PDT, Dirk Schulze
oliver: review+
Details | Formatted Diff | Diff

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