Closed
Bug 467518
Opened 17 years ago
Closed 17 years ago
gfxAlphaBlur tries to blur outside the radius
Categories
(Core :: Graphics, defect, P3)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b3
People
(Reporter: roc, Assigned: roc)
Details
(Keywords: fixed1.9.1)
Attachments
(4 files)
gfxAlphaBlur does three box blurs each with a left/right lobe size of approximately mBlurRadius/2. This means the blur results actually extend about 1.5*mBlurRadius beyond the edge of the object. This seems unintuitive and conflicts with CSS3 text-shadow's description of the blur radius as "a length value that indicates the boundaries of the blur effect".
http://www.w3.org/TR/css3-text/#text-shadow
Since the temporary surface outsets the object by just one mBlurRadius, this creates visible shadow clipping:
http://www.howtocreate.co.uk/textshadow.html
> Mozilla/Firefox blurs shadows slightly more than the requested blur value, then
> clips the shadows to the required distance, making them end too abruptly and
> appear too faint.
I really think we should fix this before we ship shadow support in Firefox 3.1. We shouldn't be just setting the box-blur size to the blur radius; it needs to be about 2/3 of the blur radius. We'd also need to change CalculateBlurRadius to match.
Flags: blocking1.9.1?
![]() |
||
Comment 1•17 years ago
|
||
So what would be the best way to fix this, simply decreasing the size of the lobes to blurRadius/3? Also, I don't know how CalculateBlurRadius needs to be adjusted. Are you sure it needs changing? All it seems to do is convert a std deviation to a radius.
Assignee | ||
Comment 2•17 years ago
|
||
It's actually slightly tricky for small radii. I think I'll have a crack at it since I've already thought about it.
CalculateBlurRadius needs to change since it was assuming the blur radius equals the box-blur size, which is no longer going to be the case.
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → roc
Assignee | ||
Comment 3•17 years ago
|
||
Assignee | ||
Comment 4•17 years ago
|
||
Assignee | ||
Comment 5•17 years ago
|
||
You have to zoom in to really see it, but with the patch applied, the bottom right (10px) shadow looks significantly better --- less abrupt termination of the shadow.
Assignee | ||
Comment 6•17 years ago
|
||
Passes canvas mochitests.
Attachment #351147 -
Flags: review?(vladimir)
Assignee | ||
Updated•17 years ago
|
Whiteboard: [needs review]
Attachment #351147 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•17 years ago
|
Whiteboard: [needs review] → [needs landing]
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P3
Target Milestone: --- → mozilla1.9.1b3
Assignee | ||
Comment 7•17 years ago
|
||
Pushed ce9f05b57b95.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 191 landing]
Assignee | ||
Comment 8•17 years ago
|
||
Pushed to 1.9.1 as 75113d9d8bc2
Keywords: fixed1.9.1
Whiteboard: [needs 191 landing]
You need to log in
before you can comment on or make changes to this bug.
Description
•