diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index 8e82b15249f..08ad6aa165f 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -1971,6 +1971,7 @@ nsHTMLReflowState::ComputeBlockBoxData(nsIPresContext* aPresContext, mComputedWidth = availableWidth - mComputedMargin.left - mComputedMargin.right - mComputedBorderPadding.left - mComputedBorderPadding.right; + mComputedWidth = PR_MAX(mComputedWidth, 0); } AdjustComputedWidth(PR_FALSE); diff --git a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp index 8e82b15249f..08ad6aa165f 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp @@ -1971,6 +1971,7 @@ nsHTMLReflowState::ComputeBlockBoxData(nsIPresContext* aPresContext, mComputedWidth = availableWidth - mComputedMargin.left - mComputedMargin.right - mComputedBorderPadding.left - mComputedBorderPadding.right; + mComputedWidth = PR_MAX(mComputedWidth, 0); } AdjustComputedWidth(PR_FALSE);