Closed
Bug 441780
Opened 17 years ago
Closed 17 years ago
SVG radialGradient won't be rendered correct when focus point is moved (outside the radius)
Categories
(Core :: SVG, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.9.1b3
People
(Reporter: paroga, Assigned: longsonr)
References
Details
(Keywords: regression, testcase, verified1.9.1)
Attachments
(5 files, 1 obsolete file)
|
1.65 KB,
image/svg+xml
|
Details | |
|
37.14 KB,
image/png
|
Details | |
|
19.61 KB,
image/png
|
Details | |
|
1.55 KB,
patch
|
roc
:
superreview+
|
Details | Diff | Splinter Review |
|
4.08 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9) Gecko/2008052906 Firefox/3.0
Try the SVG.
Reproducible: Always
Steps to Reproduce:
Try the following SVG:
<svg xmlns="http://www.w3.org/2000/svg">
<defs>
<radialGradient id="gradient1" fx="0">
<stop offset="0" style="stop-color:#FF0000;stop-opacity:1" />
<stop offset="1" style="stop-color:#00FF00;stop-opacity:1" />
</radialGradient>
<radialGradient id="gradient2" r="0.4" fx="0.1">
<stop offset="0" style="stop-color:#FF0000;stop-opacity:1" />
<stop offset="1" style="stop-color:#00FF00;stop-opacity:1" />
</radialGradient>
<radialGradient id="gradient3" r="0.4" fx="0.2">
<stop offset="0" style="stop-color:#FF0000;stop-opacity:1" />
<stop offset="1" style="stop-color:#00FF00;stop-opacity:1" />
</radialGradient>
<radialGradient id="gradient4" fx="1">
<stop offset="0" style="stop-color:#FF0000;stop-opacity:1" />
<stop offset="1" style="stop-color:#00FF00;stop-opacity:1" />
</radialGradient>
<radialGradient id="gradient5" r="0.7" fx="1.3">
<stop offset="0" style="stop-color:#FF0000;stop-opacity:1" />
<stop offset="1" style="stop-color:#00FF00;stop-opacity:1" />
</radialGradient>
<radialGradient id="gradient6" r="0.6" fx="1.3">
<stop offset="0" style="stop-color:#FF0000;stop-opacity:1" />
<stop offset="1" style="stop-color:#00FF00;stop-opacity:1" />
</radialGradient>
</defs>
<circle cx="100" cy="100" r="50" style="fill:url(#gradient1);" />
<circle cx="100" cy="200" r="50" style="fill:url(#gradient2);" />
<circle cx="100" cy="300" r="50" style="fill:url(#gradient3);" />
<circle cx="200" cy="100" r="50" style="fill:url(#gradient4);" />
<circle cx="200" cy="200" r="50" style="fill:url(#gradient5);" />
<circle cx="200" cy="300" r="50" style="fill:url(#gradient6);" />
</svg>
Actual Results:
Some gradients are handled incorrect.
In Firefox 2 the gradients rendered correctly.
| Assignee | ||
Comment 1•17 years ago
|
||
Can you add the SVG as an attachment please? Also a screenshot of what you expect it to look like would be nice.
Component: General → SVG
Product: Firefox → Core
QA Contact: general → general
| Reporter | ||
Comment 2•17 years ago
|
||
| Reporter | ||
Comment 3•17 years ago
|
||
| Reporter | ||
Comment 4•17 years ago
|
||
Updated•17 years ago
|
| Assignee | ||
Comment 5•17 years ago
|
||
A regression range would help.
Comment 6•17 years ago
|
||
Regression range is
http://bonsai.mozilla.org/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=1191970380&maxdate=1191971339
with only Bug 384681 in it.
Blocks: 384681
Version: unspecified → Trunk
Comment 7•17 years ago
|
||
CC'ing Vlad on this regression from the 16.16 work.
| Assignee | ||
Comment 8•17 years ago
|
||
| Assignee | ||
Comment 9•17 years ago
|
||
Comment on attachment 352940 [details] [diff] [review]
patch
The key thing is that .99 < 127/128 which is the limit of 24.8 resolution.
Attachment #352940 -
Flags: review?(jwatt)
| Assignee | ||
Updated•17 years ago
|
Assignee: nobody → longsonr
Comment 11•17 years ago
|
||
Comment on attachment 352940 [details] [diff] [review]
patch
Nice! r=jwatt. Can you also note this in the comment? Perhaps append the following:
> // The focal point (fFx and fFy) must be clamped to be *inside* - not on -
>
> // the circumference of the gradient or we'll get rendering anomalies. We
>
> // calculate the distance from the focal point to the gradient center and
>
>- // make sure it is *less* than the gradient radius. 0.999 is used as the
>
>+ // make sure it is *less* than the gradient radius. 0.99 is used as the
>
> // factor of the radius because it's close enough to 1 that we won't get a
>
> // fringe at the edge of the gradient if we clamp, but not so close to 1
>
> // that rounding error will give us the same results as using fR itself.
// Also note that .99 < 127/128, which is the limit of the fractional part of
// cairo's 24.8 fixed point representation.
Attachment #352940 -
Flags: review?(jwatt) → review+
| Assignee | ||
Comment 12•17 years ago
|
||
Attachment #352940 -
Attachment is obsolete: true
Attachment #353029 -
Flags: superreview?(roc)
Attachment #353029 -
Flags: superreview?(roc) → superreview+
| Assignee | ||
Comment 13•17 years ago
|
||
| Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Whiteboard: check in the patch and the reftest
| Assignee | ||
Updated•17 years ago
|
Attachment #353029 -
Flags: approval1.9.1?
| Assignee | ||
Comment 14•17 years ago
|
||
Comment on attachment 353029 [details] [diff] [review]
address review comment
[Checkin: Comment 15 & 18]
Simple low risk change that fixes a regression we've had since Firefox 2
Pushed 05bf7c30877e to trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: check in the patch and the reftest
I agree we should have this for 3.1.
| Assignee | ||
Updated•17 years ago
|
Flags: blocking1.9.1?
Flags: blocking1.9.1? → blocking1.9.1+
Whiteboard: [needs 191 landing]
Comment on attachment 353029 [details] [diff] [review]
address review comment
[Checkin: Comment 15 & 18]
Since this blocks, we no longer need 1.9.1 approval
Attachment #353029 -
Flags: approval1.9.1?
| Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
| Assignee | ||
Updated•17 years ago
|
Whiteboard: [needs 191 landing] → [needs 191 landing] check in patch and reftest to 1.9.1
Updated•17 years ago
|
Attachment #353029 -
Attachment description: address review comment → address review comment
[Checkin: Comment 15 & 18]
Updated•17 years ago
|
Attachment #353160 -
Attachment description: reftest → reftest
[Checkin: Comment 15 & 18]
Comment 18•17 years ago
|
||
Keywords: checkin-needed → fixed1.9.1
Whiteboard: [needs 191 landing] check in patch and reftest to 1.9.1
Target Milestone: --- → mozilla1.9.1b3
Comment 19•16 years ago
|
||
verified FIXED on builds:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.1pre) Gecko/20090720 Shiretoko/3.5.1pre ID:20090720042942
and
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090721 Minefield/3.6a1pre ID:20090721044139
Status: RESOLVED → VERIFIED
Keywords: fixed1.9.1 → verified1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•