Bug 54507

Summary: WebKit regression found in Cairo commit 51594d9
Product: cairo Reporter: Sudarsana Nagineni <sudarsana.nagineni>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED NOTOURBUG QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: blocker    
Priority: medium CC: dominik.rottsches
Version: 1.12.2   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Test failure diff
Test results with the failure
Simplified test case
cairo-trace of the test case

Description Sudarsana Nagineni 2012-09-04 19:28:42 UTC
Created attachment 66625 [details]
Test failure diff

Running latest WebKit GTK/EFL (r127473) against cairo git revision 51594d9 causes a regression when running the following webkit test to ensure correct behavior of canvas with fillRect using a gradient fillStyle and a shadow.

Test case: http://trac.webkit.org/export/127473/trunk/LayoutTests/fast/canvas/canvas-fillRect-gradient-shadow.html

I suspect that cairo matrix to pixman transform/offset conversion in _cairo_matrix_to_pixman_matrix_offset() causes this regression.

The test results with the failure can be seen in the attachments.
Comment 1 Sudarsana Nagineni 2012-09-04 19:34:44 UTC
Created attachment 66627 [details]
Test results with the failure
Comment 2 Chris Wilson 2012-09-04 19:36:02 UTC
Test case works under firefox... Is there any chance you can simplify it to the single failure to make extraction into C easier?
Comment 3 Sudarsana Nagineni 2012-09-04 20:16:44 UTC
Created attachment 66630 [details]
Simplified test case

Thanks for the quick look, Chris. I modified the test case to reproduce only the actual failure.
Comment 4 Chris Wilson 2012-09-24 08:11:10 UTC
The test case wasn't as simple as I was hoping for. :)

Can you run the test case locally whilst capturing the cairo calls:

  cairo-trace eflwebkit test.html

you might want to add some obvious fluff calls around the canvas to make the interesting section more clear.
Comment 5 Chris Wilson 2012-09-24 19:27:01 UTC
Created attachment 67642 [details]
cairo-trace of the test case

Having extracted the test case and saved the output to a file, the value of pixel (351, 751) is 0x00ff0000 (that is 100% red, 0% alpha). Yet the test case is reporting 0 red.

Can you enlighten me as to what magic 'ctx.getImageData(351, 751, 1, 1).data' performs?
Comment 6 Chris Wilson 2012-09-25 10:42:16 UTC
ShadowBlur::blurLayerImage() is broken for starters.
Comment 7 Sudarsana Nagineni 2012-09-26 09:45:30 UTC
Thanks, Chris. I will look into the shadowBlur and blur radius handling code in webkit.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.