Bug 1383395 - Remove an un-needed check for draw background image. r?cjku draft bug-1383395
authorMichael Scott <michael.scott250+mozilla@gmail.com>
Sun, 23 Jul 2017 12:58:58 +0300
branchbug-1383395
changeset 613896 c4f40f881f6f7fa17c2076919fc96b2e2bb64b4c
parent 613800 c22502562670e5e53bea543a3ee25c81f1a7b624
child 724653 466cda7d7252aba377f1cf821e8869a63c4b62cc
push id69875
push userbmo:michael.scott250+mozilla@gmail.com
push dateSun, 23 Jul 2017 09:59:24 +0000
reviewerscjku
bugs1383395
milestone56.0a1
Bug 1383395 - Remove an un-needed check for draw background image. r?cjku Remove the the duplicate check for draw background image is false, in the PaintStyleImageLayerWithSC method, as this is already covered by the preceding code. MozReview-Commit-ID: L669Y4OjzE0
layout/painting/nsCSSRendering.cpp
--- a/layout/painting/nsCSSRendering.cpp
+++ b/layout/painting/nsCSSRendering.cpp
@@ -2635,21 +2635,16 @@ nsCSSRendering::PaintStyleImageLayerWith
   }
 
   // The background color is rendered over the entire dirty area,
   // even if the image isn't.
   if (drawBackgroundColor && !isCanvasFrame) {
     DrawBackgroundColor(clipState, &aRenderingCtx, appUnitsPerPixel);
   }
 
-  if (!drawBackgroundImage) {
-    return DrawResult::SUCCESS; // No need to draw layer image, we can early
-                                // return now.
-  }
-
   // Compute the outermost boundary of the area that might be painted.
   // Same coordinate space as aParams.borderArea & aParams.bgClipRect.
   Sides skipSides = aParams.frame->GetSkipSides();
   nsRect paintBorderArea =
     ::BoxDecorationRectForBackground(aParams.frame, aParams.borderArea,
                                      skipSides, &aBorder);
   nsRect clipBorderArea =
     ::BoxDecorationRectForBorder(aParams.frame, aParams.borderArea,