Bug 975773 - Filter primitives in error states can have inputs. r=roc, a=sledru
authorMarkus Stange <mstange@themasta.com>
Mon, 03 Mar 2014 14:31:27 +0100
changeset 176430 6e4dc1e09adff4a0d22ad6d592ae059b9613af75
parent 176429 a1e5daf5d2562f82a168779f29189dcb88e53913
child 176431 adde00109cc27bab3dff9281cdedf139c6ae12bd
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, sledru
bugs975773
milestone28.0
Bug 975773 - Filter primitives in error states can have inputs. r=roc, a=sledru
gfx/src/FilterSupport.cpp
layout/svg/crashtests/975773-1.svg
layout/svg/crashtests/crashtests.list
--- a/gfx/src/FilterSupport.cpp
+++ b/gfx/src/FilterSupport.cpp
@@ -1353,23 +1353,25 @@ FilterSupport::ComputePostFilterExtents(
 static nsIntRegion
 SourceNeededRegionForPrimitive(const FilterPrimitiveDescription& aDescription,
                                const nsIntRegion& aResultNeededRegion,
                                int32_t aInputIndex)
 {
   const AttributeMap& atts = aDescription.Attributes();
   switch (aDescription.Type()) {
 
-    case FilterPrimitiveDescription::eNone:
     case FilterPrimitiveDescription::eFlood:
     case FilterPrimitiveDescription::eTurbulence:
     case FilterPrimitiveDescription::eImage:
       MOZ_CRASH("this shouldn't be called for filters without inputs");
       return nsIntRegion();
 
+    case FilterPrimitiveDescription::eNone:
+      return nsIntRegion();
+
     case FilterPrimitiveDescription::eBlend:
     case FilterPrimitiveDescription::eComposite:
     case FilterPrimitiveDescription::eMerge:
     case FilterPrimitiveDescription::eColorMatrix:
     case FilterPrimitiveDescription::eComponentTransfer:
       return aResultNeededRegion;
 
     case FilterPrimitiveDescription::eMorphology:
new file mode 100644
--- /dev/null
+++ b/layout/svg/crashtests/975773-1.svg
@@ -0,0 +1,10 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+
+    <filter id="f">
+        <feSpecularLighting style="display: none;"/>
+        <feComposite in="SourceGraphic"/>
+    </filter>
+
+    <path d="M0,0 h100 v100 h-100 z M20,20 v60 h60 v-60 z" filter="url(#f)"/>
+
+</svg>
--- a/layout/svg/crashtests/crashtests.list
+++ b/layout/svg/crashtests/crashtests.list
@@ -173,8 +173,9 @@ load 890782-1.svg
 load 890783-1.svg
 load 893510-1.svg
 load 895311-1.svg
 load 897342-1.svg
 load 898909-1.svg
 load 898951-1.svg
 load 919371-1.xhtml
 load 952270-1.svg
+load 975773-1.svg