Bug 1461046 Part 3: Change RoundedBoxShapeInfo to tolerate empty rects.
MozReview-Commit-ID: FNQwXdeqfua
--- a/layout/generic/nsFloatManager.cpp
+++ b/layout/generic/nsFloatManager.cpp
@@ -1079,17 +1079,23 @@ public:
int32_t aAppUnitsPerDevPixel);
nscoord LineLeft(const nscoord aBStart,
const nscoord aBEnd) const override;
nscoord LineRight(const nscoord aBStart,
const nscoord aBEnd) const override;
nscoord BStart() const override { return mRect.y; }
nscoord BEnd() const override { return mRect.YMost(); }
- bool IsEmpty() const override { return mRect.IsEmpty(); }
+ bool IsEmpty() const override {
+ // A RoundedBoxShapeInfo is never empty, because if it is collapsed to
+ // zero area, it acts like a point. If it is collapsed further, to become
+ // inside-out, it acts like a rect in the same shape as the inside-out
+ // rect.
+ return false;
+ }
void Translate(nscoord aLineLeft, nscoord aBlockStart) override
{
mRect.MoveBy(aLineLeft, aBlockStart);
if (mShapeMargin > 0) {
MOZ_ASSERT(mLogicalTopLeftCorner && mLogicalTopRightCorner &&
mLogicalBottomLeftCorner && mLogicalBottomRightCorner,