From 17f514d3bb3704d1681b2e8efe882a53038e332b Mon Sep 17 00:00:00 2001 From: "dholbert@cs.stanford.edu" Date: Mon, 1 Oct 2007 09:43:02 -0700 Subject: [PATCH] Bug 397852: ASSERTION: Doing nscoord addition with values > nscoord_MAX r=roc sr=roc a=roc --- layout/generic/nsGfxScrollFrame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index e66e6a8d8d3f..7a313bc0c1ac 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -677,7 +677,7 @@ nsHTMLScrollFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext) nsSize vScrollbarPrefSize(0, 0); GetScrollbarMetrics(bls, mInner.mVScrollbarBox, nsnull, &vScrollbarPrefSize, PR_TRUE); - result += vScrollbarPrefSize.width; + result = NSCoordSaturatingAdd(result, vScrollbarPrefSize.width); } return result;