Open Bug 1102014 Opened 11 years ago Updated 3 years ago

feImage with missing image resource should render transparent black

Categories

(Core :: Graphics, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: mvujovic, Unassigned)

References

Details

Attachments

(1 file)

The spec [1] was recently updated to say: "A href reference that is an empty image (zero width or zero height), that fails to download, is non-existent, or that cannot be displayed (e.g. because it is not in a supported image format) fills the filter primitive subregion with transparent black." [1]: http://dev.w3.org/fxtf/filters/#feImageElement
Attached patch Patch (WIP)Splinter Review
This patch makes a missing image resource explicitly render transparent black in the filter primitive subregion. Before, we used PrimitiveType::Empty, which ended up as a 0x0 sized transparent black flood FilterNode. Running the patch through the try bots before review.
Attachment #8525714 - Flags: review?(mstange)
I'm currently dealing with a similar problem in bug 1092634 and I think your patch is the wrong way to go about it. In FilterNodeSoftware, I'd like the output surface to be as tight as possible without unneeded transparency at the edges. If a FilterNodeSoftware subclass shows different behavior depending on whether its input comes with transparent padding around it, then that's a bug in how that filter node deals with input. I'll need to add a comment about that assumption somewhere to FilterNodeSoftware.h.
(In reply to Markus Stange [:mstange] from comment #3) > I'm currently dealing with a similar problem in bug 1092634 and I think your > patch is the wrong way to go about it. In FilterNodeSoftware, I'd like the > output surface to be as tight as possible without unneeded transparency at > the edges. If a FilterNodeSoftware subclass shows different behavior > depending on whether its input comes with transparent padding around it, > then that's a bug in how that filter node deals with input. > I'll need to add a comment about that assumption somewhere to > FilterNodeSoftware.h. Ok, that makes sense. I like that your patch doesn't inflate layers with transparency unless the next filter primitive needs it. I ran my tests in this patch against your patch in bug 1092634, and they both work properly (as I would expect). I'm thinking I throw out the bit of code in this patch and just land the tests after bug 1092634 lands.
Depends on: 1092634
Attachment #8525714 - Attachment description: Patch → Patch (WIP)
Attachment #8525714 - Flags: review?(mstange)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: