diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-05-02 07:08:14 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-05-02 07:08:14 +0200 |
commit | 3dfd1412e4accfb442ddb9b83bf4e324742756c5 (patch) | |
tree | 7e95ecddc7e319c47164e175cd31f417646fad7c /layout/base | |
parent | 61de1c80cdc6c04e71fde07cc5028af503438134 (diff) | |
download | UXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.tar UXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.tar.gz UXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.tar.lz UXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.tar.xz UXP-3dfd1412e4accfb442ddb9b83bf4e324742756c5.zip |
Building with "--enable-debug" - fix some warnings
https://github.com/MoonchildProductions/moebius/pull/146
https://github.com/MoonchildProductions/Pale-Moon/pull/1400
Diffstat (limited to 'layout/base')
-rw-r--r-- | layout/base/nsLayoutUtils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 86874f404..9d8dd81bf 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -6653,8 +6653,9 @@ nsLayoutUtils::DrawSingleImage(gfxContext& aContext, nscoord appUnitsPerCSSPixel = nsDeviceContext::AppUnitsPerCSSPixel(); CSSIntSize pixelImageSize(ComputeSizeForDrawingWithFallback(aImage, aDest.Size())); if (pixelImageSize.width < 1 || pixelImageSize.height < 1) { - NS_WARNING("Image width or height is non-positive"); - return DrawResult::TEMPORARY_ERROR; + NS_ASSERTION(pixelImageSize.width >= 0 && pixelImageSize.height >= 0, + "Image width or height is negative"); + return DrawResult::SUCCESS; // no point in drawing a zero size image } nsSize imageSize(CSSPixel::ToAppUnits(pixelImageSize)); |