Backed out changeset 9cbb90abba0d (bug 1387325) for build bustage on Windows at layout/xul/nsImageBoxFrame.cpp(250): 'LoadImageW': is not a member of 'nsContentUtils'. r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 08 Sep 2017 17:32:57 +0200
changeset 429229 89755ca77e5d30642a1ac90bf3aa818f78268752
parent 429228 41c7be71c64f4ef3c237f408b4526e039a217e1b
child 429230 5e511ebfe50519f4f6dcc31c5b3f493b61eb9a74
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1387325
milestone57.0a1
backs out9cbb90abba0df7b0bf242e4f6466e3cbb9a354db
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 9cbb90abba0d (bug 1387325) for build bustage on Windows at layout/xul/nsImageBoxFrame.cpp(250): 'LoadImageW': is not a member of 'nsContentUtils'. r=backout on a CLOSED TREE
layout/xul/nsImageBoxFrame.cpp
layout/xul/nsImageBoxFrame.h
--- a/layout/xul/nsImageBoxFrame.cpp
+++ b/layout/xul/nsImageBoxFrame.cpp
@@ -336,63 +336,42 @@ nsImageBoxFrame::BuildDisplayList(nsDisp
   list.AppendNewToTop(
     new (aBuilder) nsDisplayXULImage(aBuilder, this));
 
   CreateOwnLayerIfNeeded(aBuilder, &list);
 
   aLists.Content()->AppendToTop(&list);
 }
 
-already_AddRefed<imgIContainer>
-nsImageBoxFrame::GetImageContainerForPainting(const nsPoint& aPt,
-                                              DrawResult& aDrawResult,
-                                              Maybe<nsPoint>& aAnchorPoint,
-                                              nsRect& aDest)
+DrawResult
+nsImageBoxFrame::PaintImage(gfxContext& aRenderingContext,
+                            const nsRect& aDirtyRect, nsPoint aPt,
+                            uint32_t aFlags)
 {
   if (!mImageRequest) {
     // This probably means we're drawn by a native theme.
-    aDrawResult = DrawResult::SUCCESS;
-    return nullptr;
+    return DrawResult::SUCCESS;
   }
 
   // Don't draw if the image's size isn't available.
   uint32_t imgStatus;
   if (!NS_SUCCEEDED(mImageRequest->GetImageStatus(&imgStatus)) ||
       !(imgStatus & imgIRequest::STATUS_SIZE_AVAILABLE)) {
-    aDrawResult = DrawResult::NOT_READY;
-    return nullptr;
+    return DrawResult::NOT_READY;
   }
 
   nsCOMPtr<imgIContainer> imgCon;
   mImageRequest->GetImage(getter_AddRefs(imgCon));
 
   if (!imgCon) {
-    aDrawResult = DrawResult::NOT_READY;
-    return nullptr;
+    return DrawResult::NOT_READY;
   }
 
-  aDest = GetDestRect(aPt, aAnchorPoint);
-  aDrawResult = DrawResult::SUCCESS;
-  return imgCon.forget();
-}
-
-DrawResult
-nsImageBoxFrame::PaintImage(gfxContext& aRenderingContext,
-                            const nsRect& aDirtyRect, nsPoint aPt,
-                            uint32_t aFlags)
-{
-  DrawResult result;
   Maybe<nsPoint> anchorPoint;
-  nsRect dest;
-  nsCOMPtr<imgIContainer> imgCon = GetImageContainerForPainting(aPt, result,
-                                                                anchorPoint,
-                                                                dest);
-  if (!imgCon) {
-    return result;
-  }
+  nsRect dest = GetDestRect(aPt, anchorPoint);
 
   // don't draw if the image is not dirty
   // XXX(seth): Can this actually happen anymore?
   nsRect dirty;
   if (!dirty.IntersectRect(aDirtyRect, dest)) {
     return DrawResult::TEMPORARY_ERROR;
   }
 
--- a/layout/xul/nsImageBoxFrame.h
+++ b/layout/xul/nsImageBoxFrame.h
@@ -85,21 +85,16 @@ public:
    */
   void UpdateLoadFlags();
 
   virtual void BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                 const nsDisplayListSet& aLists) override;
 
   virtual ~nsImageBoxFrame();
 
-  already_AddRefed<imgIContainer> GetImageContainerForPainting(const nsPoint& aPt,
-                                                               DrawResult& aDrawResult,
-                                                               Maybe<nsPoint>& aAnchorPoint,
-                                                               nsRect& aDest);
-
   DrawResult PaintImage(gfxContext& aRenderingContext,
                         const nsRect& aDirtyRect,
                         nsPoint aPt, uint32_t aFlags);
 
   bool CanOptimizeToImageLayer();
 
   nsRect GetDestRect(const nsPoint& aOffset, Maybe<nsPoint>& aAnchorPoint);