Bug 4463

Summary: SVG transparency applied twice
Product: WebKit Reporter: Tobias Lidskog <tobiaslidskog>
Component: SVGAssignee: Tobias Lidskog <tobiaslidskog>
Status: RESOLVED FIXED    
Severity: Major    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
fix opacity handling
eric: review+
before patch
none
after patch
none
reference png none

Tobias Lidskog
Reported 2005-08-16 17:49:40 PDT
Opacity values on groups gets applied twice while drawing (as seen in the masking-opacity-01-b.svg test). In KRenderingPaintServerSolidQuartz::draw CGContextSetAlpha() is called in applyStyleToContext(), after that the same alpha is used in CGColorCreateCopyWithAlpha().
Attachments
fix opacity handling (3.49 KB, patch)
2005-08-17 16:12 PDT, Tobias Lidskog
eric: review+
before patch (4.03 KB, image/png)
2005-08-17 16:13 PDT, Tobias Lidskog
no flags
after patch (4.01 KB, image/png)
2005-08-17 16:14 PDT, Tobias Lidskog
no flags
reference png (27.21 KB, image/png)
2005-08-17 16:14 PDT, Tobias Lidskog
no flags
Tobias Lidskog
Comment 1 2005-08-16 17:50:37 PDT
I'll try and come up with a good solution to this.
Tobias Lidskog
Comment 2 2005-08-17 16:12:15 PDT
Created attachment 3444 [details] fix opacity handling Group opacity was being applied twice for fills and strokes. Also remove opacity() method on KRenderingPaintServerSolid that wasn't useful. Colors in svg are always rgb only, opacity is specified separately.
Tobias Lidskog
Comment 3 2005-08-17 16:13:34 PDT
Created attachment 3445 [details] before patch rendering of masking-opacity-01-b before patch
Tobias Lidskog
Comment 4 2005-08-17 16:14:08 PDT
Created attachment 3446 [details] after patch rendering of masking-opacity-01-b after patch
Tobias Lidskog
Comment 5 2005-08-17 16:14:40 PDT
Created attachment 3447 [details] reference png reference rendering from w3c
Eric Seidel (no email)
Comment 6 2005-08-22 02:32:41 PDT
Comment on attachment 3444 [details] fix opacity handling Looks good.
Note You need to log in before you can comment on or make changes to this bug.