From ca02f0ab4468b84a357ca9cdae730c58b6d478f5 Mon Sep 17 00:00:00 2001 From: "dholbert@cs.stanford.edu" Date: Mon, 1 Oct 2007 14:44:50 -0700 Subject: [PATCH] Bug 398157: Fix nscoord_MAX arithmetic using NSCoordSaturatingSubtract. r=roc sr=roc a=roc --- layout/tables/BasicTableLayoutStrategy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/tables/BasicTableLayoutStrategy.cpp b/layout/tables/BasicTableLayoutStrategy.cpp index 3a9d76ae9b6..608a696b8d0 100644 --- a/layout/tables/BasicTableLayoutStrategy.cpp +++ b/layout/tables/BasicTableLayoutStrategy.cpp @@ -699,7 +699,7 @@ BasicTableLayoutStrategy::ComputeColumnWidths(const nsHTMLReflowState& aReflowSt subtract += spacing; } } - width -= subtract; + width = NSCoordSaturatingSubtract(width, subtract, nscoord_MAX); min -= subtract; // XXX is |width| the right basis for percentage widths?