Closed
Bug 445079
Opened 16 years ago
Closed 16 years ago
Make foreignObject work in filters (and patterns)
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: roc, Assigned: roc)
Details
Attachments
(1 file)
11.48 KB,
patch
|
longsonr
:
review+
MatsPalmgren_bugz
:
superreview+
|
Details | Diff | Splinter Review |
Currently foreignObject doesn't work when 'filter' is applied to it, because filters create a new nsSVGRenderState with no embedded nsIRenderingContext. We should just create one on demand. One issue is that the gfxContext wrapped in an nsIRenderingContext must be heap-allocated; this patch changes nsSVGRenderState to target a temporary surface instead of a temporary context, and makes nsSVGRenderState manage the gfxContext itself.
Attachment #329382 -
Flags: superreview?(mats.palmgren)
Attachment #329382 -
Flags: review?(longsonr)
Comment 1•16 years ago
|
||
Comment on attachment 329382 [details] [diff] [review] fix >diff -NrpU12 mozilla-checkin.6692da1caef5/layout/reftests/svg/filter-foreignobject-01.svg mozilla-checkin/layout/reftests/svg/filter-foreignobject-01.svg >--- mozilla-checkin.6692da1caef5/layout/reftests/svg/filter-foreignobject-01.svg 1970-01-01 12:00:00.000000000 +1200 >+++ mozilla-checkin/layout/reftests/svg/filter-foreignobject-01.svg 2008-07-14 Can you change the filename case to foreignObject so that it matches the other foreignObject files in this directory please?
Attachment #329382 -
Flags: review?(longsonr) → review+
Comment 2•16 years ago
|
||
Comment on attachment 329382 [details] [diff] [review] fix sr=mats It looks like nsSVGFilterInstance.cpp does not need #include "gfxContext.h"
Attachment #329382 -
Flags: superreview?(mats.palmgren) → superreview+
Assignee | ||
Comment 3•16 years ago
|
||
Pushed 6c8c95fcaf9b with comments.
Status: NEW → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Assignee | ||
Comment 4•16 years ago
|
||
I backed out ... the test failed on Windows. I'm not sure why.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 5•16 years ago
|
||
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1216092112.1216095075.13838.gz
Assignee | ||
Comment 6•16 years ago
|
||
I think bug 445410 is contributing to the problem. However, the main issue is that the filter region is not pixel-aligned (because of the default -10%/+20% values) and so there's inevitable smearing when we composite a temporary surface into that rectangle. I think perhaps we should snap the filter region to pixels.
Assignee | ||
Comment 7•16 years ago
|
||
But I'd like to land the rest of the filter patches from my branch before I fix that, otherwise there will be conflicts.
(In reply to comment #6) > I think perhaps we should snap the filter region to pixels. That sounds like a good plan to me. Would you round the region outwards, or just snap to nearest?
Assignee | ||
Comment 9•16 years ago
|
||
Probably snap to nearest.
Assignee | ||
Comment 10•16 years ago
|
||
Pushed 8c1b20b1be5e. I didn't solve the underlying smearing problem that caused the test failure. I just worked around it by making the filter region precisely the viewport. I don't have time to solve the smearing problem right now and I needed to land this fix to keep making progress landing bling-branch patches.
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Comment 11•16 years ago
|
||
Verified. Works perfectly with Canvas.. now we only need Tamarin to speed up software filters and we have a Photoshop killer :)
You need to log in
before you can comment on or make changes to this bug.
Description
•