зеркало из https://github.com/mozilla/pjs.git
Bug 494201 - feComposite has arguments inverted. r=longsonr
This commit is contained in:
Родитель
991ba83408
Коммит
aa15657a58
|
@ -1499,8 +1499,8 @@ nsSVGFECompositeElement::Filter(nsSVGFilterInstance *instance,
|
|||
for (PRInt32 y = rect.y; y < rect.YMost(); y++) {
|
||||
PRUint32 targIndex = y * stride + 4 * x;
|
||||
for (PRInt32 i = 0; i < 4; i++) {
|
||||
PRUint8 i2 = targetData[targIndex + i];
|
||||
PRUint8 i1 = sourceData[targIndex + i];
|
||||
PRUint8 i1 = targetData[targIndex + i];
|
||||
PRUint8 i2 = sourceData[targIndex + i];
|
||||
float result = k1Scaled*i1*i2 + k2*i1 + k3*i2 + k4Scaled;
|
||||
targetData[targIndex + i] =
|
||||
static_cast<PRUint8>(PR_MIN(PR_MAX(0, result), 255));
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
<filter id="filter">
|
||||
<feFlood flood-color="lime" result="flood1"/>
|
||||
<feFlood flood-color="red" result="flood2"/>
|
||||
<feComposite in="flood1" in2="flood2"
|
||||
operator="arithmetic" k1="0" k2="1" k3="0" k4="0" />
|
||||
</filter>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="yellow" filter="url(#filter)"/>
|
||||
</svg>
|
||||
|
После Ширина: | Высота: | Размер: 399 B |
|
@ -67,6 +67,7 @@ fails == filter-marked-line-01.svg pass.svg # bug 477704
|
|||
== filter-patterned-rect-01.svg pass.svg
|
||||
== filter-patterned-rect-02.svg pass.svg
|
||||
|
||||
== feComposite-arguments-01.svg pass.svg
|
||||
== feConvolveMatrix-order-01.svg feConvolveMatrix-order-01-ref.svg
|
||||
|
||||
== feMorphology-radius-negative-01.svg pass.svg
|
||||
|
|
Загрузка…
Ссылка в новой задаче