Bug 975773 - Filter primitives in error states can have inputs. r=roc
authorMarkus Stange <mstange@themasta.com>
Mon, 03 Mar 2014 14:31:27 +0100
changeset 188755 3cfdf8037ca38ccccbc90f02fde89f782c24b1ce
parent 188633 255f08ae80d0d62491bc35e1cfb3987d2f7daa00
child 188756 56f9890e7fd9196f714ca84e3c6dff03bb6a92c7
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs975773
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 975773 - Filter primitives in error states can have inputs. r=roc
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
@@ -1403,23 +1403,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,9 +173,10 @@ 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
 load 974746-1.svg