Bug 1382257 - Correct returning value of PaintBorderWithStyleBorder. r=mstange
authorcku <cku@mozilla.com>
Fri, 21 Jul 2017 09:50:36 +0800
changeset 418858 499d18aed4f008115fd69135abf8988f9f3b7fbb
parent 418857 ea938674f10268887982c61f26b7462374a902c7
child 418859 95efad45c16f1bd202f7246ee421ecac4e03eef5
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)
reviewersmstange
bugs1382257
milestone56.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 1382257 - Correct returning value of PaintBorderWithStyleBorder. r=mstange We overwrites DrawResult returning from nsCSSBorderImageRenderer::CreateBorderImageRenderer by the returning value of DrawBorderImage, which is not right. MozReview-Commit-ID: 1EeqU5hLyln
layout/painting/nsCSSRendering.cpp
--- a/layout/painting/nsCSSRendering.cpp
+++ b/layout/painting/nsCSSRendering.cpp
@@ -829,22 +829,22 @@ nsCSSRendering::PaintBorderWithStyleBord
 
     // Creating the border image renderer will request a decode, and we rely on
     // that happening.
     Maybe<nsCSSBorderImageRenderer> renderer =
       nsCSSBorderImageRenderer::CreateBorderImageRenderer(aPresContext, aForFrame, aBorderArea,
                                                           aStyleBorder, aDirtyRect, aSkipSides,
                                                           irFlags, &result);
     if (aStyleBorder.IsBorderImageLoaded()) {
-      if (!renderer) {
-        return result;
+      if (renderer) {
+        result &= renderer->DrawBorderImage(aPresContext, aRenderingContext,
+                                            aForFrame, aDirtyRect);
       }
 
-      return renderer->DrawBorderImage(aPresContext, aRenderingContext,
-                                       aForFrame, aDirtyRect);
+      return result;
     }
   }
 
   DrawResult result = DrawResult::SUCCESS;
 
   // If we had a border-image, but it wasn't loaded, then we should return
   // DrawResult::NOT_READY; we'll want to try again if we do a paint with sync
   // decoding enabled.