Bug 14240

Summary: Opacity affects clipping of circles
Product: WebKit Reporter: Jean-Pierre Fiset <bugzilla>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: ahayes, bugzilla, jeffschiller, rubys, rwlbuis, simon.fraser
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Test Case
none
First attempt mjs: review-

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.