Bug 4463 - SVG transparency applied twice
Summary: SVG transparency applied twice
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Major
Assignee: Tobias Lidskog
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-16 17:49 PDT by Tobias Lidskog
Modified: 2005-08-22 03:42 PDT (History)
0 users

See Also:


Attachments
fix opacity handling (3.49 KB, patch)
2005-08-17 16:12 PDT, Tobias Lidskog
eric: review+
Details | Formatted Diff | Diff
before patch (4.03 KB, image/png)
2005-08-17 16:13 PDT, Tobias Lidskog
no flags Details
after patch (4.01 KB, image/png)
2005-08-17 16:14 PDT, Tobias Lidskog
no flags Details
reference png (27.21 KB, image/png)
2005-08-17 16:14 PDT, Tobias Lidskog
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Lidskog 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().
Comment 1 Tobias Lidskog 2005-08-16 17:50:37 PDT
I'll try and come up with a good solution to this.
Comment 2 Tobias Lidskog 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.
Comment 3 Tobias Lidskog 2005-08-17 16:13:34 PDT
Created attachment 3445 [details]
before patch

rendering of masking-opacity-01-b before patch
Comment 4 Tobias Lidskog 2005-08-17 16:14:08 PDT
Created attachment 3446 [details]
after patch

rendering of masking-opacity-01-b after patch
Comment 5 Tobias Lidskog 2005-08-17 16:14:40 PDT
Created attachment 3447 [details]
reference png

reference rendering from w3c
Comment 6 Eric Seidel (no email) 2005-08-22 02:32:41 PDT
Comment on attachment 3444 [details]
fix opacity handling

Looks good.