diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-05-02 23:42:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-02 23:42:32 +0200 |
commit | 7ea87f571b01412fde39e30d596abec718ceb3ba (patch) | |
tree | e9d9a44c7e6d15ea3e2938143f9f0e4e39903f3f /layout/base/nsLayoutUtils.cpp | |
parent | 04c8f8f8bc2d2dccb6675bd1ed9912f098e76739 (diff) | |
parent | 3dfd1412e4accfb442ddb9b83bf4e324742756c5 (diff) | |
download | UXP-7ea87f571b01412fde39e30d596abec718ceb3ba.tar UXP-7ea87f571b01412fde39e30d596abec718ceb3ba.tar.gz UXP-7ea87f571b01412fde39e30d596abec718ceb3ba.tar.lz UXP-7ea87f571b01412fde39e30d596abec718ceb3ba.tar.xz UXP-7ea87f571b01412fde39e30d596abec718ceb3ba.zip |
Merge pull request #319 from janekptacijarabaci/debug_warning_1
moebius#146: Building with "--enable-debug" - fix some warnings
Diffstat (limited to 'layout/base/nsLayoutUtils.cpp')
-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)); |