зеркало из https://github.com/mozilla/pjs.git
Bug 610466 - feDiffuseLighting with filterRes larger than filter region causes filter not to work r+a=roc
This commit is contained in:
Родитель
a65c181e2b
Коммит
a84b721044
|
@ -171,8 +171,8 @@ nsSVGFE::SetupScalingFilter(nsSVGFilterInstance *aInstance,
|
|||
return result;
|
||||
|
||||
gfxRect r(aDataRect.x, aDataRect.y, aDataRect.width, aDataRect.height);
|
||||
r.Scale(scaledSize.width/aTarget->mImage->Width(),
|
||||
scaledSize.height/aTarget->mImage->Height());
|
||||
r.Scale(gfxFloat(scaledSize.width)/aTarget->mImage->Width(),
|
||||
gfxFloat(scaledSize.height)/aTarget->mImage->Height());
|
||||
r.RoundOut();
|
||||
if (NS_FAILED(nsLayoutUtils::GfxRectToIntRect(r, &result.mDataRect)))
|
||||
return result;
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Reference for feDistantLight with filterRes larger than filter region</title>
|
||||
|
||||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=610466 -->
|
||||
<defs>
|
||||
<filter id="f" x="0" y="0" width="0.5" height="0.5" filterRes="50 50">
|
||||
<feDiffuseLighting kernelUnitLength="1" lighting-color="lime">
|
||||
<feDistantLight elevation="100"/>
|
||||
</feDiffuseLighting>
|
||||
</filter>
|
||||
</defs>
|
||||
<svg clip="rect(1px 1px 48px 48px)">
|
||||
<path d="M0,0 h100 v100 h-100 z" filter="url(#f)"/>
|
||||
</svg>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 672 B |
|
@ -0,0 +1,19 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/licenses/publicdomain/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Testcase for feDistantLight with filterRes larger than filter region</title>
|
||||
|
||||
<!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=610466 -->
|
||||
<defs>
|
||||
<filter id="f" x="0" y="0" width="0.5" height="0.5" filterRes="60 60">
|
||||
<feDiffuseLighting kernelUnitLength="1" lighting-color="lime">
|
||||
<feDistantLight elevation="100"/>
|
||||
</feDiffuseLighting>
|
||||
</filter>
|
||||
</defs>
|
||||
<svg clip="rect(1px 1px 48px 48px)">
|
||||
<path d="M0,0 h100 v100 h-100 z" filter="url(#f)"/>
|
||||
</svg>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 671 B |
|
@ -75,6 +75,8 @@ fails == filter-marked-line-01.svg pass.svg # bug 477704
|
|||
== feDisplacementMap-alpha-01.svg pass.svg
|
||||
== feDisplacementMap-colour-01.svg feDisplacementMap-colour-01-ref.svg
|
||||
|
||||
== feDistantLight-filterRes-01.svg feDistantLight-filterRes-01-ref.svg
|
||||
|
||||
== feMorphology-radius-negative-01.svg pass.svg
|
||||
== feMorphology-radius-negative-02.svg pass.svg
|
||||
== feMorphology-radius-zero-01.svg pass.svg
|
||||
|
|
Загрузка…
Ссылка в новой задаче