Bug 56432

Summary: WebKit regression observed in Cairo commit 99593538a9d054aa1bb9fa620f
Product: cairo Reporter: Dominik Röttsches (drott) <dominik.rottsches>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium CC: sudarsana.nagineni
Version: 1.12.4   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Correct rendering for the first test case
Regression rendering for this test case
Cairoscript trace file to reproduce
Simpler test case, dashed black (correct)
Dashed black, incorrect
Dashed black, tracefile

Description Dominik Röttsches (drott) 2012-10-26 15:55:02 UTC
Two ietestcenter cases in WebKit that play with dashing patterns start failing after b66065537cec5 " stroke: Compute bounds for fallback stroker (typically dashing)":

https://bugs.webkit.org/show_bug.cgi?id=99189

ietestcenter/css3/bordersbackgrounds/border-radius-style-001.htm
ietestcenter/css3/bordersbackgrounds/border-radius-style-002.htm
Comment 1 Dominik Röttsches (drott) 2012-10-29 13:13:14 UTC
Actually, one commit earlier: 99593538a9d054aa1bb9fa620f.
Comment 2 Dominik Röttsches (drott) 2012-10-29 13:23:29 UTC
Created attachment 69225 [details]
Correct rendering for the first test case
Comment 3 Dominik Röttsches (drott) 2012-10-29 13:24:31 UTC
Created attachment 69226 [details]
Regression rendering for this test case

Observe how the dashed line has rounded little extra pieces everywhere.
Comment 4 Dominik Röttsches (drott) 2012-10-29 14:41:31 UTC
Created attachment 69232 [details]
Cairoscript trace file to reproduce

Using this same trace file for both cases, the correct image is generated before the offending commit, the regressed image is generated afterwards.
Comment 5 Dominik Röttsches (drott) 2012-10-29 15:10:46 UTC
Created attachment 69234 [details]
Simpler test case, dashed black (correct)
Comment 6 Dominik Röttsches (drott) 2012-10-29 15:11:08 UTC
Created attachment 69235 [details]
Dashed black, incorrect
Comment 7 Dominik Röttsches (drott) 2012-10-29 15:11:30 UTC
Created attachment 69236 [details]
Dashed black, tracefile
Comment 8 Chris Wilson 2012-10-30 15:21:15 UTC
Thanks for the trace, much easier than tracking down border-radius-style-001.htm. :)

So "git revert 99593538a9d054aa1bb9fa620f" fixes things for me, which indeed is odd as we shouldn't be applying CAIRO_LINE_CAP_ROUND at all...
Comment 9 Chris Wilson 2012-10-30 15:29:18 UTC
It's not the capping, but the joins around the curve...
Comment 10 Dominik Röttsches (drott) 2012-10-30 15:47:48 UTC
(In reply to comment #9)
> It's not the capping, but the joins around the curve...

I tried sprinkling fixed joins in webKit's cairo backend, that didn't seem to help (or i missed a few places).
Comment 11 Chris Wilson 2012-10-30 15:50:34 UTC
This form of the stroker uses implicit ROUND joins along the splines. It just answers the mystery of how we end up generate fans but not the root cause.
Comment 12 Chris Wilson 2012-10-31 09:34:07 UTC
commit d7f5a1bec421d6c7b92d16daae681fa31ac7c212
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Oct 31 09:27:52 2012 +0000

    pen: First check whether the in/out edges lie within the single pen vertex
    
    In order to prevent underflow when searching for the closing pen vertex,
    we first need to be sure that it does not simply lie next to the opening
    pen vertex. As a result we were missing many cases that should have been
    a bevel (in == out) and generating almost complete round caps instead.
    
    Reported-by: Dominik Röttsches <dominik.rottsches@intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56432
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

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.