Backed out changeset b05327c3c55f (bug 1377158)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 25 Jul 2017 14:33:51 +0200
changeset 419536 a013e95212fcdc459484be58815e309bca684e83
parent 419535 01e4f85ad7f69ede53f1b9a5132a7d9afa38c155
child 419537 1bcb249ab4302e7aee3d4464c603eda9fa652627
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1377158
milestone56.0a1
backs outb05327c3c55f15d52e7b3adf474e944ce600ef03
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
Backed out changeset b05327c3c55f (bug 1377158)
image/ImageFactory.cpp
image/ImageFactory.h
--- a/image/ImageFactory.cpp
+++ b/image/ImageFactory.cpp
@@ -79,18 +79,17 @@ ComputeImageFlags(ImageURL* uri, const n
 }
 
 /* static */ already_AddRefed<Image>
 ImageFactory::CreateImage(nsIRequest* aRequest,
                           ProgressTracker* aProgressTracker,
                           const nsCString& aMimeType,
                           ImageURL* aURI,
                           bool aIsMultiPart,
-                          uint32_t aInnerWindowId,
-                          StyleBackendType aStyleBackendType /* = StyleBackendType::None */)
+                          uint32_t aInnerWindowId)
 {
   MOZ_ASSERT(gfxPrefs::SingletonExists(),
              "Pref observers should have been initialized already");
 
   // Compute the image's initialization flags.
   uint32_t imageFlags = ComputeImageFlags(aURI, aMimeType, aIsMultiPart);
 
 #ifdef DEBUG
@@ -104,17 +103,17 @@ ImageFactory::CreateImage(nsIRequest* aR
       obs->NotifyObservers(nullptr, "image-loading", NS_ConvertUTF8toUTF16(spec).get());
     }
   }
 #endif
 
   // Select the type of image to create based on MIME type.
   if (aMimeType.EqualsLiteral(IMAGE_SVG_XML)) {
     return CreateVectorImage(aRequest, aProgressTracker, aMimeType,
-                             aURI, imageFlags, aInnerWindowId, aStyleBackendType);
+                             aURI, imageFlags, aInnerWindowId);
   } else {
     return CreateRasterImage(aRequest, aProgressTracker, aMimeType,
                              aURI, imageFlags, aInnerWindowId);
   }
 }
 
 // Marks an image as having an error before returning it.
 template <typename T>
@@ -249,24 +248,23 @@ ImageFactory::CreateRasterImage(nsIReque
 }
 
 /* static */ already_AddRefed<Image>
 ImageFactory::CreateVectorImage(nsIRequest* aRequest,
                                 ProgressTracker* aProgressTracker,
                                 const nsCString& aMimeType,
                                 ImageURL* aURI,
                                 uint32_t aImageFlags,
-                                uint32_t aInnerWindowId,
-                                StyleBackendType aStyleBackendType)
+                                uint32_t aInnerWindowId)
 {
   MOZ_ASSERT(aProgressTracker);
 
   nsresult rv;
 
-  RefPtr<VectorImage> newImage = new VectorImage(aURI, aStyleBackendType);
+  RefPtr<VectorImage> newImage = new VectorImage(aURI);
   aProgressTracker->SetImage(newImage);
   newImage->SetProgressTracker(aProgressTracker);
 
   rv = newImage->Init(aMimeType.get(), aImageFlags);
   if (NS_FAILED(rv)) {
     return BadImage("VectorImage::Init failed", newImage);
   }
 
--- a/image/ImageFactory.h
+++ b/image/ImageFactory.h
@@ -2,17 +2,16 @@
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_image_ImageFactory_h
 #define mozilla_image_ImageFactory_h
 
-#include "mozilla/StyleBackendType.h"
 #include "nsCOMPtr.h"
 #include "nsProxyRelease.h"
 
 class nsCString;
 class nsIRequest;
 
 namespace mozilla {
 namespace image {
@@ -41,18 +40,17 @@ public:
    * @param aIsMultiPart     Whether the image is part of a multipart request.
    * @param aInnerWindowId   The window this image belongs to.
    */
   static already_AddRefed<Image> CreateImage(nsIRequest* aRequest,
                                              ProgressTracker* aProgressTracker,
                                              const nsCString& aMimeType,
                                              ImageURL* aURI,
                                              bool aIsMultiPart,
-                                             uint32_t aInnerWindowId,
-                                             StyleBackendType aStyleBackendType = StyleBackendType::None);
+                                             uint32_t aInnerWindowId);
   /**
    * Creates a new image which isn't associated with a URI or loaded through
    * the usual image loading mechanism.
    *
    * @param aMimeType      The mimetype of the image.
    */
   static already_AddRefed<Image>
   CreateAnonymousImage(const nsCString& aMimeType);
@@ -80,18 +78,17 @@ private:
                     uint32_t aInnerWindowId);
 
   static already_AddRefed<Image>
   CreateVectorImage(nsIRequest* aRequest,
                     ProgressTracker* aProgressTracker,
                     const nsCString& aMimeType,
                     ImageURL* aURI,
                     uint32_t aImageFlags,
-                    uint32_t aInnerWindowId,
-                    StyleBackendType aStyleBackendType);
+                    uint32_t aInnerWindowId);
 
   // This is a static factory class, so disallow instantiation.
   virtual ~ImageFactory() = 0;
 };
 
 } // namespace image
 } // namespace mozilla