Bug 14240 - Opacity affects clipping of circles
Summary: Opacity affects clipping of circles
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-20 11:59 PDT by Jean-Pierre Fiset
Modified: 2009-07-07 23:06 PDT (History)
6 users (show)

See Also:


Attachments
Test Case (1.35 KB, image/svg+xml)
2007-06-20 12:00 PDT, Jean-Pierre Fiset
no flags Details
First attempt (259.88 KB, patch)
2007-07-27 01:05 PDT, Rob Buis
mjs: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Pierre Fiset 2007-06-20 11:59:41 PDT
I have come across a peculiar problem where a circle is not rendered correctly due to its opacity. If the opacity of the circle is 1.0, then it is fully painted. If the circle is given fractional opacity, then part of the circle is clipped.

Other attributes that appear to trigger this unexpected behaviour is the radius of the circle, a fractional scaling factor and  the number of circles drawn.

I have come across this situation inadvertently and can not describe the situation better. I am submitting a test case along.
Comment 1 Jean-Pierre Fiset 2007-06-20 12:00:42 PDT
Created attachment 15141 [details]
Test Case
Comment 2 Rob Buis 2007-07-27 01:05:43 PDT
Created attachment 15698 [details]
First attempt

This should fix it, though it should be a temporary fix (until enclosingIntRect is fixed).
Cheers,

Rob.
Comment 3 mitz 2007-08-18 00:57:29 PDT
Comment on attachment 15698 [details]
First attempt

There are multiple uses of enclosingIntRect(const FloatRect&) in SVG code, so I am suspicious of a patch that targets just one of them. I think fixing enclosingIntRect would be much better.
Comment 4 Maciej Stachowiak 2007-08-19 12:50:24 PDT
I agree, enclosingIntRect should be fixed instead. The comment there claims there is no ceilf on win32 but that seems to be wrong as far as I can tell: <http://msdn2.microsoft.com/en-us/library/atdhw2dx(VS.80).aspx>. Even on platforms that legitimately lack ceilf it would be better to use ceil than to round.

r- to consider fix to enclosingIntRect instead.
Comment 5 Eric Seidel (no email) 2007-12-27 01:47:04 PST
Sad to see this patch rotting in bugzilla.  If all that's needed is a ceilf in enclosingIntRect, I would expect that would be easy to fix (and could be related to bug 16015 as well?)
Comment 6 Amos Hayes 2008-05-28 13:19:12 PDT
This is still a problem in

Safari Version 3.1.1 (5525.18)

Any updates?
Comment 7 Sam Ruby 2009-03-23 23:04:55 PDT
Suspiciously similar issue:

http://intertwingly.net/blog/2009/03/23/SVG-Interop

Related?
Comment 8 Simon Fraser (smfr) 2009-07-07 23:06:07 PDT
Seems to work fine in recent builds.