Bug 1461046 Part 3: Change RoundedBoxShapeInfo to tolerate empty rects. r=dholbert
authorBrad Werth <bwerth@mozilla.com>
Fri, 18 May 2018 17:38:41 -0700
changeset 421162 b3375f24897bf84da24d4e9391dedb235f6a6435
parent 421161 3ebfdd60f59fc35e823a6e1064352cc7b39cc185
child 421163 128f8e1b8dcd0d8201c7e6ef9711e346576d2709
push id64818
push userbwerth@mozilla.com
push dateMon, 04 Jun 2018 17:18:30 +0000
treeherderautoland@bd46d28842ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1461046
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1461046 Part 3: Change RoundedBoxShapeInfo to tolerate empty rects. r=dholbert MozReview-Commit-ID: FNQwXdeqfua
layout/generic/nsFloatManager.cpp
--- 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,