Backed out changeset 14a2665a64f6 (bug 1366984) for causing Windows Talos failures on a CLOSED TREE.
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 31 May 2017 13:03:41 -0400
changeset 409691 118e1c11be5cb1cd4fb5a3222dd8f9e11991aca0
parent 409690 207e97b313e57e6d850d47ac4001cf11b79e90ba
child 409692 5ca156581096a84c3313d5b4716c61ddc027b907
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1366984
milestone55.0a1
backs out14a2665a64f6e78b7c470a3eb0635e491660955a
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 14a2665a64f6 (bug 1366984) for causing Windows Talos failures on a CLOSED TREE.
layout/painting/nsCSSRendering.cpp
--- a/layout/painting/nsCSSRendering.cpp
+++ b/layout/painting/nsCSSRendering.cpp
@@ -1964,42 +1964,33 @@ nsCSSRendering::CanBuildWebRenderDisplay
     nsITheme *theme = aPresCtx.GetTheme();
     if (theme && theme->ThemeSupportsWidget(&aPresCtx,
                                             aFrame,
                                             displayData->mAppearance)) {
       return false;
     }
   }
 
-  // We only support painting gradients and image for a single style image layer
   const nsStyleImage* styleImage = &aBackgroundStyle->mImage.mLayers[aLayer].mImage;
-  if (styleImage->GetType() == eStyleImageType_Image) {
-    if (styleImage->GetCropRect()) {
-      return false;
-    }
-
+
+  // We only support image with image container.
+  if (!styleImage->IsEmpty() && styleImage->GetType() == eStyleImageType_Image) {
     imgRequestProxy* requestProxy = styleImage->GetImageData();
-    if (!requestProxy) {
-      return false;
+    if (requestProxy) {
+      nsCOMPtr<imgIContainer> srcImage;
+      requestProxy->GetImage(getter_AddRefs(srcImage));
+      if (srcImage && !srcImage->IsImageContainerAvailable(aManager, imgIContainer::FLAG_NONE)) {
+        return false;
+      }
     }
-
-    nsCOMPtr<imgIContainer> srcImage;
-    requestProxy->GetImage(getter_AddRefs(srcImage));
-    if (!srcImage || !srcImage->IsImageContainerAvailable(aManager, imgIContainer::FLAG_NONE)) {
-      return false;
-    }
-
-    return true;
   }
 
-  if (styleImage->GetType() == eStyleImageType_Gradient) {
-    return true;
-  }
-
-  return false;
+  // We only support painting gradients and image for a single style image layer
+  return styleImage->GetType() == eStyleImageType_Gradient ||
+         styleImage->GetType() == eStyleImageType_Image;
 }
 
 DrawResult
 nsCSSRendering::BuildWebRenderDisplayItemsForStyleImageLayer(const PaintBGParams& aParams,
                                                              mozilla::wr::DisplayListBuilder& aBuilder,
                                                              const mozilla::layers::StackingContextHelper& aSc,
                                                              nsTArray<WebRenderParentCommand>& aParentCommands,
                                                              mozilla::layers::WebRenderDisplayItemLayer* aLayer)