Bug 1267958: Only complain for negative size, not merely zero. r?jrmuizel
MozReview-Commit-ID: JqtcPB292a7
--- a/gfx/2d/DrawTargetCairo.cpp
+++ b/gfx/2d/DrawTargetCairo.cpp
@@ -1173,17 +1173,17 @@ void
DrawTargetCairo::ClearRect(const Rect& aRect)
{
if (mTransformSingular) {
return;
}
AutoPrepareForDrawing prep(this, mContext);
- if (!mContext || aRect.Width() <= 0 || aRect.Height() <= 0 ||
+ if (!mContext || aRect.Width() < 0 || aRect.Height() < 0 ||
!IsFinite(aRect.X()) || !IsFinite(aRect.Width()) ||
!IsFinite(aRect.Y()) || !IsFinite(aRect.Height())) {
gfxCriticalNote << "ClearRect with invalid argument " << gfx::hexa(mContext) << " with " << aRect.Width() << "x" << aRect.Height() << " [" << aRect.X() << ", " << aRect.Y() << "]";
}
cairo_set_antialias(mContext, CAIRO_ANTIALIAS_NONE);
cairo_new_path(mContext);
cairo_set_operator(mContext, CAIRO_OPERATOR_CLEAR);