Radial gradients with small radii are not clamped correctly

RESOLVED FIXED

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: longsonr, Assigned: longsonr)

Tracking

Trunk
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
Created attachment 452999 [details] [diff] [review]
patch

We need to take an absolute value off to ensure different cairo fractions, not an amount we multiply by the radius because this will fail if the radius is significantly less than 1.
(Assignee)

Updated

8 years ago
Attachment #452999 - Attachment is patch: true
Attachment #452999 - Flags: review?(jwatt)
Does what we get here depend on the CTM of the element being filled? In other words do you know if cairo could end up rounding the value due to converting to absolute coordinates?
(Assignee)

Comment 3

8 years ago
The problem is here:
http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-pattern.c#444

The call stack is

new gfxPattern
cairo_pattern_create_radial
_cairo_pattern_innit_radial

And the arguments are passed through unchanged to that point.

There is a cairo_pattern_transform but it looks like when this is applied in _cairo_pattern_get_extents it's working in doubles.

So on the whole it looks OK to me.
(Assignee)

Comment 4

8 years ago
btw I should have used NS_MAX rather than PR_MAX as it seems PR_MAX is deprecated now. I can fix that on check in.
Comment on attachment 452999 [details] [diff] [review]
patch

Okay, great. Thanks for checking.
Attachment #452999 - Flags: review?(jwatt) → review+
(Assignee)

Comment 6

8 years ago
pushed http://hg.mozilla.org/mozilla-central/rev/c5c14a904af4
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.