Bug 474700. Avoid negative-sized filter areas. r+sr=roc

--HG--
extra : rebase_source : 50e69812961c0787571273ca8e4326c48e7a83e6
This commit is contained in:
Robert Longson 2009-01-30 20:22:29 +13:00
parent 0f1f80485c
commit d7ecd01043
3 changed files with 6 additions and 0 deletions

View File

@ -133,6 +133,10 @@ nsAutoFilterInstance::nsAutoFilterInstance(nsIFrame *aTarget,
&filter->mLengthAttributes[nsSVGFilterElement::X], bbox, aTarget);
filterArea.RoundOut();
// 0 disables rendering, < 0 is error
if (filterArea.Width() <= 0 || filterArea.Height() <= 0)
return;
PRBool resultOverflows;
gfxIntSize filterRes;

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg"><filter id="f1" filterRes="10 20" height="-2"/><rect width="50" height="100" filter="url(#f1)"/></svg>

After

Width:  |  Height:  |  Size: 143 B

View File

@ -60,6 +60,7 @@ load 458453.html
load 464374-1.svg
load 466585-1.svg
load 470124-1.svg
load 474700-1.svg
load 475181-1.svg
load 475193-1.html
load extref-test-1.xhtml