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 420701 5c8648bcf6bbd7ab2ad2ba83593a2d58bc3816d5
parent 420700 157bbc74460aa4ae7d4bba541db109fb130a3dcc
child 420702 48057a6ba3d6735fd717e7835546adeee13f590f
push id64710
push userbwerth@mozilla.com
push dateThu, 31 May 2018 20:31:28 +0000
treeherderautoland@f5990eb1eb0d [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,