Bug 1509998 - Ensure we handle empty frame rects properly in BlendAnimationFilter. r=tnikkel
authorAndrew Osmond <aosmond@mozilla.com>
Wed, 28 Nov 2018 15:37:12 -0500
changeset 448632 0ce8f2b44c74bde240c7e66de0198cec83f474d0
parent 448631 4deb028f32d6794abc15c3663434ab2799f78779
child 448633 762547f425d2ef65b36d9e57c29f020cb5361eb4
push id35120
push userccoroiu@mozilla.com
push dateThu, 29 Nov 2018 04:28:09 +0000
treeherdermozilla-central@5972866ac7da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1509998
milestone65.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 1509998 - Ensure we handle empty frame rects properly in BlendAnimationFilter. r=tnikkel Differential Revision: https://phabricator.services.mozilla.com/D13305
image/SurfaceFilters.h
image/test/crashtests/1509998.gif
image/test/crashtests/crashtests.list
--- a/image/SurfaceFilters.h
+++ b/image/SurfaceFilters.h
@@ -410,19 +410,19 @@ public:
 
     // Clamp mFrameRect to the output size.
     gfx::IntRect outputRect(0, 0, outputSize.width, outputSize.height);
     mFrameRect = mFrameRect.Intersect(outputRect);
     bool fullFrame = outputRect.IsEqualEdges(mFrameRect);
 
     // If there's no intersection, |mFrameRect| will be an empty rect positioned
     // at the maximum of |inputRect|'s and |aFrameRect|'s coordinates, which is
-    // not what we want. Force it to (0, 0) in that case.
+    // not what we want. Force it to (0, 0) sized 0 x 0 in that case.
     if (mFrameRect.IsEmpty()) {
-      mFrameRect.MoveTo(0, 0);
+      mFrameRect.SetRect(0, 0, 0, 0);
     }
 
     BlendMethod blendMethod = currentFrame->GetBlendMethod();
     switch (blendMethod) {
       default:
         blendMethod = BlendMethod::SOURCE;
         MOZ_FALLTHROUGH_ASSERT("Unexpected blend method!");
       case BlendMethod::SOURCE:
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..05b141ba5f575095aef08a04abb92fa63edeff59
GIT binary patch
literal 92
zc${<hbhEHbWMp7uXkcLY4+e_=x&2&2f}I@$T#fV$m>C%u7!-f9FmN&aXV3w0K#Ccd
Um|Pe^!i-!%o(=;-*asmD084)nsQ>@~
--- a/image/test/crashtests/crashtests.list
+++ b/image/test/crashtests/crashtests.list
@@ -50,8 +50,11 @@ load invalid_ico_width.ico
 
 # Bug 525326 - Test image sizes of 65535x65535 which is larger than we allow)
 load invalid-size.gif
 load invalid-size-second-frame.gif
 
 load multiple-png-hassize.ico # Bug 863958 - This icon's size is such that it leads to multiple writes to the PNG decoder after we've gotten our size.
 asserts(0-2) load ownerdiscard.html # Bug 1323672, bug 807211
 load truncated-second-frame.png # Bug 863975
+
+# Bug 1509998 - Ensure that we handle empty frame rects in animated images.
+load 1509998.gif