Closed
Bug 845985
Opened 11 years ago
Closed 11 years ago
SVG Filters: feComponentTransfer type=discrete treats single-valued arrays incorrectly
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: mmullany, Assigned: longsonr)
Details
Attachments
(2 files)
713 bytes,
image/svg+xml
|
Details | |
6.21 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17 Steps to reproduce: Created an SVG filter with a single value in the array for an feComponentTransfer. Actual results: The filter failed to convert the input values to the value contained in the array, and instead ignores the component transfer. Expected results: The spec says - for an input value C, where C<1, and an input array of [V0...Vn-1] find an index k where k/n <= C < (k+1)/n. C' (the output value) is Vk. And where C=1, define k=n-1. In the case where the array has a single value, this reduces to k<=C<k+1. In the case of an array with a single index (of 0) - 0 is a valid solution to this constraint. And where C=1, define k=0 ("n-1" is "1-1".) Webkit treats this case correctly. Sample code for a filter below: which should add a red drop shadow displaced 80 userspace units in x from the filtered content. Firefox displays a black drop shadow (it ignores the feFuncR discrete filter). <filter id="drop"> <feComponentTransfer in="SourceAlpha" result="doo"> <feFuncR type="discrete" tableValues="1" /> </feComponentTransfer> <feOffset dx="80" dy="0" in="doo" result="shadow"/> <feGaussianBlur stdDeviation="20 0" in="shadow" result="blurOut"/> <feComponentTransfer in="SourceGraphic" result="unbrightsource"> <feFuncR type="linear" slope="0.4" /> </feComponentTransfer> <feBlend mode="normal" in="unbrightsource" in2="blurOut" result="final"/>
Assignee | ||
Updated•11 years ago
|
Component: Untriaged → SVG
Product: Firefox → Core
Assignee | ||
Comment 1•11 years ago
|
||
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Assignee | ||
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 4•11 years ago
|
||
Assignee: nobody → longsonr
Attachment #719415 -
Flags: review?(roc)
Attachment #719415 -
Flags: review?(roc) → review+
Assignee | ||
Comment 5•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=878cef0d3b17
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/7df619463b43
Flags: in-testsuite+
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7df619463b43
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•