From 0f4ffbd8c230c909958c4f310373672821487b46 Mon Sep 17 00:00:00 2001 From: Cameron McCormack Date: Thu, 20 Sep 2018 07:07:47 +0000 Subject: [PATCH] Bug 1492694 - Treat invalid in="" attributes as if they weren't specified r=longsonr Differential Revision: https://phabricator.services.mozilla.com/D6355 --HG-- extra : moz-landing-system : lando --- layout/svg/nsSVGFilterInstance.cpp | 5 +- testing/web-platform/meta/MANIFEST.json | 47 +++++++++++++++++-- .../filter-effects/svg-unknown-input-001.html | 19 ++++++++ .../filter-effects/svg-unknown-input-002.html | 18 +++++++ .../filter-effects/svg-unknown-input-ref.html | 8 ++++ 5 files changed, 92 insertions(+), 5 deletions(-) create mode 100644 testing/web-platform/tests/css/filter-effects/svg-unknown-input-001.html create mode 100644 testing/web-platform/tests/css/filter-effects/svg-unknown-input-002.html create mode 100644 testing/web-platform/tests/css/filter-effects/svg-unknown-input-ref.html diff --git a/layout/svg/nsSVGFilterInstance.cpp b/layout/svg/nsSVGFilterInstance.cpp index bf94ae2179ee..5efa3f27d34d 100644 --- a/layout/svg/nsSVGFilterInstance.cpp +++ b/layout/svg/nsSVGFilterInstance.cpp @@ -356,8 +356,9 @@ nsSVGFilterInstance::GetSourceIndices(nsSVGFE* aPrimitiveElement, sourceIndex = GetLastResultIndex(aPrimitiveDescrs); } else { bool inputExists = aImageTable.Get(str, &sourceIndex); - if (!inputExists) - return NS_ERROR_FAILURE; + if (!inputExists) { + sourceIndex = GetLastResultIndex(aPrimitiveDescrs); + } } aSourceIndices.AppendElement(sourceIndex); diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index 42f4c2114df3..652e6da8c31c 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -165661,6 +165661,30 @@ {} ] ], + "css/filter-effects/svg-unknown-input-001.html": [ + [ + "/css/filter-effects/svg-unknown-input-001.html", + [ + [ + "/css/filter-effects/svg-unknown-input-ref.html", + "==" + ] + ], + {} + ] + ], + "css/filter-effects/svg-unknown-input-002.html": [ + [ + "/css/filter-effects/svg-unknown-input-002.html", + [ + [ + "/css/filter-effects/svg-unknown-input-ref.html", + "==" + ] + ], + {} + ] + ], "css/mediaqueries/aspect-ratio-001.html": [ [ "/css/mediaqueries/aspect-ratio-001.html", @@ -272073,6 +272097,11 @@ {} ] ], + "css/filter-effects/svg-unknown-input-ref.html": [ + [ + {} + ] + ], "css/geometry/META.yml": [ [ {} @@ -579171,6 +579200,18 @@ "3d8118b387d938b588e8e88ad5ec87a5343e4f72", "reftest" ], + "css/filter-effects/svg-unknown-input-001.html": [ + "7789f2a9af4f1492fa6db36b53a72ada151f61d5", + "reftest" + ], + "css/filter-effects/svg-unknown-input-002.html": [ + "f45d3e344ad193c59826543239c33fffc61d6527", + "reftest" + ], + "css/filter-effects/svg-unknown-input-ref.html": [ + "1fff2a6175cfe1956ff2c451aece45ec73345d81", + "support" + ], "css/geometry/DOMMatrix-001.html": [ "a8a357bff606925aaa95dce6c4642b81bd8c88ea", "testharness" @@ -598516,7 +598557,7 @@ "support" ], "fullscreen/api/document-exit-fullscreen-active-document.html": [ - "18b0bb6493bd8275a750091b862c7ee5ee770abf", + "8279fae533774fcf6daced99ffc84413a0a9172d", "testharness" ], "fullscreen/api/document-exit-fullscreen-manual.html": [ @@ -656340,7 +656381,7 @@ "support" ], "tools/wptrunner/wptrunner/browsers/firefox.py": [ - "04f2ce84a41619a23e29d5436430b11fa2b6d7c5", + "9f7ebfa2ca544616e2feaeb53c8af73220d7271a", "support" ], "tools/wptrunner/wptrunner/browsers/ie.py": [ @@ -668704,7 +668745,7 @@ "testharness" ], "x-frame-options/multiple.sub.html": [ - "f7a28e40ee22be3493c3926e15c40d2e814ad2e4", + "717e9fd25c51ee80f3adf029740d475790b3875e", "testharness" ], "x-frame-options/redirect.sub.html": [ diff --git a/testing/web-platform/tests/css/filter-effects/svg-unknown-input-001.html b/testing/web-platform/tests/css/filter-effects/svg-unknown-input-001.html new file mode 100644 index 000000000000..7789f2a9af4f --- /dev/null +++ b/testing/web-platform/tests/css/filter-effects/svg-unknown-input-001.html @@ -0,0 +1,19 @@ + +Filter Effects: The in attribute + + + + + +

The test passes if you see a green square and no red.

+ + + + + + + + + + + diff --git a/testing/web-platform/tests/css/filter-effects/svg-unknown-input-002.html b/testing/web-platform/tests/css/filter-effects/svg-unknown-input-002.html new file mode 100644 index 000000000000..cb07b6540458 --- /dev/null +++ b/testing/web-platform/tests/css/filter-effects/svg-unknown-input-002.html @@ -0,0 +1,18 @@ + +Filter Effects: The in attribute + + + + + +

The test passes if you see a green square and no red.

+ + + + + + + + + + diff --git a/testing/web-platform/tests/css/filter-effects/svg-unknown-input-ref.html b/testing/web-platform/tests/css/filter-effects/svg-unknown-input-ref.html new file mode 100644 index 000000000000..1fff2a6175cf --- /dev/null +++ b/testing/web-platform/tests/css/filter-effects/svg-unknown-input-ref.html @@ -0,0 +1,8 @@ + +Filter Effects: Reference + + +

The test passes if you see a green square and no red.

+ + +