Bug 1382257 - Correct returning value of PaintBorderWithStyleBorder.
We overwrites DrawResult returning from
nsCSSBorderImageRenderer::CreateBorderImageRenderer by the returning value of
DrawBorderImage, which is not right.
MozReview-Commit-ID: 1EeqU5hLyln
--- 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.