Bug 944200 followup - Consistently use nscoord_MIN for uninitialized mFloatEdgeIStart/End. r=mats
authorL. David Baron <dbaron@dbaron.org>
Tue, 16 May 2017 14:31:30 -0700
changeset 358620 fb689ff5ec1955ea014734027457a95af1764208
parent 358619 086af5d404e1f40f66a4fe99f71c459d8676244e
child 358621 0aae6f865e8d6294326a3cd93eb9405f9224ecb7
push id90359
push userdbaron@mozilla.com
push dateWed, 17 May 2017 03:04:37 +0000
treeherdermozilla-inbound@fb689ff5ec19 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs944200, 1227493
milestone55.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 944200 followup - Consistently use nscoord_MIN for uninitialized mFloatEdgeIStart/End. r=mats This fixes an inconsistency in part 2 (32faa7c639ff), which wrote the constant for uninitialized in two different ways. The constructor uses nscoord_MIN for uninitialized, and that's also what GetFloatEdges tests for, so this should use nscoord_MIN as well. I believe this is because the review comment in comment 29 was only partially addressed. I noticed the difference because it caused broken behavior in a tree with my patch for bug 1227493, which defines NS_INTRINSIC_WIDTH_UNKNOWN differently. Some text was disappearing on github (email and website on user pages), slack (usernames of private chats in the sidebar), and twitter (username of user who tweeted a quoted tweet). MozReview-Commit-ID: Ah9FUPf2dw4
layout/generic/nsLineBox.cpp
--- a/layout/generic/nsLineBox.cpp
+++ b/layout/generic/nsLineBox.cpp
@@ -555,18 +555,18 @@ nsLineBox::SetFloatEdges(nscoord aStart,
   mInlineData->mFloatEdgeIEnd = aEnd;
 }
 
 void
 nsLineBox::ClearFloatEdges()
 {
   MOZ_ASSERT(IsInline(), "block line can't have float edges");
   if (mInlineData) {
-    mInlineData->mFloatEdgeIStart = NS_INTRINSIC_WIDTH_UNKNOWN;
-    mInlineData->mFloatEdgeIEnd = NS_INTRINSIC_WIDTH_UNKNOWN;
+    mInlineData->mFloatEdgeIStart = nscoord_MIN;
+    mInlineData->mFloatEdgeIEnd = nscoord_MIN;
   }
 }
 
 void
 nsLineBox::SetOverflowAreas(const nsOverflowAreas& aOverflowAreas)
 {
   NS_FOR_FRAME_OVERFLOW_TYPES(otype) {
     NS_ASSERTION(aOverflowAreas.Overflow(otype).width >= 0,