Make unconstrained width assertions into warnings because we can hit them when we clamp really large widths. (Bug 525100) r=roc
authorL. David Baron <dbaron@dbaron.org>
Mon, 28 Jun 2010 13:47:39 -0700
changeset 46369 680af2301ba30b014fa15f08b453eef22e7347ee
parent 46368 80fa5e48c29564408a20ed2f115f080634293cf2
child 46370 c51bb774fb71a1cf2d33713fbfcd257bd7196b92
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs525100
milestone1.9.3a6pre
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
Make unconstrained width assertions into warnings because we can hit them when we clamp really large widths. (Bug 525100) r=roc
gfx/src/thebes/crashtests/crashtests.list
layout/base/nsLayoutUtils.cpp
--- a/gfx/src/thebes/crashtests/crashtests.list
+++ b/gfx/src/thebes/crashtests/crashtests.list
@@ -1,4 +1,4 @@
 load 306902-1.xml
 load 383872-1.svg
-asserts(8) load 423110-1.xhtml
+load 423110-1.xhtml
 load 445711.html
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -2186,18 +2186,20 @@ nsLayoutUtils::IntrinsicForContainer(nsI
   return result;
 }
 
 /* static */ nscoord
 nsLayoutUtils::ComputeWidthDependentValue(
                  nscoord              aContainingBlockWidth,
                  const nsStyleCoord&  aCoord)
 {
-  NS_PRECONDITION(aContainingBlockWidth != NS_UNCONSTRAINEDSIZE,
-                  "unconstrained widths no longer supported");
+  NS_WARN_IF_FALSE(aContainingBlockWidth != NS_UNCONSTRAINEDSIZE,
+                   "have unconstrained width; this should only result from "
+                   "very large sizes, not attempts at intrinsic width "
+                   "calculation");
 
   if (eStyleUnit_Coord == aCoord.GetUnit()) {
     return aCoord.GetCoordValue();
   }
   if (eStyleUnit_Percent == aCoord.GetUnit()) {
     return NSToCoordFloorClamped(aContainingBlockWidth *
                                  aCoord.GetPercentValue());
   }